Protocol contract (Entry Gate B)

July 19, 2026 · View on GitHub

Self-contained notes for the remote MCP + OAuth shape retained by the single-tenant self-host example. The hosted product uses one tenant-workspace endpoint at https://mcp.erpipe.com/mcp and requires an explicit instance key on every Odoo-bound tool.

Contract

  1. Self-host MCP mount: /{slug}/mcp
  2. OAuth 2.1 + PKCE: S256 only (allowPlainPKCE: false)
  3. RFC 9728 PRM (path-specific): /.well-known/oauth-protected-resource/{slug}/mcp
  4. RFC 8707 resource: access grant is bound to the connection URL
  5. Cross-slug token replay in the self-host example401 audience mismatch
  6. Library pins: agents@0.17.4, @cloudflare/workers-oauth-provider@0.8.2

Reserved path segments

Do not use these as connection slugs: authorize, token, register, mcp, sse, .well-known, assets, health, app, admin.

Proof history

The contract was validated end-to-end (including Claude.ai Connected) before this monorepo was extracted. Implementation in-repo:

  • packages/worker-selfhost — minimal single-tenant Worker
  • Hosted multi-tenant control plane lives outside this OSS tree