---
url: https://chartbuddy.io/hub/docs/connect-mcp/claude-code.md
---
# Connect Claude Code

Wire **Claude Code** (CLI) to Chartbuddy Hub over local stdio MCP.

::: info Also covers the Claude Desktop Code tab
These steps apply to **Claude Code** in the terminal and the **Code** tab in the Claude desktop app — that tab is a GUI for Claude Code, not the Home chat tab. For Claude in the browser or the desktop **Home** tab, see [Connect Claude](/connect-mcp/claude).
:::

Use **user** scope so the absolute binary path is not committed to a repo.

::: tip Agent path

1. Fetch [`/hub/llms.txt`](https://chartbuddy.io/hub/llms.txt) → [`mcp-setup.md`](https://chartbuddy.io/hub/mcp-setup.md) → [this page `.md`](https://chartbuddy.io/hub/docs/connect-mcp/claude-code.md).
2. Do not load `llms-full.txt` by default.
   :::

## One-liner

::: code-group

```powershell [Windows]
claude mcp add-json chartbuddy '{"type":"stdio","command":"C:\\Users\\YOUR_USER\\AppData\\Local\\Programs\\Chartbuddy\\chartbuddy.exe","args":["--mcp"]}' --scope user
```

```bash [macOS]
claude mcp add-json chartbuddy '{"type":"stdio","command":"/Applications/Chartbuddy.app/Contents/MacOS/chartbuddy","args":["--mcp"]}' --scope user
```

:::

Equivalent transport form:

::: code-group

```powershell [Windows]
claude mcp add --transport stdio chartbuddy --scope user -- "C:\Users\YOUR_USER\AppData\Local\Programs\Chartbuddy\chartbuddy.exe" --mcp
```

```bash [macOS]
claude mcp add --transport stdio chartbuddy --scope user -- "/Applications/Chartbuddy.app/Contents/MacOS/chartbuddy" --mcp
```

:::

::: info Windows install
A public Windows Chartbuddy Hub build is not shipping yet. Use the **macOS** tab until it does, then replace `YOUR_USER` (or use the path shown after install).
:::

Then start a **new** Claude Code session — mid-session attach fails in Claude Code.

## Handoff

Optional context for a chat that will use the tools:

```text
Chartbuddy MCP is configured (stdio → chartbuddy --mcp → Chartbuddy Hub).
Transport: newline JSON-RPC or Content-Length framed MCP — not HTTP docs.
Open charts: list_charts (chart-* refs). get_active_chart skips menus/popovers.
Missing tools usually mean the chartbuddy MCP server is off for the chat, or a new chat is needed.
```

## Verify

::: code-group

```powershell [Windows]
& "$env:LOCALAPPDATA\Programs\Chartbuddy\chartbuddy.exe" --mcp-status
```

```bash [macOS]
/Applications/Chartbuddy.app/Contents/MacOS/chartbuddy --mcp-status
```

:::

Keep Chartbuddy Hub running while you chart.
