# MCP Security Scanner Walkthrough: What a Metadata Scan Misses

> Most MCP security scanners read headers and tool descriptions, then guess. A walkthrough of what MCP Playground's scanner checks at each depth, the tests that actually call your tools (auth bypass, session fixation, input validation, error leaks), and how to read the grade.

**Source:** https://mcpplaygroundonline.com/blog/mcp-security-scanner-walkthrough  
**Author:** Nikhil Tiwari  
**Published:** 2026-11-17  
**Category:** User Guides  
**Reading time:** 10 min read  
**Topics:** mcp security scanner, mcp server security test, mcp security scan, test mcp server authentication, mcp auth bypass, mcp session id security, mcp input validation, owasp mcp top 10 scanner, mcp server security checklist, mcp tool poisoning scan

---

📖 TL;DR

-   A **passive** scan reads metadata only: TLS, headers, auth on the handshake, and tool definitions. It calls no tools.
-   An **authenticated** scan calls your read-only tools to test auth on every call, session handling, input validation, error leaks and limits.
-   When a Server review also runs evals, the agent's real tool responses are scanned for secrets, personal data and injected instructions.
-   Findings marked _heuristic_ are guesses from names and schemas. They are capped at low severity.
-   Attack payloads only run in an **active** scan, against a host you have verified.

## Table of Contents

-   [Why most MCP security scanners only read metadata](#why)
-   [Passive, authenticated and active: what each depth runs](#depths)
-   [Auth on every tool call, not just the handshake](#auth)
-   [Session ids, tokens in URLs and Origin checks](#sessions)
-   [Input validation, error leaks and ignored limits](#inputs)
-   [Scanning what tools actually return](#evals)
-   [Setting up a scan: tokens, read-only tools, public servers](#setup)
-   [How to read the grade and the heuristic findings](#grade)
-   [FAQ](#faq)

Paste an MCP server URL into most _MCP security scanner_ tools and you get a grade in a few seconds. That speed is the clue.

**A few seconds is enough to read headers and tool descriptions.** It is not enough to find out whether the server actually enforces anything.

I see the gap constantly. A server returns 401 on `initialize`, so the scanner says auth is fine. Then `tools/call` works with no token at all.

Or a tool named `delete_post` gets flagged as dangerous. Meanwhile the real problem is a stack trace leaking the server's file paths on every bad input.

This walkthrough covers what the scanner in [MCP Playground](/mcp-security-scanner) checks at each depth. I'll show which tests call your tools, what each finding means, and what you can safely ignore.

If MCP itself is new to you, start with [what the Model Context Protocol is](/blog/what-is-model-context-protocol). The risks behind each check are covered in [the OWASP MCP Top 10 guide](/blog/mcp-security-tool-poisoning-owasp-top-10-mcp-scan).

## Why most MCP security scanners only read metadata

Reading metadata is safe. **Calling someone else's tools is not.** A scanner that calls `delete_record` to "test" it has just deleted a record.

So most scanners stop at what they can see without side effects:

-   TLS version, certificate and the HTTP-to-HTTPS redirect
-   Security headers like HSTS, and CORS behaviour
-   Whether `initialize` and `tools/list` need a token
-   OAuth metadata and token audience binding
-   Tool names and descriptions matched against risky patterns

That last bullet is where the noise comes from. A pattern match sees `curl` in a description and calls it exfiltration.

Often the description is just telling the agent how to upload a file.

**The fix is not more patterns.** It's calling the tools that are safe to call, and watching what the server does.

## Passive, authenticated and active: what each depth runs

The scanner has three depths. Each one adds tests on top of the last:

Depth

Calls tools?

What it adds

**Passive**

No

Transport, headers, auth enforcement, OAuth, tool definitions, session ids, Origin

**Authenticated**

Read-only tools only

Auth bypass on calls, token in URL, input validation, error leaks, limits, leaked secrets, optional AI review of descriptions

**Active**

Read-only tools, with attack payloads

Path traversal, shell and SQL payloads, plus an AI agent that tries to misuse your tools

**Passive is free and unlimited.** The [free MCP security scanner](/mcp-security-scanner) runs the core passive checks with no sign-in.

Signed in, the passive MCP security scan also checks session ids, Origin and tool definitions for leaked keys.

If you pass a token, passive uses it to list tools, but still calls none.

Authenticated scans count against your plan's allowance. The free Hobby plan includes one every 30 days.

Active scans send payloads a server did not ask for. They only run against a domain you have verified, or one you attest you control.

## Auth on every tool call, not just the handshake

This is the test I'd run first on any server I'm about to ship. It needs a token and one read-only tool.

The scanner first calls the tool **with** your token, to confirm it works. Then it tries the same call three ways:

1.  With no `Authorization` header
2.  With an invalid bearer token
3.  With only the `Mcp-Session-Id` from a logged-in session, and no token

If any of those returns a normal result, you get a **critical** finding. The handshake is protected, but the tools aren't.

The third case is the sneaky one. Plenty of servers check the token on `initialize`, store "this session is logged in", then trust the session id after that.

The [MCP security best practices](https://modelcontextprotocol.io/specification/2025-11-25/basic/security_best_practices) say servers must not use sessions for authentication. **Anyone who sees a session id in a log can act as that user.**

The fix is simple: validate the bearer token on every request, including `tools/call`.

## Session ids, tokens in URLs and Origin checks

### Guessable session ids

On servers that use sessions (the 2025-11-25 revision), the scanner opens two sessions and compares the ids. It flags ids that are short, sequential, or built from very few characters.

**Use a random id of at least 128 bits**, such as `crypto.randomUUID()`. The [transport spec](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports) asks for a cryptographically secure id.

### Session fixation

Next it sends `initialize` with a made-up `Mcp-Session-Id`. If the server hands back that same id, that's a **high** finding.

An attacker can plant a known id on a victim, wait for them to log in, then use it.

It also sends a request with an id the server never issued. The spec says that should get HTTP 404. Accepting it is a low finding.

### Tokens accepted in the URL

If a header-less request is refused, the scanner retries with `?access_token=` and `?token=`. A server that accepts either gets a **medium** finding.

URLs end up in server logs, proxy logs and browser history. The [MCP authorization spec](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization) requires tokens in the `Authorization` header only.

### Origin validation

Finally it sends a request with `Origin: https://evil.example`. The spec requires Streamable HTTP servers to validate Origin, which blocks DNS-rebinding attacks.

I report this as **info, not a graded finding**. It matters most for servers that also run on users' machines. A public remote server rarely gets attacked this way.

If you've hit Origin errors while developing locally, [the localhost CORS and Host checks guide](/blog/mcp-localhost-cors-connection-refused) explains where they come from.

## Input validation, error leaks and ignored limits

### Does each tool reject bad input?

For up to eight read-only tools, the scanner sends inputs that break the tool's own `inputSchema`:

-   A required field with the wrong type, like `12345` where a string is expected
-   A required field left out entirely
-   An enum field set to a value that isn't one of the options

If the tool returns a normal result instead of an error, it gets a **medium** finding.

**A tool that runs on input its own schema forbids is where injection bugs get in.**

I don't test extra, undeclared fields. The official SDKs quietly strip them, which is safe, so flagging them would only create noise.

Fix it by validating against the schema before your handler runs: zod in TypeScript, pydantic in strict mode in Python.

### Errors that leak internals

Every rejected call's error text is checked for internals:

-   Node, Python, Java or .NET stack traces
-   Database errors such as `SQLSTATE` or "near ... syntax error"
-   Server file paths like `/usr/src/app/`
-   Internal addresses like `10.x` or `*.svc.cluster.local`

**Error text goes straight into the model's context.** A trace that names your framework and folder layout is a map for the next attacker.

### Limits the server ignores

If a list tool has a `limit`, `page_size` or similar parameter, the scanner calls it with `limit=1`. More than one item back is a medium finding.

That's over-sharing (MCP10 in the [OWASP MCP Top 10](https://owasp.org/www-project-mcp-top-10/)). If the limit doesn't work, nothing bounds how much data enters the model's context.

**Want to see these results for your own server?** Start with the passive checks, no sign-in needed. [Scan your MCP server →](/mcp-security-scanner)

## Scanning what tools actually return

The scanner's own calls are limited. It only calls read-only tools, and it can't invent sensible arguments for every one.

A Server review gets around that. **It runs evals, security and AI Readiness against the same server.**

The evals use an AI agent to answer realistic questions, so it calls tools with real arguments.

When both evals and security run, every tool response in the eval transcripts is also scanned. No extra calls are made.

Found in a response

Severity

An API key, private key or other credential

Critical

Values shaped like SSNs or card numbers

High

Text that reads as instructions to the agent

High

Emails or phone numbers

Low

Emails rate low because evals ask for data on purpose. A `list_users` tool returning emails is often fine. **A card number never is.**

The instruction check is the server-side half of prompt injection.

If your tool relays third-party text that says "ignore previous instructions", every agent reading it is exposed. [The prompt injection guide](/blog/safeguarding-mcp-servers-from-prompt-injection) covers the defences.

New to evals? [What an MCP eval is](/blog/what-is-an-mcp-eval) explains how the agent and the grading work.

## Setting up a scan: tokens, read-only tools, public servers

### Give it a token

Without a token, the scanner can't reach the tools of a protected server. The auth bypass, session and token-in-URL tests all need one.

Use a token for a test account, not your admin key. It's stored encrypted and never shown again.

### Confirm which tools only read

The scanner only calls tools it knows are safe. The server says so with the `readOnlyHint` [tool annotation](https://modelcontextprotocol.io/specification/2025-11-25/server/tools).

Many servers declare no annotations at all. For those, a Server review asks: **which of these tools only read data?**

Tools named like readers (`get_`, `list_`, `search_`) are pre-ticked. Untick anything that writes.

A tool that declares any annotation but leaves out `readOnlyHint` is treated as a writer. That's the spec's default, so it isn't asked about.

**The permanent fix is annotating your tools.** Add `readOnlyHint: true` to readers and `readOnlyHint: false` to writers. Every MCP client benefits, not only the scanner.

### Tell it the server is public on purpose

Some servers are meant to be open. Public legislation, docs search, a weather API. Flagging "no auth" as critical on those is wrong.

In a Server review, when you don't pass a token, there's a **public server** option. With it ticked, missing auth is reported as info.

Tools that look like they change data are still listed in the result, so you can check they're safe for anyone to call.

## How to read the grade and the heuristic findings

The score starts at 100. **Each OWASP category loses points for its single worst finding**: 40 for critical, 20 for high, 8 for medium, 3 for low.

Counting only the worst finding stops ten low notes from sinking you like one critical bug.

90 and up is an A, 80 a B, 65 a C, 50 a D.

### What "heuristic" means

Some findings carry a _(heuristic)_ tag. They come from tool names and schemas, not from anything the server did. Examples:

-   **SSRF risk:** a tool has a `url` parameter
-   **Path traversal risk:** a tool takes a file path
-   **Tool risk:** a tool's name suggests it deletes or executes

These are capped at low severity. Each one tells you what to check yourself.

For a `url` parameter, confirm the tool refuses `localhost`, `10.x` and `169.254.169.254`, and doesn't follow redirects to them.

An MCP security scanner can't prove that safely from outside, so test it yourself.

A delete tool that declares `destructiveHint: true` on a server that enforces auth isn't flagged. **Honest annotations plus auth is the correct setup.**

### What the scan can't see

Two OWASP categories, audit logging and shadow servers, can't be tested from outside. You confirm those yourself in the report.

The scanner also can't test tools it isn't allowed to call.

A clean report on a server with three callable tools says less than one on a server with thirty. The review shows exactly what ran and what was skipped.

## How MCP Playground can help

The [free MCP security scanner](/mcp-security-scanner) runs the passive checks on any URL with no sign-in.

A Server review adds the authenticated tests, the eval response scan and AI Readiness in one run.

If you'd rather click through your tools by hand first, [test any MCP server free in the browser →](/mcp-test-server)

## Conclusion

A metadata scan tells you whether the front door is locked. **It can't tell you whether the windows are open.**

The tests that catch real bugs call your tools: auth on every call, sessions, input validation, error text and limits.

Annotate your tools, give the MCP security scanner a test token, and run it before you ship.

[Scan your MCP server free →](/mcp-security-scanner)

## Frequently asked questions

### What does an MCP security scanner check?

A passive scan checks TLS, security headers, CORS, whether initialize and tools/list need a token, OAuth metadata, and tool definitions for poisoning and leaked keys. An authenticated scan also calls read-only tools to test auth on every call, session handling, input validation, error leaks and limits.

### Will a security scan change data on my MCP server?

Passive and authenticated scans only call tools that are declared read-only or that you confirm only read data. Tools that write are never called. Attack payloads only run in an active scan against a host you have verified.

### Why does my MCP server pass the auth check but fail auth bypass?

The basic check only looks at initialize and tools/list. The auth bypass test calls a real tool with no token, a bad token, or only a session id. Many servers protect the handshake but not tools/call, or trust the session id after login.

### My MCP server is public on purpose. Why is it flagged for missing auth?

The scanner can't tell an open server from one that forgot auth. Tick the public server option when you start the scan, and missing auth is reported as info instead of a finding.

### What does a heuristic finding mean?

It comes from tool names and schemas, such as a url parameter or a delete tool, not from anything the server did. Heuristic findings are capped at low severity and tell you what to check yourself.


---

_Canonical page: https://mcpplaygroundonline.com/blog/mcp-security-scanner-walkthrough — MCP Playground (mcpplaygroundonline.com), the free browser-based tool for testing MCP servers and building AI agents._
