Shared Tools, Separate Keys: A Policy-Enforcing Gateway for Teams Using MCP Servers
The Model Context Protocol (MCP) lets an AI assistant call tools on a server: read orders, query a database, open a ticket. It was built around one person and their own servers. Teams don't work that way. They share servers, and with them one set of credentials, with no record of who did what and nothing to stop a teammate's assistant from running a tool that deletes data. I built a gateway that sits between a team's MCP clients and all of its MCP servers. Each member gets their own key; upstream credentials stay encrypted inside the gateway and are never sent to clients. Tools are renamed by server so one server can't pose as another, write tools are blocked for members by default, and every call is rate-limited and logged. I tested it with 28 scripted attacks, including a deliberately hostile MCP server, and it handled all 28 as designed; two are only partly solved, and I say which. On a laptop the gateway adds about 5 ms per call at the median (8.15 ms vs. 3.17 ms direct, five runs), sustains about 200 calls/s with no errors at 50 concurrent clients, and its cost doesn't grow as more servers are connected (2 to 21 servers, 7 to 102 tools). The code is open source and runs on Kubernetes: https://github.com/Relacosm/mcp-gateway
Authors
- Harsh Raj
Institutions
- DY Patil Deemed to be University (IN)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-28
- DOI
- https://doi.org/10.5281/zenodo.24633340
- Primary Topic
- Access Control and Trust
- Type
- preprint