Abbi Labs

Guides

Is your MCP server open to anyone? Check if a stranger can list your tools in one request

By Abbi Labs · Last updated 22 November 2026

Scan your app free and see if your MCP endpoint lists its tools to strangers.

The free quick check tries the standard MCP handshake (initialize, then tools/list) on /mcp, /api/mcp, /sse, /.well-known/mcp and /.well-known/mcp.json, without calling any tool. It also checks secret keys in your JavaScript, Supabase tables readable with your public key, exposed .env and .git files, security headers, CORS, cookie flags and TLS expiry. Read-only. No sign-up.

No app handy?

No sign-up. Read-only public-resource and protocol metadata checks. No model prompts or tool execution. Scan only sites you own or are allowed to test.

Run on every deploy or use from Cursor / Claude Code via MCP →

Weekly AI-app security checklist

One short email a week: a practical check for apps built with Supabase, Next.js and AI tools (RLS, leaked keys, headers and more). Unsubscribe anytime.

You asked your AI builder to "add an MCP server so Claude can use my app". It added a route at /mcp, you connected it from Cursor, the tools showed up, done. Did anything ask you to sign in when you connected? If not, the same URL works for anyone who guesses it, and /mcp is the first thing anyone guesses.

Protocol details below are from the MCP spec's transports, authorization and security best practices pages (version 2025-11-25), checked 22 November 2026. Only test servers you own.

Why an MCP server ends up public

Test it with curl (2 minutes)

Step 1: initialize, with no credentials. -i shows the status and headers.

curl -i -X POST https://your-app.com/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"self-test","version":"1"}}}'

Step 2: if you got a 200, copy the MCP-Session-Id response header (if there is one), confirm initialization, then ask for the tool list.

SID='paste-session-id-here'
curl -s -X POST https://your-app.com/mcp \
  -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
  -H "MCP-Session-Id: $SID" -H 'MCP-Protocol-Version: 2025-11-25' \
  -d '{"jsonrpc":"2.0","method":"notifications/initialized"}'

curl -s -X POST https://your-app.com/mcp \
  -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
  -H "MCP-Session-Id: $SID" -H 'MCP-Protocol-Version: 2025-11-25' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

Don't call tools/call against production to "see what happens". If a tool writes or spends, test that in a staging copy.

Reading the result

How to lock it down

  1. Require auth before initialize if the server isn't meant to be public. For servers that Cursor, Claude Code and other clients connect to, the spec's way is OAuth: return 401 with resource_metadata, and serve protected resource metadata (RFC 9728) that points at your authorization server.
  2. Check the token is for this server. The authorization spec says MCP servers MUST validate that access tokens were issued for them as the intended audience. A valid token for some other app isn't enough.
  3. Don't pass the client's token through. Forwarding it to your other APIs is "token passthrough", which the security best practices say is explicitly forbidden. Use the server's own scoped credentials upstream.
  4. Check permissions inside every tool. Signed in isn't the same as allowed. A get_invoice tool should only return the caller's invoices, the same rule as "any signed-in user" RLS policies. Never give a tool the Supabase service role key and trust the model to filter.
  5. Validate Origin and rate limit. Servers MUST validate the Origin header (403 if it's present and invalid). Add per-user limits on anything that sends email or calls a paid model.
  6. Local servers: bind to 127.0.0.1. Not 0.0.0.0. The spec calls this out with DNS rebinding as the reason.

A prompt you can paste into Cursor or Claude Code:

Review my MCP server. 1) Require authentication before initialize and tools/list; unauthenticated requests get 401 with a WWW-Authenticate Bearer header that includes resource_metadata. 2) Validate the token audience is this server. 3) Never forward the client's token to other APIs. 4) In every tool, check the caller is allowed to touch the specific record (own data only) and never use the service role key without that check. 5) Validate the Origin header, rate limit per user. List every tool that writes data, sends messages or spends money, and show me the check each one does.

What Abbi Labs checks

Honest scope: the free quick check sends a standard initialize and tools/list to five common paths (/mcp, /api/mcp, /sse, /.well-known/mcp, /.well-known/mcp.json) with no credentials. If tools come back, it reports "MCP tools listed without authentication" as low severity with the tool count, not the names. It never calls a tool, so it can't tell you whether execution is protected. Servers on a custom path and legacy SSE-only servers aren't covered. When we ran it on abbilabs.xyz, it flagged our own /mcp: our scan_url tool is public on purpose and rate limited, which is exactly the call this finding asks you to make deliberately. The same scan covers keys in your JavaScript, Supabase tables a stranger can read, exposed .env and .git, headers, CORS, cookie flags and TLS.

Scan your app free

FAQ

Does an MCP server need authentication?

The MCP spec says authorization is optional, and the transport section says servers SHOULD implement proper authentication for all connections. So nothing forces it. If your server is meant for you, your team or your logged-in users, it needs it. A public tool server can be fine, but then every tool has to be safe for a stranger to call.

How do I check if my MCP server is public?

Send a JSON-RPC initialize request with curl to your MCP endpoint (often /mcp) with no credentials. A protected server answers 401 Unauthorized. If you get a 200 with serverInfo and capabilities, follow up with tools/list. If that returns your tool names and schemas, anyone on the internet can see them.

Is listing tools without auth a vulnerability?

Not by itself. Some servers are public on purpose (ours is). The risk is what the tools do. If a stranger can call a tool that reads customer data, sends email, writes to a database or spends API credits, that's the real problem. Listing the tools just tells them where to look.

What should a protected MCP server return?

Per the MCP authorization spec, a 401 Unauthorized with a WWW-Authenticate header pointing at your OAuth protected resource metadata (resource_metadata="https://your-app/.well-known/oauth-protected-resource"). MCP clients like Cursor and Claude Code read that to start the sign-in flow.

Can my MCP server just forward the user's token to my other APIs?

No. The MCP security best practices call this token passthrough and say it's explicitly forbidden. The server must only accept tokens issued for it (check the audience), and use its own credentials for upstream APIs.

Does this apply to local MCP servers?

Partly. A stdio server runs as a subprocess and has no network endpoint. A local HTTP server should bind to 127.0.0.1, not 0.0.0.0, and must validate the Origin header, or a website you visit can reach it through DNS rebinding.

Does Abbi Labs call my MCP tools?

No. The scan sends only initialize, notifications/initialized and tools/list to five common paths, and never calls a tool, resource or prompt. The report says how many tools were listed but withholds their names and schemas.

Related guides

Weekly AI-app security checklist

One short email a week: a practical check for apps built with Supabase, Next.js and AI tools (RLS, leaked keys, headers and more). Unsubscribe anytime.