AI Lab · MCP
Enterprise MCP Architecture
Designing a governed Model Context Protocol layer — gateway, server catalogue, identity propagation and observability — so agents can access enterprise systems through scoped, auditable tools.
Hypothesis
A centrally operated MCP gateway that propagates end-user identity, enforces per-agent tool scopes and emits uniform telemetry will let enterprises scale agent integrations linearly — one MCP server per system of record — instead of the quadratic agent-by-system integration sprawl seen today.
Stack
Architecture summary
Agents connect to a single MCP gateway over streamable HTTP. The gateway authenticates the agent, exchanges the user's token for a downstream token (on-behalf-of), evaluates an OPA policy for the requested tool and parameters, and forwards the call to the appropriate MCP server. Each server wraps one system of record and exposes a minimal, typed tool surface. All calls are traced end to end.
Research questions
- RQ1
How should user identity propagate through agent → gateway → MCP server → system of record?
- RQ2
What is the right granularity for tool scopes — per server, per tool, or per parameter range?
- RQ3
How do we version tool contracts without breaking agents in production?
- RQ4
Which telemetry is needed for cost attribution and audit across multi-agent calls?
Lab notebook
The integration problem MCP solves
Without a protocol, every agent integrates with every system it needs: N agents × M systems bespoke connectors. MCP collapses this to N + M: systems expose MCP servers once; agents speak MCP once. That economic argument is why MCP matters to enterprise architects — not as a developer convenience but as an integration architecture.
Reference architecture
agents ──▶ MCP gateway ──┬──▶ crm-mcp ──▶ CRM
(LangGraph, │ authn ├──▶ itsm-mcp ──▶ ITSM
Pydantic AI)│ token-exch├──▶ docs-mcp ──▶ Knowledge platform
│ OPA policy└──▶ finance-mcp ──▶ ERP (read-only)
│
└──▶ OpenTelemetry ──▶ trace store / cost attribution
Gateway responsibilities
- Authentication of the calling agent via workload identity.
- Token exchange so downstream calls carry the end user's entitlements, not a super-user service account.
- Policy evaluation with OPA: is this agent allowed this tool, with these parameters, for this user, at this risk tier?
- Uniform telemetry — every tool call is a span with agent ID, user, tool, latency, cost and outcome.
Server design rules
- One server per system of record. Ownership follows the system owner.
- Minimal tool surface. Expose intent-level tools (
create_change_request) rather than raw CRUD. - Typed contracts. JSON Schema for every input and output, versioned semantically.
- Read and write separation. Write tools live behind stricter scopes and, for T3+, approval checkpoints.
Findings so far
- Identity is the hard part. Transport and schema are solved; on-behalf-of token flows across heterogeneous systems are where most effort goes.
- Parameter-level policy is necessary. "Can create refunds" is too coarse; "can create refunds under 500 EUR for own region" is what risk owners actually approve.
- Tool descriptions are prompts. Small wording changes in tool descriptions measurably change agent tool selection. They must be reviewed like code.
Open questions
How should tool catalogues be discovered across business units without creating a single global bottleneck? We are evaluating a federated registry where each domain publishes servers that the gateway discovers and policy-scopes centrally.