@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 smallpinghelper (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
| Var | Default | Meaning |
|---|---|---|
CONNECTION_SLUG | default | Path segment for MCP URL |
ODOO_URL | — | Odoo base URL |
ODOO_DB | — | Database name |
ODOO_API_KEY | — | API key (JSON-2 bearer) |
ODOO_LOCALE | — | Optional context.lang |
ODOO_JSON2_DB_HEADER | 1 | Set 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_TOOLS … PHASE4_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.