How do you check whether your MCP server is exposed, using an AI agent?
AdminKit's check_mcp_endpoint tool lets an AI agent send a real, unauthenticated initialize and tools/list probe at an MCP server URL you give it, the same anonymous-access check behind AdminKit's public MCP exposure check, so you learn whether your server answers strangers before an attacker does.
By AdminKit team, Netbase JSC · Updated
Key takeaways
check_mcp_endpointlets an AI agent test whether an MCP server answers a client that presents no credentials, and which tool names it then reveals.- The probe sends
initialize, thentools/listonly ifinitializesucceeded, plus read-only requests for OAuth metadata. It never calls a tool. - A server that rejects the anonymous
initializecomes backokwith a score of 100. An open server comes backfailwithmcp.no_auth_required, and usuallymcp.tools_exposed_anonymouslytoo. - For a server that is not on the internet, run
adminkit-mcp probelocally with--allow-private. The Check API probes from AdminKit’s network, so it cannot reach your private servers.
How do you install the connector and ask your agent?
AdminKit’s open-source adminkit-mcp connector (MIT, PyPI, MCP Registry id io.github.netbasecorp/adminkit-mcp) exposes check_mcp_endpoint as a real tool any MCP-capable AI agent can call. No account or hosted endpoint is required — you run it yourself:
uvx adminkit-mcp
Point your agent’s MCP client config at that command (stdio), add it to Claude Desktop, Claude Code, or any other MCP client, and ask it in plain language. In Claude Code, for example, the claude mcp add command registers a local stdio server, with everything after -- passed through as the command to run:
claude mcp add --transport stdio adminkit -- uvx adminkit-mcp
Then ask:
“Use check_mcp_endpoint to check whether
https://mcp.example-internal-tool.test/mcprequires authentication, and tell me what tools it exposes if it doesn’t.”
The agent calls the tool with your URL as the url argument. Your client will normally show you the call and ask for approval first; check that the URL is the server you meant. See connect an AI agent to AdminKit’s MCP server if you haven’t installed and wired it up yet.
What does the tool actually do?
check_mcp_endpoint tries AdminKit’s live Check API first (/v1/check/mcp-endpoint); if that specific call is briefly unreachable, it falls back to a local, self-contained probe that speaks just enough MCP to do the same two things: send initialize with no credentials, and if that succeeds, send tools/list to read the tool names. It never sends tools/call — this is reconnaissance, not a scanner that exercises your tools. Both paths are AdminKit’s own code, and they differ in a few details:
| Check API path (normal) | Local fallback path | |
|---|---|---|
| Where the probe runs | AdminKit’s API servers | The machine running adminkit-mcp |
| Transports tried | Streamable HTTP; legacy SSE support noted as evidence | Streamable HTTP, then legacy HTTP+SSE |
| Extra checks | CORS preflight: flags a wildcard origin combined with credentials | Flags an endpoint served over plain HTTP |
| Servers on your localhost or private network | Not reachable: the probe runs from AdminKit’s network, not yours | Refused with status skipped unless allow_private is set |
Unexpected initialize status | Reported as error | Treated as not open |
Both paths read the server’s OAuth protected-resource metadata if it publishes one, which the MCP authorization specification requires of HTTP servers that use authorization, and record it as evidence. Neither path ever sends your AdminKit API key to the server being probed: the fallback deliberately uses a separate HTTP client with no AdminKit headers.
Which findings can come back?
| Finding id | Severity | Meaning |
|---|---|---|
mcp.no_auth_required | high | initialize succeeded with no credentials |
mcp.tools_exposed_anonymously | medium | tools/list then returned the tool list |
mcp.dangerous_tool_exposed | critical | A tool name suggests shell, file or network access, such as one containing exec, shell or delete |
mcp.unsafe_cors | medium | Check API path: Access-Control-Allow-Origin: * together with Access-Control-Allow-Credentials: true |
mcp.no_tls | medium | Local path: the URL uses http:// |
The score starts at 100 and drops by 40, 25, 15 or 5 points for each critical, high, medium or low finding. Any high or critical finding makes the status fail; lower-severity findings alone make it warn.
What does a response look like?
The example below is illustrative, not a live scan of anyone’s server. It uses the documentation domain example.com and shows the shape check_mcp_endpoint returns on the Check API path when a server correctly rejects an unauthenticated initialize with 401 and a WWW-Authenticate header, as the MCP authorization specification requires:
{
"tool": "check_mcp_endpoint",
"status": "ok",
"result": {
"check": "machine.mcp",
"target": "https://mcp.example.com/mcp",
"summary": "no anonymous access found",
"findings": [],
"score": 100
},
"evidence": {
"tls": true,
"initialize_status": 401,
"auth_required": true,
"www_authenticate": "Bearer resource_metadata=\"https://mcp.example.com/.well-known/oauth-protected-resource\""
},
"fix_hint": null,
"report_url": "https://adminkit.net/tools/mcp-check/?utm_source=mcp"
}
If initialize instead succeeds with no credentials, status becomes "fail", findings lists at least mcp.no_auth_required (and mcp.tools_exposed_anonymously once tools/list returns), and evidence adds the tool names the server revealed. The top-level fix_hint then carries the first finding’s fix, which for an open server points to requiring OAuth 2.1 or another credential. How to read an MCP endpoint check result walks through reading an “open” result like that in depth, including why specific tool names matter more than the pass/fail label alone.
How do you check a server that is not on the internet?
Many MCP servers start life on a developer laptop or an internal network. The Check API cannot see those, and it should not: a public service that probes private addresses on request would be a server-side request forgery risk. For these servers, run the probe yourself, from a machine that can reach the server:
uvx adminkit-mcp probe http://127.0.0.1:8900/mcp --allow-private
This one-shot command prints the probe’s JSON result and exits, without starting an MCP server. It always runs locally, never through the Check API. Leave out --allow-private for public URLs; with it off, any hostname that resolves only to private, loopback, link-local or reserved addresses is refused before a request is sent.
A local server that answers anonymously is not automatically safe just because it is local. The Streamable HTTP transport section of the MCP specification says servers must validate the Origin header to prevent DNS rebinding, should bind only to 127.0.0.1 when running locally, and should authenticate all connections. Without those, a web page open in a browser on the same machine can reach the server. Local model servers raise the same question; Is port 11434 (Ollama API) exposed? covers Ollama’s API, which needs no authentication.
What doesn’t the probe tell you?
An ok result is a statement about one request from one place at one moment. It is worth knowing exactly where that statement stops:
- It does not test your authorization flow. A rejected anonymous
initializeshows the front door is locked. It says nothing about whether the server checks that each token was issued for it, which the MCP authorization specification requires, or whether scopes are enforced per tool. - It does not read tool descriptions. The probe records tool names only. Hidden instructions in a description are a separate risk, covered in how to check for MCP tool poisoning.
- It does not call tools. If a server let anonymous clients call some tools while hiding them from
tools/list, this probe would not find out, by design. - It does not watch for changes. A redeploy, a new reverse proxy rule or a debug flag can reopen a server after a clean result. Ask your agent to re-run the check after each deployment, or run the GitHub Action on a schedule.
Why ask an agent instead of running the website check?
Running the check through an agent means the result comes back as structured data (result, evidence, fix_hint, report_url) the agent can reason over directly — useful for an agent that monitors several MCP servers, gates a deploy on the result, or explains the finding to you in context, rather than you reading a web page and copying the answer back in by hand. The Model Context Protocol specification defines tools as exactly this: a mechanism for an agent to take a real, structured action and get a structured result back, not just render a page for a human. The local fallback path uses the same probe that AdminKit’s GitHub Action runs in CI, so the findings and scores line up across the two.
The MCP endpoint check page is still the quickest option for a one-off look from a browser. The agent route earns its place when you check the same servers repeatedly, or when the result should feed a decision the agent is already helping with.
What should you do with an open result?
If your result shows the server accepted initialize with no credentials, that’s the signal to restrict network access or add authentication before anything else — any agent or script that finds the URL can currently read the tool list. The OWASP Top 10 for LLM Applications names prompt injection (LLM01) and excessive agency (LLM06) among its risks, and an anonymous tool list feeds both: it is a map of what an unauthenticated caller could ask an agent to do next if tools/call were also open.
| Result | Next step |
|---|---|
fail, server meant to be private | Close network access or require authentication now; then re-run the check |
fail, server meant to be public | Confirm every exposed tool is read-only or needs confirmation; remove high-risk tools from the anonymous list |
warn only (mcp.unsafe_cors or mcp.no_tls) | Fix the CORS headers or serve over HTTPS |
ok | Authentication blocks anonymous clients; review the rest of the authorization setup |
skipped or error | Check the URL, and whether the server is reachable from where the probe ran |
For the fuller hardening checklist beyond authentication alone, see how to secure an MCP server; for what AdminKit’s AI agent builders solutions page covers once you’re building the agent side rather than just checking exposure, see that page. This exposure check sits alongside the other checks in AdminKit’s AI agents & MCP cluster, which covers connecting, securing, and monitoring MCP servers and the agents that call them.
This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.
Frequently asked questions
Which real tool does this use, and does it call a third-party server?
check_mcp_endpoint, one of the 15 tools in adminkit-mcp (PyPI, MIT). It never calls a third-party server on your behalf for this guide's examples — point it at a server you own, or at a local fixture, the same way the tool's own test suite does. The tool itself is built to accept any URL you give it, including a target you don't own, but probing a server you don't control or aren't authorized to test can violate its terms of use even though this check never calls tools/call.
Do I need the hosted mcp.adminkit.net endpoint for this?
No. This guide uses the open-source adminkit-mcp connector, which you install and run yourself with uvx adminkit-mcp — your agent talks to that local process, which in turn calls AdminKit's live Check API (api.adminkit.net).
What does the probe actually send, and what does it never send?
It sends a real initialize call with no credentials, and if that succeeds, a tools/list call to read the tool names your server exposes. It also makes read-only GET requests for the server's published OAuth metadata. It never sends tools/call, so it cannot trigger a file write, a database query or a shell command on the server being checked — see how to read an MCP endpoint check result for the full breakdown of what each outcome means.
Will this flag a server that's supposed to be open to anonymous callers?
It reports the fact — initialize succeeded without credentials, and what tools/list revealed — without judging intent. A public demo server with only read-only tools is a different risk than an internal automation server with destructive tools left open; the tool hands back the evidence, and reading the tool names in context is how that judgment call gets made.
Can it check an MCP server that only runs on localhost or my private network?
Not through the Check API, which probes from AdminKit's own network and so cannot reach a server on your localhost or private network. Run the one-shot command uvx adminkit-mcp probe <url> --allow-private on a machine that can reach the server instead; it runs the same probe locally. Without --allow-private, the local probe refuses any hostname that resolves only to private or loopback addresses and returns status skipped.
Want AdminKit to watch this for you?
Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.
Talk to an expert
Huy Nguyen (David), Founder & CEO, Netbase JSC
Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.