> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chartcastr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Tools — Setup

> Three steps to connect any MCP-compatible AI tool (Claude Code, Claude Desktop, Cursor, ChatGPT, Codex) to Chartcastr.

Connect any MCP-compatible AI tool to your Chartcastr account in three steps. Pick your tool, run one command (or paste one block of JSON), restart, done.

> Looking for the **why** instead of the **how**? See [AI Tools — Concepts](/integrations/ai-tools-concepts) for the context-layer and action-agent patterns.

***

## Step 1 — Get an API key

In the Chartcastr dashboard, open [**Settings → API Keys**](https://chartcastr.com/admin/settings/api-keys?create=true) and create a new key. Copy it — you'll paste it in Step 2.

> Treat this key like a password. Anyone with it can read your sources, connections, and pulse analysis.

***

## Step 2 — Install the MCP server in your tool

Pick your tool and run the matching command.

<Tabs>
  <Tab title="Claude Code">
    One line in your terminal:

    ```bash theme={null}
    claude mcp add --transport http chartcastr \
      https://api.chartcastr.com/api/mcp \
      --header "X-API-Key: YOUR_API_KEY"
    ```

    That's it — Claude Code persists this in your user config. Skip to Step 3.

    Prefer JSON? See the [Claude Code page](/integrations/claude-code) for the `.mcp.json` form.
  </Tab>

  <Tab title="Claude Desktop">
    Open the config file for your platform:

    * **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
    * **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

    Add (or merge) this block, replacing `YOUR_API_KEY`:

    ```json theme={null}
    {
      "mcpServers": {
        "chartcastr": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://api.chartcastr.com/api/mcp",
            "--header",
            "X-API-Key:YOUR_API_KEY"
          ]
        }
      }
    }
    ```

    Quit and reopen Claude. Full details on the [Claude Desktop page](/integrations/claude).
  </Tab>

  <Tab title="Cursor">
    Create or edit `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` for global):

    ```json theme={null}
    {
      "mcpServers": {
        "chartcastr": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://api.chartcastr.com/api/mcp",
            "--header",
            "X-API-Key:YOUR_API_KEY"
          ]
        }
      }
    }
    ```

    Open **Cursor Settings → MCP** and toggle `chartcastr` on. Switch to **Agent** mode to use it. Full details on the [Cursor page](/integrations/cursor).
  </Tab>

  <Tab title="ChatGPT Desktop">
    Open ChatGPT Settings → **MCP Servers** → **Add server**:

    * **Name:** `chartcastr`
    * **Command:** `npx`
    * **Args:** `-y mcp-remote https://api.chartcastr.com/api/mcp --header X-API-Key:YOUR_API_KEY`

    Restart ChatGPT. For GPT Actions (REST, no MCP) and full details, see the [ChatGPT page](/integrations/chatgpt).
  </Tab>

  <Tab title="Codex">
    Edit `~/.codex/config.yaml`:

    ```yaml theme={null}
    mcpServers:
      chartcastr:
        command: npx
        args:
          - "-y"
          - "mcp-remote"
          - "https://api.chartcastr.com/api/mcp"
          - "--header"
          - "X-API-Key:YOUR_API_KEY"
    ```

    Run `codex`. Full details on the [Codex page](/integrations/codex).
  </Tab>
</Tabs>

***

## Step 3 — Verify it works

Ask your tool one of these:

* *"List my Chartcastr sources."*
* *"What did the latest pulse say about my HubSpot connection?"*
* *"Are any of my connections inactive?"*

If you see real data come back, you're done. If not, jump to [Troubleshooting](#troubleshooting).

In Claude Code or Claude Desktop, you can also run `/mcp` to see the active server list — `chartcastr` should appear.

***

## Available tools

These are the tools your AI agent can call once connected:

| Tool                | What it returns                                              |
| ------------------- | ------------------------------------------------------------ |
| `list_sources`      | Every connected data source with status and connection count |
| `list_destinations` | Every configured destination (Slack workspace, email, etc.)  |
| `list_connections`  | Every active chart delivery — source, destination, cadence   |
| `get_latest_pulse`  | Full AI narrative analysis from the most recent delivery     |
| `verify_connection` | Live confirmation a specific connection is active            |
| `open_chartcastr`   | Deep link to open the dashboard at a specific page           |

***

## Local development

Running Chartcastr locally with `bun up`? Swap the URL to `http://localhost:8109/api/mcp` and use a key generated against your local server.

```bash theme={null}
claude mcp add --transport http chartcastr-local \
  http://localhost:8109/api/mcp \
  --header "X-API-Key: YOUR_LOCAL_KEY"
```

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="401 Unauthorized">
    Your key is wrong, expired, or revoked. Regenerate at [Settings → API Keys](https://chartcastr.com/admin/settings/api-keys?create=true) and re-run the install command.
  </Accordion>

  <Accordion title="Tool doesn't see chartcastr after install">
    Most MCP clients only load servers at startup. **Quit fully and relaunch** — a window reload isn't enough. In Claude Code, run `/mcp` to force a server-list refresh.
  </Accordion>

  <Accordion title="`npx mcp-remote` hangs or errors">
    First run downloads the `mcp-remote` package — give it \~30 seconds. If it persists, run `npx -y mcp-remote@latest` once manually to prime the cache.
  </Accordion>

  <Accordion title="Tool returns 'not currently available'">
    A specific tool may be feature-flagged off during rollout. Check [status.chartcastr.com](https://status.chartcastr.com) or contact support.
  </Accordion>
</AccordionGroup>
