mcp_server_audit
Statically audits MCP server Python files by enumerating tools registered via decorators and reporting security risks including shell execution, filesystem writes, network egress, and code injection.
Instructions
Statically audit an MCP server Python source file.
Enumerates tools registered with FastMCP-style @*.tool() decorators (and
imperative mcp.tool()(fn) calls) and reports risk findings per tool:
shell execution, filesystem writes, network egress, code injection,
over-broad parameter types, and ambiguous/short descriptions.
Args: path: Absolute path to a Python file defining an MCP server. max_bytes: Reject files larger than this (default 5 MB). Prevents DoS via huge input. Pass a larger value if you need to audit a big monolith, but consider splitting it first.
Returns:
Structured audit report (see AuditReport schema). Does NOT execute
the target file. Includes a coverage block and limitations list
— absence of finding is NOT proof of safety.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| max_bytes | No |