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.
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
| Who | Role in the application | Identity in LumoAuth |
|---|---|---|
| Developer | Uses the tools from a coding agent. | A user. The coding agent is a client that identifies itself with a URL. |
| Release agent | Files and closes issues. | A registered agent with a DPoP-bound token. |
| Three MCP servers | Warehouse, issues, vendor. | Three registered MCP servers. |
Flows
| Flow | What happens | What LumoAuth does |
|---|---|---|
| Connect | A developer adds the warehouse server to Claude Code. | 401, metadata, sign-in, consent, a token for that server. |
| Tool list | The developer and the agent list the tools. | Each receives a different list. |
| More scope | The developer calls a write tool. | An insufficient_scope challenge. One more consent for one scope. |
| Bound tokens | The agent calls the issues server. | That server accepts only DPoP-bound tokens. |
| Approval | The agent calls "delete project". | The tool needs a just-in-time approval for that project. |
| Vendor server | A call reaches the server that cannot be changed. | The proxy checked the token before the server saw the request. |
Parts
| Part | Built with | Job |
|---|---|---|
| Warehouse server | FastMCP, lumoauth-fastmcp | Tool policy and approval-only tools. |
| Issues server | @lumoauth/mcp | Scope step-up, DPoP, a vault token for the tracker API. |
| Vendor server | npx lumoauth secure | Runs in front of the unchanged server. |
| Gateway | Envoy with lumoauth ext-authz | One 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
- Start everything with Docker Compose.
- Connect a coding agent to the warehouse server.
- Compare the tool list of the developer and of the agent.
- Call a write tool, and give the extra scope.
- 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.