← Back to Blog
agent-accessmcpgatewaysplatform-engineeringauthorization

Dozens of systems should not mean dozens of agent endpoints

Jeff Cameron

Part 13 of 14 in Already Logged In.

If more than one of your systems will be opened to agents, put one governed endpoint in front of them before each team builds a door of its own.

An illustrative company, a year into doing it the other way: the billing team runs an MCP server. So do the teams that own claims and scheduling. Each picked its own sign-in, its own view of which tools are safe to expose, and its own logging.

A customer who wants an assistant to work across all three connects three times and consents three times. Your security team reviews three policies that disagree. When access has to be pulled, someone has to remember the three places it lives.

Nothing in that picture is broken. It is what you get when every system opens its own door.

For a single application, start with adding MCP to an existing app. Everything there is assumed here.

Three vendors that opened up put a control point in the path

Three companies that let outside agents in this year each described a route they control. ServiceNow said in May that outside agents reach its actions through its MCP server, and that every action is checked for identity, scoped by permission and auditable. Workday said in October that every agent, whoever built it, runs under the same permissions, approvals and audit trails. Walmart announced in October an MCP-based gateway for shopping agents, starting with a beta. These are the companies' own announcements. We have seen no published results for any of the three.

The protocol now makes room for the pattern. The MCP maintainers' July revision requires Mcp-Method and Mcp-Name headers on HTTP requests, and the announcement says a gateway can route and meter on them without parsing request bodies.

What one door has to do

An illustrative layout:

Claude ────┐                             ┌─ billing    hosted MCP server     allowlist
ChatGPT ───┼─> one endpoint ─> gateway ──┼─ claims     external MCP server   allowlist
Grok ──────┘         │                   └─ help desk  assistant             allowlist
                     │
             sign-in and tokens
            (authorization server)

Whoever's product you use, the door has five jobs.

  • One address and one sign-in. The customer's client connects once.
  • A namespace per backend. Billing and claims can each have a search tool without colliding.
  • An allowlist per backend. The door exposes only the operations you chose.
  • An exposure policy. How many tool definitions a client is shown at once.
  • Isolation. One failing backend should not take the door down.

How we build the door

Our gateway is live, and every account has a default one. Gateways are served at https://gw.opzero.sh/mcp and https://gw.opzero.sh/g/<slug>/mcp. A gateway fronts three kinds of backend: MCP servers hosted on our platform, external MCP servers, and assistants. Each backend gets a namespace and its own tool allowlist. A dead backend does not break the gateway. Configuration changes are live within about 30 seconds, with no redeploy.

We care about the exposure policy because of an observation: a Claude connector stopped loading tools past 50. We record that as evidence. It is not a documented cap. A gateway has four exposure modes: search, inline, pinned and auto. In search mode the client sees a constant set of meta-tools (search_tools, invoke_read_tool, invoke_write_tool, list_resources, read_resource). auto is inline up to 40 tools, then search.

Sign-in goes through one authorization server

MCP clients sign in through MCPAuthKit, our OAuth 2.1 authorization server at auth.opzero.sh. It implements PKCE, dynamic client registration, client ID metadata documents, protected-resource metadata (RFC 9728), audience-bound tokens (RFC 8707), a consent screen, refresh and revocation.

The token facts:

TokenLifetime and behavior
Access token1 hour
Refresh token30 days, single use, rotated on every refresh with no reuse grace window
Authorization code10 minutes
Machine client tokenBound to one resource and one scope set, no refresh token, expires within an hour

Validation is a SHA-256 hash lookup with no network call. On an OAuth-mode hosted server every caller is a signed-in account with a stable subject id, which tool code reads as ctx.user.

Where it stops. Sign-in is email and password. There is no SSO, SAML or SCIM, and no sign-in through your identity provider. The MCP Enterprise-Managed Authorization extension is explicitly not supported. The client's identity is self-asserted at registration and is not used as an authority input. We know the signed-in account. We do not verify which vendor's agent is calling. Tokens are issued bound to an audience, and we do not claim that every endpoint enforces the binding today. Assistants are owner-scoped: per-end-user identity exists on OAuth-mode hosted MCP servers only. We hold no compliance certifications.

The backend credential stays out of the code

When a system behind the door has to call another service, it uses a connection: a stored, auto-refreshed OAuth grant from an account to an outside MCP server. A connection is inert until a grant attaches it to one named workload. The credential is encrypted at rest and never reaches workload code. Calls go through a platform proxy that checks the grant on every call.

A connection belongs to one of two principals: the account owner, or an end user of a specific deployed server who connects their own account.

A grant on our own platform connection, or on a server you own, must name the tools it conveys. An entry is a whole tool or one action of a tool, written tool:action, for example project_inspect:list. The list is enforced on tools/call and applied to tools/list, so a workload does not see tools it may not call. Grants are re-read on every call with no decision cache, so a revoked grant is refused on the next call.

Where it stops. For third-party providers the tool allowlist is rejected. Those connections are bounded only by the OAuth scopes the provider granted. A hosted server can also ask the proxy to act as any of its own end users, a limit we document.

Know which checks run per call and which run at the door

Calls made through a connection grant, delegated calls into a hosted server, file access and model calls are decided per call. An enforcement point that cannot reach our policy decision point denies. The gateways described above, which we call federation gateways, are different. They enforce at admission only, and grants are not rechecked before each relayed call. Today only the home gateway of Oz OS, our per-person environment, does that recheck.

So design as if the gateway were absent. Each backend keeps enforcing its own rules on its own operations. Do not count a tool's absence from the gateway's list as an authorization decision, because a call can reach a backend by another route.

There is no policy language: the rules are TypeScript. The gateway's private activity viewer shows real backend dispatches without collecting arguments, results or credentials. We record every allow and deny on a protected action, but customers cannot yet read that record. Part 7 covers it.

One door, several clients, two protocol eras

The July revision of MCP retired the initialize handshake and the session-id header. A door has to serve clients on either side of that change. Our standing rule, the dual-era protocol policy, is that every MCP surface supports 2026-07-28 as the primary revision with 2025-03-26, 2025-06-18 and 2025-11-25 as fallback. The 2024-11-05 revision, with its old HTTP+SSE transport, is not supported.

The conformance registry holds ten client profiles: claude-connectors, claude-code, chatgpt-plugins, chatgpt-deep-research, openai-responses-api, grok-connector, xai-api-remote-mcp, ide-remote-clients (Cursor, VS Code Copilot, Zed), mcp-spec-baseline and opzero-platform-policy. Each carries cited requirements and executable checks. Three CI gates run: that registry, the MCP Inspector reference client, and the official conformance suite.

Where it stops. A profile is our own test against requirements we cite for that client. It is not a certification by the vendor. The hosted claude.ai and Claude Desktop connectors remain unproven for the modern path. The official suite runs with a ledger of known failures. There is no Gemini profile. We have not tested against Meta Muse, OpenAI dots or Claude Duet.

Tell the agent instead of making it ask

An agent that is never told when something changes will poll. Every hosted TypeScript server on our platform answers the MCP Events methods. A client subscribes and receives each event as a signed webhook (Standard Webhooks, HMAC-SHA256), and a signed challenge is verified before the subscription is stored. Delivery is at-least-once. Retries back off from 60 seconds, doubling to a cap of one hour, and stop after five tries. A subscription lasts 24 hours by default.

Where it stops. MCP Events follows a working-group design sketch from February. It is an experimental extension that has not been ratified, and it is TypeScript only. Gateways do not forward events/*, so a client subscribes at each server directly.

Four decisions before you build one

  1. The list. For each system an outside agent should reach, write the handful of operations you would allow. That is your per-backend allowlist, whatever product holds it.
  2. The sign-in. If your own identity provider must be in the path, say so first. Today that rules us out.
  3. The clients. Name the ones your customers use and test those by name.
  4. The check. For every write, name the one place the per-call decision is made. If the answer is the gateway, ask what happens to a call that arrives another way.

If you want to try the pattern on one system, that is the shape of our design-partner pilot: one existing product or workflow, against acceptance criteria agreed before the build, scoped and quoted per pilot.

Of the four, the check is the one a gateway cannot settle for you. Each backend has to answer it before the door opens.