secure-agent-playbook

Play: MCP Server Security Review

Audit Model Context Protocol (MCP) server configurations and implementations for security vulnerabilities including overpermissioning, injection risks, and data exposure.

Trigger Conditions

Use this skill when:

Inputs

Procedure

1. Transport & Authentication Review

Check Risk What to Look For
Transport type Varies stdio (local) vs HTTP/SSE (network). Network transports need auth.
Authentication HIGH if missing Is there auth on HTTP/SSE endpoints? Token-based? mTLS?
TLS HIGH if missing Is HTTPS enforced for network transports?
CORS MEDIUM For HTTP transports, are CORS headers restrictive?
Origin validation HIGH Does the server validate the client’s origin?

2. Tool Permission Audit

For each tool the MCP server exposes:

Tool: [name]
Description: [what it claims to do]
Parameters: [schema]
Actual capability: [what it ACTUALLY does — read source code]
Risk level: [READ-ONLY | MUTATION | DESTRUCTIVE | NETWORK | CREDENTIAL-ACCESS]
Least privilege: [Does the tool do more than its description suggests?]

Flag:

3. Input Validation & Injection Analysis

For each tool’s parameters:

Check the parameter schema:

4. Data Exposure Assessment

5. Scope & Sandboxing

6. Supply Chain Assessment

7. Configuration Review

Check the client-side MCP configuration:

Output Format

## MCP Server Security Review: [Server Name]

### Server Overview
- **Transport**: stdio | HTTP/SSE
- **Tools exposed**: [count]
- **Resources exposed**: [count]
- **Language/Runtime**: [Node.js, Python, etc.]
- **Source**: [repo URL or "local/custom"]

### Tool Risk Matrix
| Tool | Capability Type | Input Validation | Risk Level |
|------|----------------|-----------------|------------|
| tool_name | READ-ONLY | Schema-validated | LOW |
| tool_name | MUTATION | Free-form string | HIGH |

### Findings
[Standard finding template for each issue]

### Configuration Recommendations
[Specific config changes to reduce risk]

OWASP References