MCP gateway architecture

The dispatch pipeline, end to end

This page shows what really happens to a tool call in the MCP authorization pipeline. It is the pipeline as built, not as sold. Each stage below is in shipping code.

One governed tool call, end to end

Anatomy of a governed tool call An AI agent request passes through the Auth dispatch pipeline, a tool handler, and a tokenized dataset; every stage emits chained, signed evidence. YOUR IDP - ENTRA / OKTA ("who it is") AI Agent (any MCP client) AUTH DISPATCH PIPELINE MCP token scope ceiling ≤ ceiling? Authority tier Revocation re-check every call, mid-session Metered dispatch agent_id=agt_7f21 Tool handler Ontology MCP server Dataset tokenized at ingest name → TOK_a3f9… deterministic · join-preserving Vault detokenize = privileged op tokenized answer EVIDENCE LANE Ed25519 checkpoint verify_chain → VALID signed checkpoints - deletion detectable

The hero diagram, with notes. Each stage below is shipping code, and each one drops evidence into the chain.

The MCP authorization pipeline

Each governed MCP tool call passes, in order:

  • Auth gate: the caller presents an Auth-issued MCP tool token (RFC 9068 JWT, checked against JWKS).
  • Scope ceiling: the tool's stated scopes must sit inside the token's scope set. A delegated key never grants more than its owner intends, not even for global admins.
  • Authority tier: we check the tool's stated authority level against the subject's role.
  • Mid-session revocation re-check: dispatch renews session authority first. A revoked or paused agent loses access on its next call, not when the token expires.
  • Metering: quota and rate limits apply. Usage charges to the agent's ID.
  • Handler: the tool runs.
  • Sealed audit: the event lands in the hash chain.

Where Cedar fits, plainly: the Cedar policy engine (with policy_explain) governs admin, platform, config, and token-management calls. It does not run on each tool dispatch. The per-call pipeline above runs on the hot path instead. We spell this out. It is the kind of claim that falls apart in a demo, once other vendors round it up.

The hash chain audit log design

A SHA-256 row chain checks that the sequence has no gaps. Ed25519-signed checkpoints chain through the previous signature, too. kid-based rotation fails closed on an unknown key. We report an unsigned tail and never hide it. We HMAC-commit actor identities. So GDPR crypto-shred erasure leaves the chain still verifiable. Signing runs through one custody choke point. We built a KMS or HSM seam, but the hardware side still needs to ship. The sealer holds an advisory lock. So the chain cannot fork.

Full verification rules and the report schema live on the verify page.

Data plane: tokenization at ingest

We tokenize datasets at ingest. The tokens are deterministic and HMAC-based. That makes them join-preserving. The same value always gets the same token. So joins, analytics, and entity resolution work. The tokens are also vault-reversible. Detokenizing is a privileged, logged act, never a default. Classification tags PII and PHI. Quasi-identifier generalization coarsens the risky fields. SQL views mask by default. That covers the path we leave raw.

The query engine is the DataShield Analytical DB, exposed over MCP. Our engineering blog covers how we measure speed. We publish benchmark numbers with the hardware, warm or cold state, and percentiles. Or we do not publish them at all.

Open components we build on

We name them so you can go check them. Cedar handles policy. Fastify runs the Auth layer. Hono runs the fleet layer. SQLite fits in where it can. All of it runs on Node 22. Analytical and transactional storage run on the DataShield Analytical DB and the DataShield Transactional DB.

Each stage of the MCP authorization pipeline above is in shipping code. The limitations below are the parts that are not.

Honest limitations

Questions a page can't answer?

Ask the quoting agent

You've seen the proof

Ready for a number? Scope your deployment and we'll price it against your own economics.

Get your quote →