Skip to content
MCP server

callgraph

Show agents a file's structure, callers and impact in eight languages, unread

Runs locallyStatus and history
Pricing
Open source
Platforms
CLI, macOS, Linux
Runs
Locally
Version
1.0.2
Listing updated
3 days ago

About callgraph

callgraph is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

The output is built from syntax trees, so a class is a few dozen lines instead of the whole file. A sample shows a PHP model: constants, then each method with calls labelled external_call, global_helper, internal_helper or orm_relation. --grep finds callers, --depth N follows callers of callers for impact analysis, and file::method --body prints one method.

Two commands start a task: locate ranks files from the names in a task, and profile describes architecture and layers. Laravel and Yii views cover routes, middleware, jobs and events. Dynamic calls are marked dynamic_call or name-only matches instead of silently missing.

It ships as one static binary for macOS, Linux and Windows, as a CLI or MCP server, and the docs say to prefer grep for exact strings.

Install

Run in a terminal

claude mcp add callgraph -- npx -y https://github.com/GeRiY/callgraph/releases/download/v1.0.2/callgraph.mcpb

Add to claude_desktop_config.json

{
  "mcpServers": {
    "callgraph": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/GeRiY/callgraph/releases/download/v1.0.2/callgraph.mcpb"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "callgraph": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/GeRiY/callgraph/releases/download/v1.0.2/callgraph.mcpb"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "callgraph": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/GeRiY/callgraph/releases/download/v1.0.2/callgraph.mcpb"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "callgraph": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/GeRiY/callgraph/releases/download/v1.0.2/callgraph.mcpb"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "callgraph": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/GeRiY/callgraph/releases/download/v1.0.2/callgraph.mcpb"
      ]
    }
  }
}

What it does

Categorised calls
Native, ORM, helper, framework and more.
Caller search
--grep with --depth.
Single-method reads
Print a method or line range.
Project profile
Architecture and layers.
Framework views
Laravel and Yii aware.
Self-updating binary
One binary, incremental cache.

Good for

  • Find who calls a method before changing it
  • Orient in an unfamiliar PHP codebase
  • Cut tokens when exploring a repo
  • Read one method body

Pricing

Open source

Free, MIT licence

Prices change. Check callgraph.eu before you buy.

callgraph FAQ

Which languages?

PHP, JS/TS, Vue, Rust, Swift, Python and Go.

Licence?

MIT, and free.

Does it replace grep?

No, grep is better for exact strings.

What about dynamic calls?

Shown as name-only matches with --guess, or not at all.

Is callgraph free?

Yes. callgraph is open source, so you can use and self-host it for free.

How do I add callgraph to Claude Code?

Run this command in your terminal: claude mcp add callgraph -- npx -y https://github.com/GeRiY/callgraph/releases/download/v1.0.2/callgraph.mcpb

What are the best alternatives to callgraph?

The closest alternatives to callgraph are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to callgraph

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools