Agent Permission Graph

See what your AI agent can reach: MCP servers, commands, files, network and secrets – with risks.

Secret values are masked and never returned. You can replace them with dummy values before pasting.

More options

One per line, e.g. mcp__github__create_issue, github.*, filesystem/*.

Try an example:

More about this tool

Part of Agentlab AI infrastructure & agent explorers

How it works

Paste an agent or MCP client configuration (Claude Desktop, Claude Code, Cursor, Windsurf, Cline, VS Code mcp.json, Zed) plus optional allow/deny rules and file roots. The tool draws a graph agent → servers → capabilities (commands executed, filesystem paths, network endpoints, secrets by name only) and flags risks: plaintext secrets, tokens on the command line, whole-disk or home-directory access, credential folders, unpinned packages, privileged containers, remote servers without auth or TLS, and auto-approve settings. Secret values are never shown.

  • Recognised shapes: mcpServers (Claude Desktop, Claude Code, Cursor, Windsurf, Cline), servers (VS Code mcp.json), mcp.servers (VS Code settings), context_servers (Zed). JSONC comments and trailing commas are accepted. Per server: command/args/env/cwd (stdio) or url/serverUrl/httpUrl/headers (remote), disabled, autoApprove/alwaysAllow, trust.
  • Capabilities: the executed command (and the package/image for npx, uvx, pipx, bunx, docker), filesystem paths in arguments and docker volume mounts, URLs, and secrets – environment variables and headers whose NAME looks like a credential.
  • Secrets are identified by name (KEY, TOKEN, SECRET, PASSWORD…) and by well-known token formats (sk-, ghp_, github_pat_, xox*, AKIA, glpat-, AIza, JWTs, private keys, URL credentials). Values are never output: they are replaced by ***. References like ${input:…}, ${env:…}, $VAR and placeholders do not count as plaintext.
  • Findings: tokens in args (visible in the process list), plaintext secrets in config, wide roots (/, ~, $HOME, C:\, /Users…), credential folders (~/.ssh, ~/.aws…), shells, unpinned packages/images, privileged containers or docker.sock, remote servers over HTTP or without auth headers, and auto-approve rules (incl. allow rules such as mcp__server__*).
  • The graph shows up to 60 nodes; extra capabilities per server are collapsed into a “+N more” node (full lists are in the result).

Use this tool in an app

These free programs for your browser have this tool built in, next to everything else the task needs.

  • Agentlab AI-agent & LLM workbench

    Test an AI agent before release: permissions, traces, costs, citations and output checks.

    Open Agentlab

Related tools

  • MCP Server Explorer – Inspect any MCP server before you connect an AI agent: tools, permissions, risks, changes over time.
  • AI Agent Tool Explorer – Index of tools AI agents can call: this site, the MCP Registry or your definitions, by capability.
  • AI Tool-Call Trace Explorer – Paste an agent transcript: see every tool call in order, with errors, timings, retries and loops.

How to use the Agent Permission Graph

Paste an MCP client config (Claude, Cursor, VS Code, Zed…) and see every command, folder, endpoint and secret your AI agent can reach, with risks.

What it is for

Connecting an AI agent to MCP servers is a few lines of JSON. Those lines decide a lot: which programs run on your machine, which folders the agent can read and write, which APIs it can call with your tokens, and which actions it may take without asking. After a few copy-pasted snippets from READMEs, few people remember what their config actually allows.

Paste your agent or MCP client configuration. Claude Desktop, Claude Code, Cursor, Windsurf, Cline, VS Code mcp.json and Zed formats are recognised, and JSONC comments are fine. Optionally add your allow/deny tool rules and file roots. The tool draws a graph from agent to servers to capabilities: commands executed, filesystem paths, network endpoints, and secrets (by name only). It flags the common mistakes:

  • Plaintext tokens, or tokens on the command line
  • Home-directory or whole-disk access, and credential folders
  • Shells and unpinned packages
  • Privileged containers
  • Remote servers without auth or TLS
  • Auto-approve rules

Secret values are never shown. They are replaced by ***. You can also swap them for dummy values before pasting. The tool analyses the configuration, not the servers' code: a server can still do more than its config suggests.

Worked example

The built-in example is a Claude Desktop config with five servers and dummy secrets. It also has an allow rule mcp__github__* and a root /Users/alex/projects.

5 MCP servers (3 high-risk): 4 high and 4 medium findings, e.g. filesystem: Filesystem access to a very wide root "/Users/alex" (whole disk, system folder or an entire home directory).

Worked example
ServerRiskFindings
filesystemhighaccess to all of /Users/alex (high); npx package not pinned to a version (medium)
postgreshigh--api-key secret on the command line, visible in the process list (high); Docker image mcp/postgres not pinned (low)
shellhighruns bash -c, so it can execute arbitrary commands (high); run_command is auto-approved (high)
githubmediumpersonal access token in plaintext in the config (medium); allow rule mcp__github__* pre-approves every GitHub tool (medium)
docsmediumremote server without an auth header (medium, fine if it uses OAuth or is public)

DATABASE_URL is referenced as ${env:DATABASE_URL}, so it isn't counted as a plaintext secret. Note also that the filesystem server exposes the whole home folder while the client root is only /Users/alex/projects. Narrow the server arguments to match.

The worst combination here is shell + auto-approve: the agent can run any command as you, without asking.

How to read the result

  • Summary — server count, how many are high-risk, and findings by severity.
  • Servers — transport (stdio or http), the command or URL, the resolved package or image, paths, environment variable names (secret ones marked), header names and auto-approve lists.
  • Findings — one line per problem, with severity and the server it belongs to. Fix the highs first.
  • Graph — agent → servers → capabilities. Up to 60 nodes are drawn, and the full lists are in the result.

Tips and common mistakes

  • Pass filesystem servers the narrowest folder that works, e.g. one project directory. Never ~, / or C:\, and keep ~/.ssh and ~/.aws out entirely.
  • Put tokens in env as references (${input:…}, ${env:…}) or in a secret manager. Never put them in args.
  • Pin versions: @scope/server@1.2.3 for npx/uvx, a tag or digest for Docker images. Unpinned servers update themselves on every start.
  • Wildcard allow rules (mcp__server__*) also pre-approve tools the server adds in future versions. List the specific read-only tools instead.
  • For remote servers, use HTTPS and either OAuth or an auth header. Plain HTTP endpoints are flagged.

FAQ

Is it safe to paste my real config?

Secret values are masked and never returned. If you'd rather not paste them at all, replace them with dummy values first. The analysis works the same.

Which clients are supported?

Configs with mcpServers (Claude Desktop, Claude Code, Cursor, Windsurf, Cline), servers (VS Code mcp.json), mcp.servers (VS Code settings) and context_servers (Zed).

How are secrets detected?

By variable or header names that look like credentials (KEY, TOKEN, SECRET, PASSWORD…) and by well-known token formats such as ghp_, sk-, AKIA or JWTs.

Does a "high" finding mean the server is malicious?

No. It means the configuration gives the server or agent a lot of power. Decide whether that power is needed, and narrow it if not.

Guide last updated:

For scripts and AI agents

  • JSON API: POST https://agentpermissiongraph.usefulweb.site/api/v1/calculate (same calculation as this page)
  • Interface description: OpenAPI 3.1 · AI guide: llms.txt
  • MCP server (Streamable HTTP): https://agentpermissiongraph.usefulweb.site/mcp · tool name agent_permission_graph
Example request
curl -s -X POST https://agentpermissiongraph.usefulweb.site/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{…see OpenAPI examples…}'
Feedback · ideas & bug reports welcome