MCPSafe.io
RegistryThreatsMethodologyDocsPricingScanSign in
MCPSafe.io

Security checks for MCP servers — public packages and private repos, fast or deep.

Legal

Privacy PolicyCookie PolicyTerms of ServiceSecurity disclosure

Resources

State of MCP SecuritySupportSystem statusMade in Germany 🇩🇪

© 2026 MCPSafe. All rights reserved.

GDPR — Privacy Policy
← Threat Catalog

Configuration & Environment

tools/list endpoint exposed without authentication

MEDIUMCWE: CWE-306Rule: MCP-217

An MCP HTTP transport exposes the `tools/list` endpoint without an authentication check, letting anyone enumerate the server's tool surface. Sibling rules covering the same auth-missing-on-transport family: MCP-209 (manifest declaration), MCP-268 (local HTTP).

What it is

Tool enumeration is the recon step of an MCP attack. Knowing what tools exist tells an attacker which prompt-injection payloads to send, which destructive operations to target, and which credentials might be reachable. Many MCP servers gate tool *invocation* but leave *listing* open under the assumption that knowing tool names is harmless — but it's exactly the information an attacker needs to plan.

Why it matters for MCP

MCP's HTTP transport is becoming common for hosted servers. Unlike stdio (which has implicit transport-level auth via the parent process), HTTP needs explicit authentication on every request. `tools/list` is the most-called method by clients — leaving it unauthenticated is the most common mistake.

Vulnerable example

example.py
1
from fastapi import FastAPI
2
from mcp.server.fastmcp import FastMCP
3
4
mcp = FastMCP("my-mcp")
5
app = FastAPI()
6
7
@app.post("/mcp")
8
async def handle_mcp(request: dict):
9
    # No auth — anyone can call tools/list and enumerate the surface.
10
    return await mcp.handle(request)

Secure example

example.py
1
from fastapi import FastAPI, Header, HTTPException
2
from mcp.server.fastmcp import FastMCP
3
4
mcp = FastMCP("my-mcp")
5
app = FastAPI()
6
7
@app.post("/mcp")
8
async def handle_mcp(request: dict, authorization: str = Header(None)):
9
    if not authorization or not authorization.startswith("Bearer "):
10
        raise HTTPException(status_code=401)
11
    return await mcp.handle(request)

How MCPSafe detects this

MCPSafe flags HTTP route handlers that parse `tools/list` requests without an `Authorization` header check, JWT decode, API key validation, or equivalent gating. Routes wrapped in middleware that checks bearer tokens are exempted.

See the full threat catalog for every documented detection.

Further reading

  • MCP Spec — Authentication
  • CWE-306: Missing Authentication for Critical Function

Scan an MCP server for this issue

MCPSafe runs this check — and every other rule in the catalog — on any MCP server you paste in.

Scan now