---
url: https://chartbuddy.io/hub/docs/connect-mcp/claude-code.md
---
> Docs index: [llms.txt](https://chartbuddy.io/hub/docs/llms.txt)


# Connect Claude Code

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

## Setup via Chartbuddy Hub

1. Install Chartbuddy Hub and launch it once (approve OS security prompts).
2. Open **AI connections** in Hub (title-bar cable icon).

3) Connect **Claude Code**. Hub writes the server into your user Claude Code config.

4. Start a **new** Claude Code session (or run `/reload-plugins`) so tools load.

## Setup via prompting Claude

Prompt to paste into Claude Code:

```text
Set up the Chartbuddy Hub MCP server for this Claude Code install:

1. Detect my OS and find the Chartbuddy binary at its default install path:
   - macOS: /Applications/Chartbuddy.app/Contents/MacOS/chartbuddy
   - Windows: %LOCALAPPDATA%\Programs\Chartbuddy\chartbuddy.exe
   If it's not there, ask me for the correct path. Don't guess or search the whole filesystem.

2. Check whether an MCP server named "chartbuddy" is already registered
   (`claude mcp list`). If it is, tell me and stop.

3. Register it as a user-scoped stdio MCP server:
   claude mcp add-json chartbuddy '{"type":"stdio","command":"<resolved path>","args":["--mcp"]}' --scope user

4. Confirm the Hub app is running and the bridge is reachable:
   <resolved path> --mcp-status
   (exit 0 = up, exit 1 = unreachable. If unreachable, tell me to launch
   Chartbuddy Hub first. Don't launch it yourself.)

5. Tell me to start a brand-new Claude Code session. MCP servers added
   mid-session aren't picked up.
```

## Setup via Terminal

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

::: 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
```

:::

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

## 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.
