# LLMGRAPH for Claude Code

> Add the LLMGRAPH MCP server to Claude Code or install the plugin on Windows: the config file, the cmd /c npx form, and how to check it connected.

Add LLMGRAPH to Claude Code with one command, or install the plugin that adds the server and teaches your agent when to ask. Claude Code is tested by us: we ran it against the server on Windows 11, where it starts `npx` directly.

## 1. Add the server to Claude Code

Add (tested by us): a command, or .mcp.json in the project root (project scope)

```sh
claude mcp add --scope project llmgraph -- npx -y llmgraph-mcp
```

Or as a file entry:

```json
{
  "mcpServers": {
    "llmgraph": {
      "command": "npx",
      "args": [
        "-y",
        "llmgraph-mcp"
      ]
    }
  }
}
```

On Windows 11, Claude Code starts `npx` directly, so no `cmd /c` wrapper is needed.

## Or install the plugin

The plugin adds the server and a short skill that tells your agent when to ask which question. From the Claude Code plugin marketplace:

In a shell:

```sh
claude plugin marketplace add brainfoods-studio/llmgraph-agent-plugin
claude plugin install llmgraph@llmgraph
```

Or inside a Claude Code session:

```text
/plugin marketplace add brainfoods-studio/llmgraph-agent-plugin
/plugin install llmgraph@llmgraph
```

The plugin also adds [the stop check](https://beta.llmgraph.in/docs/stop-check.md), which holds Claude Code once when its edits left callers certain to break. More in [The LLMGRAPH plugin](https://beta.llmgraph.in/docs/plugin.md).

> **"Pending approval" in `claude mcp list`?** Claude Code shows this for a server added in project scope until you approve it in an interactive session (run `claude`). The line is not a sign that LLMGRAPH is off.

## 2. Check that it connected

Check (tested by us; your agent lists them as tools):
- Run claude mcp list, or type /mcp inside Claude Code.
- A project-scope server from .mcp.json first shows 'Pending approval' until you approve it in an interactive session.

You should see `✔ Connected`.

## 3. Sign in once

The first time your agent asks a question, LLMGRAPH answers with a sign-in link and a 6-character code. In a terminal you can run this instead:

```sh
npx -y llmgraph-mcp login
```

The link works for 10 minutes. Open the full link, including everything after the `#`, sign in with Google, compare the code on the page with the one your agent shows, and approve this device. Approving your first device starts your 7-day trial. The full steps are in [Set up with your agent](https://beta.llmgraph.in/docs/start.md).

## 4. Make sure Claude Code uses it

Adding a server doesn't make an agent use it.

Add a line to your agent's instructions file, `CLAUDE.md`:

```text
Before changing code, ask the llmgraph MCP tools who_calls and what_breaks_if_changed; after editing, run check_my_changes; read each answer's label and its lines about what it cannot see.
```

We can't promise that an agent asks on its own. Every answer starts with `llmgraph · `: look for it where Claude Code shows what it asked.

## 5. The five questions

| Question | What it answers |
| --- | --- |
| [who_calls](https://beta.llmgraph.in/docs/questions/who_calls.md) | Every place that calls this function, plus calls we can't see. |
| [what_breaks_if_changed](https://beta.llmgraph.in/docs/questions/what_breaks_if_changed.md) | Everything that depends on this, directly or indirectly, and what we can't see. |
| [check_my_changes](https://beta.llmgraph.in/docs/questions/check_my_changes.md) | After editing: callers you didn't update, and anything we can't see. |
| [what_is_unknown](https://beta.llmgraph.in/docs/questions/what_is_unknown.md) | Where our view is blind (dynamic calls, unknown types, unreadable files) and why. |
| [explain](https://beta.llmgraph.in/docs/questions/explain.md) | Why we said this: the evidence behind one answer line. |

## Other agents

- [LLMGRAPH for Cursor](https://beta.llmgraph.in/docs/agents/cursor.md): MCP setup on Windows.
- [LLMGRAPH for Codex](https://beta.llmgraph.in/docs/agents/codex.md): MCP setup on Windows.
- [LLMGRAPH for Gemini CLI](https://beta.llmgraph.in/docs/agents/gemini-cli.md): MCP setup on Windows.
- [LLMGRAPH for Antigravity](https://beta.llmgraph.in/docs/agents/antigravity.md): MCP setup on Windows.
- [LLMGRAPH for OpenCode](https://beta.llmgraph.in/docs/agents/opencode.md): MCP setup on Windows.
- [LLMGRAPH for Windsurf](https://beta.llmgraph.in/docs/agents/windsurf.md): MCP setup on Windows.

- [Set up with your agent](https://beta.llmgraph.in/docs/start.md): Every agent on one page, plus the sign-in steps and what to do when something goes wrong.
- [The MCP server](https://beta.llmgraph.in/docs/mcp-server.md): What the server answers and what it needs.
- [Questions and answers](https://beta.llmgraph.in/docs/faq.md): Short answers to common questions.
