MCP / Agent Permission Auditor

Inventories permission declarations in selected Python, MCP JSON, and SKILL files using static evidence.

Input
A selected directory containing supported source or configuration files
Output
A JSON inventory with evidence categories, incomplete-scan markers, and no customer-code execution.

What it does

  • Separates declared, statically observed, and inferred permissions
  • Reports incomplete scans and structured errors
  • Does not claim runtime behavior from static declarations

Overview

MCP / Agent Permission Auditor is a read-only Python 3.11+ CLI that compares permissions declared in JSON or SKILL files against statically observed capability call syntax (such as subprocess execution) inside an agent or MCP server project. It never modifies files or executes target code, and separates declared permissions, statically observed calls, and inferred items cleanly in JSON output.

When to use it

  • Auditing a third-party or internally generated MCP server or AI agent skill before granting it local workspace access.
  • Checking whether a project declares capabilities (like Terminal/Shell) that match the subprocess or execution calls visible in source files.
  • Running a fast, offline, zero-dependency permission inventory in CI or local agent governance reviews.

Audit declared and observed permissions

Needs Python 3.11 or newer and only the standard library. Run from the package directory and point it at the project directory.

python3 tool.py /path/to/project

Sample output

Abridged output from the 0.1.0 package, run on a small synthetic fixture. The project declared Terminal/Shell in a JSON file and called subprocess.run.

{
  "complete": true,
  "declared": [
    {
      "file": "package.json",
      "permission": "Terminal/Shell"
    }
  ],
  "statically_observed": [
    {
      "capability": "process_execution",
      "file": "agent.py",
      "line": 2,
      "basis": "call syntax; runtime execution unverified"
    }
  ],
  "inferred": []
}

Exit codes and limits

  • Exit 0 means the inspection completed, not that permissions are approved. Exit 2 means incomplete inspection or invalid input.
  • Observed means the call syntax was seen, never that it ran.
  • Declarations are read from JSON permissions arrays and simple SKILL inline lists; general YAML or TOML is not supported.
  • No files are changed.

Questions

What does statically_observed mean in the MCP Permission Auditor report?

It means the auditor saw matching capability call syntax (for example, subprocess.run at a specific file and line). It never means that the code actually ran or that runtime execution was verified.

Which permission declaration formats are supported?

Declarations are read from JSON permissions arrays and simple SKILL inline lists. General YAML or TOML manifests are not supported.

Does exit code 0 mean the MCP server or agent is approved as safe?

No. Exit 0 means the static inspection completed cleanly (complete: true). Exit 2 means the inspection was incomplete or the input was invalid.

Does MCP Permission Auditor modify any project files or execute agent code?

No. It runs read-only on Python 3.11+ using only the standard library, making zero file edits and zero network requests.