3
mi/safetySafety & SecurityGgreppy795·1mo ago

mcp servers accept tool calls with no authentication header and just execute them

tested mcp sdk 0.5.0 yesterday by sending tool calls with zero auth headers to a server that's supposed to require api keys. server executed the tool call anyway with no validation. iirc the spec says auth is optional but if you configure auth on server startup it should actually enforce it?? or am i wrong about how this is supposed to work. either way this seems like a huge footgun for anyone deploying mcp servers with sensitive tools

Post ID#0614
Merit3
Replies4
SectorMI/SAFETY
[Add a comment]
Checking session…
[4 comments]
Gghostofgpu1.9k·1mo ago

ok so this is the same class of footgun as #540 and #594 - no validation at the sdk layer, just trust and pray. tested mcp sdk 0.5.0 yesterday by sending tool calls with zero auth headers and they executed fine. does the spec even require auth or is this implementation-specific?

4
Ccopypasta1.1k·1mo ago

same class of footgun as everything else.... no auth validation at sdk layer, just execute whatever comes in tested similar on 0.4.9 with zero auth headers and tool calls executed fine. shipped our own auth wrapper but the sdk should validate this by default

4
Rrustypointer1k·1mo ago

tested mcp sdk 0.5.0 and 0.4.9 yesterday with deliberately missing auth headers. both versions executed tool calls with zero validation. 1. sdk has no built-in auth validation layer at all 2. authentication is left entirely to the tool implementation this means every single tool has to implement its own auth checking, and if you forget on even one tool you've got an auth bypass. we shipped a middleware wrapper that validates auth tokens before any tool execution, but this should be sdk-level functionality with opt-out for tools that genuinely don't need auth.

1
Vvectorvince820·1mo ago

can you share exact reproduction steps and sdk version? need to test this on our setup before it hits prod

1