Implementing Per-Call Authorization in MCP
ani_0523 · reddit · 2026-07-13
The author discusses the practical challenge of how to authorize every tool call after an MCP connection is established:
- MCP authentication alone only proves the client can connect to the server; by default, every tool can be invoked once connected.
- If a prompt injection occurs during an agent session, the model might directly invoke high-risk tools (like deleterepo).
- Their solution involves placing a lightweight proxy layer before the stdio path:
- Checking for grants before every tools/call.
- Allowing authorization to be revoked mid-agent run, causing the next call to fail immediately.
- Filtering tools/list so the model can't see unauthorized tools.
- Keeping secrets outside the agent process as much as possible.
They also open-sourced their implementation (Go, Apache-2.0) and asked the community whether they handle per-call authorization at the MCP layer or internally within the tool server.
Related event: Challenges of Tool-Level and Call-Level Authorization in Agent CLIs(2 posts)→
More from coding & agent
- Shopify design lead on AI-era workflow: designers are becoming full-stack editors — KlausCodes · 2026-10-26
- Ultrametric open-sources Open Startup Repo to let AI agents run startup operations — garrytan · 2026-10-26
- MCP fault injection study: agent task scores drop 60% under realistic tool failures, scale doesn't help — dair_ai · 2026-10-26
- General agents burn ~140M tokens/month on LinkedIn outreach; scripts do it 60x cheaper — ChrisHarpon2 · 2026-10-26
- OpenAI upgrades Decisions API: 400 questions per call, native voice and image support — OpenAIDevs · 2026-10-26
- NLI alone rejects 5/6 new agent memories; a 0.45 similarity gate fixes it all — Alternative_Pin9598 · 2026-10-26