Audit your MCP servers

mcp-audit reads the MCP configuration of your AI tools and tells you which servers download unpinned code, which keys sit in plain text and which tools run without asking. It runs on your machine, makes no network request and has no dependencies.

npx -y @asterionsec/mcp-audit@0.1.0

What it checks

Each finding names the file and the setting, says what the risk is and what to change. Credentials are shown masked: only their first characters and length.

  1. MCP-PIN-001

    Medium

    Server package is not pinned to an exact version

    npx, bunx, pnpm dlx, uvx, pipx run or a container image without an exact version or digest: the client runs whatever the registry serves at each start.

  2. MCP-PIN-002

    High

    Server runs code from a git branch or URL

    Code fetched from a repository or a URL without a commit hash, so whoever controls that branch decides what runs.

  3. MCP-SEC-001

    High in a repository, medium elsewhere

    Credential stored in plain text

    API keys, tokens and passwords in env, headers, arguments or URLs, recognized by format (GitHub, OpenAI, Anthropic, AWS, Slack, Stripe, Google, Supabase and more) or by name. References like ${VAR} are not flagged, and values are always shown masked.

  4. MCP-NET-001

    High

    Remote server over an unencrypted connection

    A non-local server reached over http:// or ws://, so tool calls, results and credentials travel in the clear.

  5. MCP-FS-001

    High

    Filesystem server can reach the whole disk or home directory

    A filesystem server given /, ~, the home folder or a drive root, which includes SSH keys, cloud credentials and every project.

  6. MCP-DOCKER-001

    High

    Container started with host-level access

    --privileged, the Docker socket, the host root, the host network or PID namespace, or dangerous capabilities.

  7. MCP-EXEC-001

    High

    Server is installed by piping a download into a shell

    A launch command that downloads a script and runs it at every start.

  8. MCP-APPROVE-001

    Medium, high for every tool

    Server tools run without asking

    Gemini CLI trust: true, or Cline and Roo autoApprove and alwaysAllow lists.

  9. MCP-APPROVE-002

    Medium, high for every server

    Permission rule allows a whole MCP server

    Claude Code permission rules such as mcp__github or mcp__* that let every tool run without confirmation.

  10. MCP-APPROVE-003

    Medium

    Project MCP servers start without approval

    enableAllProjectMcpServers, which starts the servers of any repository you clone.

  11. MCP-FILE-001

    Medium

    Configuration file is writable by other users

    Another account on the machine could add servers that your client starts with your permissions.

  12. MCP-FILE-002

    Medium

    File with credentials is readable by other users

    A file that holds a plain-text credential and that other accounts can read.

  13. MCP-READ-001

    Info

    Configuration file could not be read

    The file exists but is not valid for its format, so its servers were not audited.

With --probe: what the tools say about themselves

The rules above read configuration only. --probe starts each local server the way your client would, asks for its tool list and stops it. It runs the servers' code, as your client does at every start; remote servers are not contacted.

  1. MCP-TOOL-001

    High

    Hidden characters in a tool

    Zero-width, bidirectional or Unicode tag characters in a tool's name, description or schema, where instructions can hide from the user.

  2. MCP-TOOL-002

    High

    Tool description instructs the model

    Text that tells the model to hide things from the user, ignore other instructions or read keys: the pattern of tool poisoning.

  3. MCP-TOOL-003

    Medium

    Two servers expose the same tool name

    One server can shadow another, so the agent calls an implementation you did not expect.

Run it where you work

  • On your machine

    Reads every supported client's configuration for your user and the project in the current folder: Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI, VS Code, Windsurf, Cline.

    npx -y @asterionsec/mcp-audit@0.1.0
  • In CI, with GitHub code scanning

    Audits the project's own MCP files on every push and shows the findings as code scanning alerts.

    npx -y @asterionsec/mcp-audit@0.1.0 --no-defaults --project . --sarif > mcp-audit.sarif
  • As an MCP server for your agent

    One read-only tool, audit_mcp_configs. It never starts other servers, so a prompt cannot make the agent run them.

    { "mcpServers": { "mcp-audit": { "command": "npx", "args": ["-y", "@asterionsec/mcp-audit@0.1.0", "--mcp"] } } }

What it cannot see

  • What a server does once it runs. A pinned, local, well-configured server can still be malicious; --probe only checks what it says about its tools.
  • A secret with no known format under a neutral name, such as OPTIONS=… .
  • Tools of remote servers: --probe lists local stdio servers only.

Every pentest starts with a conversation

Tell us how your agent works and what it can reach. A person on the team writes back.