Codegraph

38 tools. 5 can modify or destroy data without limits.

1 destructive tool with no built-in limits. Policy required.

Last updated:

5 can modify or destroy data
33 read-only
38 tools total

5 Codegraph tools can modify or destroy data, with no limits today. PolicyLayer puts allow, deny, and rate-limit rules on every call. Live in minutes.

SECURE CODEGRAPH →

Free to start. No card required.

Read (33) Write / Execute (4) Destructive / Financial (1)
7,958 tokens of tool definitions, loaded on every request
4.0% of a 200k context window
343 heaviest tool: codegraph_memory_store

Destructive tools (codegraph_index_directory) permanently delete resources. There is no undo. An agent calling these in a retry loop causes irreversible damage.

Write operations (codegraph_index_files, codegraph_mine_git_history, codegraph_mine_git_history_for_file) modify state. Without rate limits, an agent can make hundreds of changes in seconds — faster than any human can review or revert.

Execute tools (codegraph_traverse_graph) trigger processes with side effects. Builds, notifications, workflows — all fired without throttling.

Deny destructive operations
{
  "codegraph_index_directory": {
    "deny_if": [
      {
        "conditions": [],
        "on_deny": "Blocked by default. Requires approval."
      }
    ]
  }
}

Destructive tools should never be available to autonomous agents without human approval.

Rate limit write operations
{
  "codegraph_index_files": {
    "limits": [
      {
        "counter": "codegraph_index_files_per_hour",
        "window": "hour",
        "max": 30,
        "scope": "grant"
      }
    ]
  }
}

Prevents bulk unintended modifications from agents caught in loops.

Cap read operations
{
  "codegraph_analyze_complexity": {
    "limits": [
      {
        "counter": "codegraph_analyze_complexity_per_minute",
        "window": "minute",
        "max": 60,
        "scope": "grant"
      }
    ]
  }
}

Controls API costs and prevents retry loops from exhausting upstream rate limits.

Get this policy live on your own Codegraph server in minutes. Tune the limits to your setup; PolicyLayer enforces it on every call.

ENFORCE ON MY CODEGRAPH →
Can an AI agent delete data through the Codegraph MCP server? +

Yes. The Codegraph server exposes 1 destructive tools including codegraph_index_directory. These permanently remove resources with no undo. PolicyLayer blocks destructive tools by default so they never reach the upstream server.

How do I prevent bulk modifications through Codegraph? +

The Codegraph server has 3 write tools including codegraph_index_files, codegraph_mine_git_history, codegraph_mine_git_history_for_file. Set a rate limit in your policy -- for example, 10 calls per hour prevents an agent from making more than 10 modifications per hour. PolicyLayer enforces this at the gateway, before calls reach Codegraph.

How many tools does the Codegraph MCP server expose? +

38 tools across 4 categories: Destructive, Execute, Read, Write. 33 are read-only. 5 can modify, create, or delete data.

How do I enforce a policy on Codegraph? +

Register the Codegraph MCP server in PolicyLayer, apply the suggested rules above (adjust the limits to your use case), and point your AI client at the PolicyLayer proxy URL instead of the server directly. Your agents keep the same tools; PolicyLayer evaluates every call against policy before it executes. Nothing to install, live in minutes.

Other MCP servers with similar tools.

Starter policies for each. Same risk classification, live on your fleet in minutes.

Enforce policy on every Codegraph tool call.

Deterministic rules across all 38 Codegraph tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.

Free to start. No card required.

4,600+ MCP servers and 31,000+ tools scanned and risk-classified.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.