@erpipe/worker-selfhost

August 24, 2026 · View on GitHub

Minimal single-tenant Cloudflare Worker that exposes ERPipe over MCP:

  • OAuth 2.1 + PKCE S256 only
  • MCP at /{CONNECTION_SLUG}/mcp (default slug: default)
  • Core surface: 27 tools + 7 prompts from @erpipe/core (phases 1–4) plus a small ping helper (28 tools total)

This package is an example / self-host template (private: true — not published to npm).

Dev

# from monorepo root
npm install
npm run build
npm run dev:selfhost

Deploy

Create a KV namespace, put the id in wrangler.jsonc, then:

npm run deploy:selfhost

Env vars / secrets

VarDefaultMeaning
CONNECTION_SLUGdefaultPath segment for MCP URL
ODOO_URLOdoo base URL
ODOO_DBDatabase name
ODOO_API_KEYAPI key (JSON-2 bearer)
ODOO_LOCALEOptional context.lang
ODOO_JSON2_DB_HEADER1Set 0 to omit X-Odoo-Database
npx wrangler secret put ODOO_URL
npx wrangler secret put ODOO_DB
npx wrangler secret put ODOO_API_KEY

Tools & prompts

See the monorepo catalog: docs/tools.md.

Surface is assembled from PHASE1_TOOLSPHASE4_TOOLS (27) plus ping. Hosted multi-instance / lifecycle / webhook tools are not included (private cloud only).

Optional ODOO_MCP_MODEL_ALLOWLIST_JSON: empty/{} = open (current behavior). A non-empty models list restricts search/read/write/execute_method to listed models and ops. Malformed JSON fail-closes until fixed.

Protocol notes

See SPIKE.md for the /{slug}/mcp contract, PRM path, and audience binding rules.