Skip to main content
Glama
x0base

mcp-security-toolkit

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

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
max_bytesNo
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully discloses behavior: it does not execute the file, includes limitations, and notes that absence of findings is not proof of safety. This is comprehensive and honest.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is detailed but well-structured with bullet points for risk findings and clear parameter explanations. It could be slightly shorter, but every sentence serves a purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description references an 'AuditReport' schema and mentions coverage and limitations. It is sufficient for the tool's complexity, though more detail on the report structure would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description adds full context: 'path' is the absolute path to a Python file, 'max_bytes' has a default of 5 MB with rationale for DoS prevention and advice for large files. This exceeds schema information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it 'Statically audit an MCP server Python source file' and enumerates specific risk findings (shell execution, filesystem writes, etc.). It distinguishes itself from siblings by being the only tool focused on static analysis of MCP servers.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides context on when to use (static audit), explains non-execution (safe), and details the max_bytes parameter for preventing DoS. It lacks explicit when-not-to-use but is otherwise clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/x0base/mcp-security-toolkit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server