mcp_server_audit
Statically scan an MCP server Python file to identify security risks such as shell execution, filesystem writes, and code injection. Returns a structured audit report without running the code.
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 |