OAuth on MCP servers hides all tools from directories — here is the fix
Developers building remote MCP servers secured behind OAuth 2.1 discovered that tool directories like Glama, Smithery, and mcp.directory were listing their servers with zero tools, because automated crawlers cannot complete interactive OAuth flows. The root cause is that the MCP protocol's tool-discovery endpoint, tools/list, was placed behind authentication alongside sensitive operations, causing crawlers to receive a 401 response and stop scanning. Since describing available tools carries no security risk — unlike actually calling them — the recommended fix is to expose a small set of handshake methods publicly, including initialize, ping, and tools/list, while keeping all credit-spending or data-touching calls auth-gated. The implementation requires careful checks: requests carrying an Authorization header are always validated, only POST requests qualify for the public path, and batched JSON-RPC requests must have every message whitelisted, not just one. Without this separation, a server can be registered on every major directory and still appear completely empty to anyone browsing for tools.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in