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
- Reticle builds a verification layer that lets AI coding agents check their own generated code — Scobleizer · 2026-10-27
- Trust your agent, but read its logs: Claude managed agents tips — brada · 2026-10-27
- Dev training a guard model to block prompt injection, tool and memory poisoning — gnukeith · 2026-10-27
- Dev trains a ~4GB-VRAM sentinel model to guard against prompt injection and poisoned memory — gnukeith · 2026-10-27
- Superset rebrands as Paradev, raises $11.5M seed led by USV — massimosgrelli · 2026-10-27
- Ex-Big Tech managers may thrive in the AI era: manage agents like you managed teams — lxfater · 2026-10-27