API & MCP

Everything a person can do on Agent Permission Graph, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

  • POST https://agentpermissiongraph.usefulweb.site/api/v1/calculate – run Agent Permission Graph
  • GET https://agentpermissiongraph.usefulweb.site/api/v1/tool – inputs, output schema, examples
  • OpenAPI 3.1: /openapi.json · /openapi.yaml
  • Errors: application/problem+json; 422 includes per-field errors.

Agent Permission Graph

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.

Inputs of Agent Permission Graph
FieldTypeDefaultDescription
config (required)textarea—Agent / MCP client configuration (JSON or JSONC). Secret values are masked and never returned. You can replace them with dummy values before pasting.
allowToolslist—Allowed / auto-approved tool rules (optional). One per line, e.g. mcp__github__create_issue, github.*, filesystem/*.
denyToolslist—Denied tool rules (optional)
rootslist—File roots exposed by the client (optional)

Example request

Claude Desktop config with typical mistakes (dummy secrets)

curl -X POST https://agentpermissiongraph.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"config":"{\n  \"mcpServers\": {\n    \"filesystem\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@modelcontextprotocol/server-filesystem\",\n        \"/Users/alex\",\n        \"/Users/alex/Desktop\"\n      ]\n    },\n    \"github\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@modelcontextprotocol/server-github@2025.4.8\"\n      ],\n      \"env\": {\n        \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"ghp_EXAMPLEexampleEXAMPLEexample0000\"\n      }\n    },\n    \"postgres\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"-e\",\n        \"DATABASE_URL\",\n        \"mcp/postgres\",\n        \"--api-key\",\n        \"sk-EXAMPLE0000000000000000\"\n      ],\n      \"env\": {\n        \"DATABASE_URL\": \"${env:DATABASE_URL}\"\n      }\n    },\n    \"shell\": {\n      \"command\": \"bash\",\n      \"args\": [\n        \"-c\",\n        \"python3 ~/tools/shell_server.py\"\n      ],\n      \"autoApprove\": [\n        \"run_command\"\n      ]\n    },\n    \"docs\": {\n      \"type\": \"http\",\n      \"url\": \"https://mcp.example.com/mcp\"\n    }\n  }\n}","allowTools":["mcp__github__*"],"roots":["/Users/alex/projects"]}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

  • Streamable HTTP endpoint: https://agentpermissiongraph.usefulweb.site/mcp – protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake).
  • Tools: agent_permission_graph
  • Local stdio connector: node src/mcp-stdio.ts --tool=agent-permission-graph
{
  "mcpServers": {
    "agent-permission-graph": { "type": "http", "url": "https://agentpermissiongraph.usefulweb.site/mcp" }
  }
}