Skip to content

~/apps $ open CodeGraph.app

CodeGraph

A free macOS menubar app and local MCP server. It maps your Laravel app's code and database schema, so Claude can trace a stack trace or a support ticket to the screen, route and table behind it.

// analyze_stacktrace
{
  "exception": "Illuminate\\Database\\QueryException",
  "sqlState": "23000",
  "sqlTables": ["orders"],
  "sqlColumns": ["customer_id"],
  "frames": [{
    "file": "app/Http/Controllers/OrderController.php",
    "line": 42,
    "method": { "name": "store", "line": 38 },
    "screens": [{ "routes": [{
      "name": "POST orders",
      "attrs": { "name": "orders.store",
                 "middleware": "[\"auth\"]" }
    }] }]
  }],
  "tables": [{
    "table": "orders",
    "models": [{ "name": "App\\Models\\Order" }],
    "migrations": ["…_create_orders_table.php"]
  }]
}

What it does

From a stack trace to the cause

Paste an error from the log. CodeGraph finds the frames in your own code and the route, view, models and table behind them, including the column from an SQLSTATE error.

From ticket text to the screen

A customer quotes a label or a message. Full-text search over translations, views, routes, validations and messages points to the screen that shows it.

Schema and routes at hand

Columns, indexes, foreign keys, migrations and models of any table. Handler, middleware, view and validation of any route. Composer packages with their installed versions.

How it works

The graph lives on your Mac and stays in step with the branch you choose.

  • Built from origin/<branch> Not from your working copy. Checking out another branch does not change the graph.
  • Always current A background fetch at most once every 5 minutes; the graph rebuilds when the branch moves.
  • No PHP, Docker or database CodeGraph reads the code and migrations itself. Framework and package sources come from the versions in composer.lock.
  • Several repositories Each with its own branch. Claude picks one by name.

Install

  1. Download and open

    Open the .dmg and drag CodeGraph to Applications. It lives in the menubar, not in the Dock.

  2. Add a repository

    In Settings, add the folder of a local clone, a name and the branch on origin. The first build runs in the background.

  3. Connect Claude

    Claude Desktop: one button in Settings. Claude Code: run the command below.

claude mcp add -s user code-graph -- '/Applications/CodeGraph.app/Contents/MacOS/CodeGraph' --mcp

Needs git and an SSH key to GitHub that works without an interactive passphrase, because fetches run in the background.

MCP tools

All tools only read, except rebuild. Every code reference carries file:line.

analyze_stacktrace
Error or log to route, view, models and tables.
find_by_text
Text from the screen to the screen itself.
route
Handler, middleware, view and validation.
table
Columns, indexes, foreign keys, migrations, models.
node · neighbors · outline
A class or file and what it connects to.
source
A snippet of a file from the branch on origin.
packages
Composer packages and their installed versions.
list_repos · status · warnings · rebuild
Repositories, build state and gaps in the graph.

Support

Found a bug or something does not work? Write to me with the app version and what you were doing.

CodeGraph is free

No account, no subscription. If it saves you time on a bug or a ticket, you can buy me a coffee.

Buy me a coffee (opens in a new window)

I use Google Analytics to see which articles people read. It sets cookies only if you allow it. Privacy policy