Home / Market / mcp implementation security review

mcp implementation security review

Review the implementation source code of MCP (Model Context Protocol) servers, clients, and tool handlers against a security baseline — authentication, sessions, rate limiting, input-schema validation, official-SDK usage, RCE vectors, and the OWASP MCP Top 10 — producing a report with file/line evidence. Use this skill when: - Reviewing an MCP server implementation for security before release - Checking a server against the baseline controls (MCP-01 to MCP-05) and the OWASP MCP Top 10 - Auditing

skill★ 417940 dlgithubMITInstall in CosmosUpstream Source

Documentation & Preview

--- name: mcp-implementation-security-review description: | Review the implementation source code of MCP (Model Context Protocol) servers, clients, and tool handlers against a security baseline — authentication, sessions, rate limiting, input-schema validation, official-SDK usage, RCE vectors, and the OWASP MCP Top 10 — producing a report with file/line evidence. Use this skill when:

---

MCP Implementation Security Review

Process

Step 1 — Classify the target

Completion criterion: Target type, protocol status, and transport are identified.

Step 2 — Filter false positives

Completion criterion: Remaining evidence is in-scope code, repo-owned docs, or public API behavior.

Step 3 — Check baseline controls

Completion criterion: Each applicable control has a supported status.

Step 4 — Check RCE vectors

Completion criterion: Every relevant tool has an RCE result or explicit N/A.

Step 5 — Check OWASP MCP Top 10

Completion criterion: All 10 OWASP risks have outcomes supported by observable evidence or referenced from Step 3.

Step 6 — Report

Completion criterion: The report includes controls, RCE, optional OWASP, and actions.

Reference

Decision rules

Transport classification

Network-exposed (enforce all controls):

| Pattern | Transport | |---|---| | transport="http" or transport="sse" | HTTP/SSE | | StreamableHttpServerTransport | HTTP (TS/JS) | | SSEServerTransport | SSE (TS/JS) | | WithHttpTransport() | HTTP (C#) | | host="0.0.0.0" | All-interfaces binding | | Express .listen(port) with MCP routes | HTTP (default 0.0.0.0) | | EXPOSE in Dockerfile + MCP server | Network-exposed |

Local-only (best practices only):

| Pattern | Transport | |---|---| | StdioServerTransport | STDIO (TS/JS) | | WithStdioServerTransport() | STDIO (C#) | | transport="stdio" | STDIO | | mcp.run() with no args (Python FastMCP) | STDIO default | | .vscode/mcp.json with command key and no URL | STDIO child process |

Host binding gotchas:

| Binding | Actual exposure | |---|---| | host="0.0.0.0" | 🔴 Network-exposed | | host="127.0.0.1" or localhost | 🟢 Local-only | | No explicit host (Express/Node) | 🔴 Defaults to 0.0.0.0 | | No explicit host (Python FastMCP) | 🟡 Depends on transport — verify | | Docker ports: "8000:8000" | 🔴 Network-exposed even if the process binds 127.0.0.1 inside the container |

False Positive Filters

| FP pattern | How to detect | |---|---| | .github/skills/ templates | Path contains .github/skills/ — skill template, not server code | | Vendored SDK / OSS copies | File defines class FastMCP, class McpServer, or path is in node_modules/, vendor/ | | MCP client configs | .vscode/mcp.json with inputs/servers but no server code | | Documentation / tutorials | .md, .rst with code fences unrelated to the repo's own server | | Outbound-only auth libraries | DefaultAzureCredential, service account JSON, or similar used only for outbound auth |

Docs describing the repo's own server behavior, transport, auth posture, or deployment are not false positives.

Controls Reference

MCP-01 — Identity isolation

Scope: Remote MCP servers

Condition

What to check

Key pitfall: Shared application identities or forwarded caller tokens break identity isolation and create confused-deputy paths.

MCP-02 — Sessions

Scope: Remote MCP servers that support sessions

Applicability

Condition

What to check

Key pitfall: Treating a session ID as a bearer credential turns a correlation token into authentication.

MCP-03 — Rate limits

Scope: MCP servers and tools

Condition

What to check

Starting thresholds (tune to actual load, downstream limits, and cost):

| Tool type | Per-identity | Per-session | Notes | |---|---|---|---| | Read-only / listing | 100/min | 200/min | Lower if downstream APIs are sensitive | | Mutation / write | 10/min | 20/min | Stricter for state-changing ops | | High-cost compute | 5/min | 10/min | Cost-weighted; watch cloud spend | | Tool discovery | 30/min | 60/min | Prevents enumeration abuse |

Key pitfall: Gateway-only throttling or one flat bucket leaves bypasses and under-protects expensive tools.

MCP-04 — Schema validation

Scope: MCP servers exposing tools with structured arguments

Condition

What to check

Key pitfall: Allowing extra properties or client-only validation creates hidden attack surface and scope creep.

MCP-05 — SDK-first

Scope: Remote MCP servers

Condition