Case study · AI agents

From MCP servers on laptops to a governed enterprise agent platform

Engineers had connected assistants to dozens of MCP servers, some internal, some from the internet, most with broad tokens. Security wanted to stop it; product teams wanted more of it. The goal was a platform that made the approved path the easiest one.

Case studyEnterprise · Software and servicesSumanta Mukhopadhyay9 min read
#ai#agents#mcp#security#platform
CASE STUDY · CASE STUDY · AI AGENTS28 Oct 2026 · 05:20 GST
At a glance
SectorEnterprise · Software and services
My roleAI architect
EngagementPlatform design, build and hand-off
ScopeRegistry, identity, gateway, server standards, audit
What changed
  • One catalogue of approved MCP servers that clients discover automatically
  • No shared or long-lived tokens: access goes through the identity provider with narrow scopes
  • Every tool call attributable to a user, an agent and a server version
  • A paved road that lets teams publish new internal servers without a security exception
Model Context ProtocolPrivate MCP registryOAuth 2.1Identity providerMCP gatewayPolicy as codeOpenTelemetryKubernetes

Anonymised composite. Client names, identifying details and confidential figures are withheld; public facts are cited in the references.

The situation

An organisation had embraced AI assistants faster than it had governed them. Developers connected IDE assistants to MCP servers for the code host, the ticketing system and the data warehouse. Some servers were built internally in an afternoon; others were installed from public repositories. Many used personal access tokens with wide permissions, stored in local configuration files. Nobody could say which servers were in use, who had approved them, or what they had done.

Security's first instinct was to block MCP outright. Leadership's instinct was the opposite: agents were becoming central to engineering and operations, and a ban would simply push usage further out of sight.

What had to be true

  • One place to find approved servers, discoverable by the clients people already use.
  • No long-lived shared tokens. Access flows through the identity provider, per user, with the narrowest scopes that work.
  • Every tool call is attributable to a person, an agent, a server and a version.
  • Writes and destructive actions need explicit, visible consent.
  • Publishing a new internal server is easy if it follows the standard; exceptions are rare and visible.

Architecture

Clients
IDE assistantsdeveloper toolsChat assistantsknowledge workAgent runtimebackground jobs
Discover
Private MCP registryapproved, pinned versionsServer metadataowner, data class, scopes
Control
MCP gatewayauthn, policy, rate limitsIdentity providerSSO, scoped tokensPolicy as codewho, which tools, which data
Servers
Code and ticketsinternal serversData warehouseread-only viewsDocs and searchpermission-awareVetted public serversmirrored, pinned
Observe
Audit loguser, agent, tool, args hashTraces and metricsOpenTelemetryUsage reportsprune unused servers
The registry decides what exists; the gateway decides who can use it; the audit trail shows what happened.

The design followed the ecosystem's own shape: the official MCP Registry is intended as an upstream that organisations build private subregistries on, adding internal servers that should never appear publicly3. The approach is described in more depth in running an enterprise MCP registry.

The data flow, end to end

  1. DiscoverClient lists servers from the private registry, filtered by the user's groups
  2. AuthoriseUser signs in through the identity provider; token issued for that server only
  3. ConnectClient reaches the server through the gateway, which checks token audience and policy
  4. Call a toolRead tools run directly; write tools trigger a consent prompt
  5. Act downstreamServer uses its own credentials or a token exchange, never the client's token
  6. RecordCall, result status and versions logged and traced
Each hop has one job, so a failure at any step is easy to see and explain.

Step five matters most. The MCP security guidance names token passthrough, where a server forwards a token it received from the client to a downstream API, as an anti-pattern that breaks OAuth security boundaries, and the authorisation specification forbids it12. Every server on the platform validates that tokens were issued for it, and calls downstream systems with its own, separately scoped credentials.

The hard part: scopes people would actually accept

The technical controls were well understood. The difficult part was scope design. The MCP guidance warns that over-broad scopes granted up front expand the blast radius of a stolen token, make revocation disruptive and create consent dialogs that users abandon; it recommends a progressive, least-privilege model starting with a minimal read-only set1. In practice that meant:

  • A small, named set of scopes per server, starting with read-only discovery.
  • Write and admin scopes requested only when a user first invokes a tool that needs them.
  • Central control through the identity provider using the authorisation extensions, so administrators can grant and revoke access in one place4.
  • Metrics on which scopes are requested and used, so creep is visible.

Least privilege only works if the least-privilege path is also the least-friction path. Otherwise people find a personal token and work around it.

How it ran

Platform
  1. Registry and gateway
  2. Server template and CI checks
  3. Usage and audit reporting
Security
  1. Review criteria
  2. Scope and policy design
  3. Approve and pin versions
Server teams
  1. Build from the template
  2. Declare scopes and data class
  3. Own and patch their server
Platform builds the road, security sets the rules, teams own what they publish.
Phase 1Inventory
  • Find servers in use
  • Classify by data and risk
  • Agree review criteria
Phase 2Paved road
  • Private registry
  • Gateway and SSO
  • Server template
Phase 3Migrate
  • Top servers first
  • Retire personal tokens
  • Point clients at registry
Phase 4Enforce
  • Block unregistered sources
  • Usage-based pruning
  • Regular re-review
Enforcement came last, once the approved path was already the convenient one.

Key decisions and trade-offs

DecisionAlternativeWhy
Private registry mirroring the public oneAllow-list in a wikiClients can discover from it, and versions can be pinned
Gateway in front of remote serversEach server enforces policy aloneOne place for authentication, policy, rate limits and audit
Servers use their own downstream credentialsPass client tokens throughToken passthrough is forbidden and breaks audit and audience checks
Progressive scopesGrant everything at first loginSmaller blast radius and consent people actually read
Enforce after migrationBlock first, build laterAvoids pushing usage underground

The prompt injection and excessive agency risks in the OWASP Top 10 for LLM applications shaped the server template, with tool descriptions treated as untrusted and write tools gated by consent5. The detailed controls are in securing MCP servers, prompt injection defence for agents and MCP extensions strategy.

What I'd do again, and differently

Again: start with an inventory and make the approved path faster than the unapproved one before enforcing anything. Differently: publish the server template and its CI checks in the first phase. Teams wanted to build compliant servers early, and every week without a template produced another one-off that later needed migrating.

If agents are spreading faster than your controls, my AI architecture work describes how I approach agent platforms, or analyse your challenge and bring the result to a call.

References
  1. 1
    Security best practicesModel Context Protocol documentation
  2. 2
    Authorization: security considerationsModel Context Protocol specification
  3. 3
    The MCP RegistryModel Context Protocol documentation
  4. 4
    Authorization extensions overviewModel Context Protocol documentation
  5. 5
    OWASP Top 10 for LLM ApplicationsOWASP GenAI Security Project
FAQ

Common questions

Why not just let teams install any MCP server?

MCP servers can read data and take actions with the user's access. Unreviewed servers, broad tokens and no audit trail turn a productivity tool into an unmanaged integration layer. A registry and gateway keep the convenience while adding control.

What is token passthrough and why is it forbidden?

It is when an MCP server accepts a token not issued for it and forwards it to a downstream API. The MCP security guidance describes it as an anti-pattern that breaks OAuth security boundaries, and the authorisation specification forbids it.

Does a private registry replace security review?

No. The registry is where approved servers are listed and discovered. Review, version pinning and policy decide what gets listed; the registry makes the decision visible and enforceable.

Keep reading

Related

Open to advisory, fractional CTO & select builds

Let's talk about what you're building.

The fastest route is a free 30-minute call. Prefer to write? Send a message and I'll reply personally within two business days.

Start a conversation

How would you like to reach me?

Book a 30-min callFastest. Pick any open slot on my calendar.→ Write in GmailOpens a pre-filled draft in your browser.→ Use my email appOutlook, Apple Mail or your default client.→

I reply personally within two business days. Time zones from the Americas and Europe to the Middle East and Asia-Pacific.