Skip to main content

Toolshed

A company's internal MCP servers behind one authorization layer: three servers in three styles, with a decision for each tool and each caller.

ApplicationPlanned
This example is planned. Not built yet. This page is the specification for the example.
Works with
PythonJavaScript / TypeScriptFastMCPMCP TypeScript SDKMCP clientsKubernetesDocker Compose
Stack
FastMCP server, TypeScript MCP server, an existing server behind the proxy, Envoy

Scenario​

An engineering team runs three MCP servers: a new one in Python for the data warehouse, one in TypeScript for the issue tracker, and an older one from a vendor that nobody can change. Developers connect from Claude Code and Cursor. Agents connect too. Each caller sees only the tools that it may run.

People and agents​

WhoRole in the applicationIdentity in LumoAuth
DeveloperUses the tools from a coding agent.A user. The coding agent is a client that identifies itself with a URL.
Release agentFiles and closes issues.A registered agent with a DPoP-bound token.
Three MCP serversWarehouse, issues, vendor.Three registered MCP servers.

Flows​

FlowWhat happensWhat LumoAuth does
ConnectA developer adds the warehouse server to Claude Code.401, metadata, sign-in, consent, a token for that server.
Tool listThe developer and the agent list the tools.Each receives a different list.
More scopeThe developer calls a write tool.An insufficient_scope challenge. One more consent for one scope.
Bound tokensThe agent calls the issues server.That server accepts only DPoP-bound tokens.
ApprovalThe agent calls "delete project".The tool needs a just-in-time approval for that project.
Vendor serverA call reaches the server that cannot be changed.The proxy checked the token before the server saw the request.

Parts​

PartBuilt withJob
Warehouse serverFastMCP, lumoauth-fastmcpTool policy and approval-only tools.
Issues server@lumoauth/mcpScope step-up, DPoP, a vault token for the tracker API.
Vendor servernpx lumoauth secureRuns in front of the unchanged server.
GatewayEnvoy with lumoauth ext-authzOne entry address for all three.

What the seed script creates​

  • Three MCP server registrations with their scopes.
  • The release agent.
  • Relationship tuples for tool access.
  • A connection for the issue tracker.

Walkthrough​

  1. Start everything with Docker Compose.
  2. Connect a coding agent to the warehouse server.
  3. Compare the tool list of the developer and of the agent.
  4. Call a write tool, and give the extra scope.
  5. Send a plain bearer token to the issues server, and read the refusal.

Before you run it​

  • Some MCP clients do not send DPoP proofs. The warehouse server leaves DPoP off so that they can connect.
  • Check that your plan includes fine-grained authorization, without which every tool is refused in the plans matrix.