MCP Tip: Blanket 401 on tools/list Makes Every Directory Show 0 Capabilities

dsternlicht · reddit · 2026-09-17

A developer debugs why their hosted MCP server showed "0 capabilities" on Smithery and flapped Unhealthy on Glama: the auth middleware 401'd anonymous requests per spec, but registry scanners don't authenticate — they anonymously call initialize and tools/list and record nothing.

Fix: gate on the request, not the connection —

Security caveat: safe if tools are registered per-token (anonymous path only ever sees public read-only tools); a real exposure if all tools are registered up front and the middleware is the only gate.

Same-class bug: GET on the MCP endpoint should return 405, not 404, or health checks read the host as down.

Result: Smithery rescanned and found 16 tools, quality score 28 → 52 → 80; Glama went back to Healthy. Includes a ten-second keyless curl self-check.

Original post →

More from coding & agent

coding & agent channel →