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

# Cursor

> Connect Cursor to Chartcastr via MCP and query your data sources, connections, and pulse analysis from inside your IDE.

## Overview

[Cursor](https://www.cursor.com) supports MCP servers from version 0.40 onwards. You can add Chartcastr as an MCP server so Cursor's AI can read your account data when you ask it to.

## Prerequisites

* Cursor version 0.40 or later
* A Chartcastr account on any paid plan
* An API key from **Settings → API Keys** in your Chartcastr dashboard

## Setup

### 1. Generate an API key

In Chartcastr, go to **Settings → API Keys** and create a new key.

### 2. Add Chartcastr as an MCP server

You can configure MCP servers globally or per-project.

<Tabs>
  <Tab title="Global (all projects)">
    Create or edit `~/.cursor/mcp.json`:

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

  <Tab title="Project-level">
    Create or edit `.cursor/mcp.json` in your project root:

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

    Add `.cursor/mcp.json` to `.gitignore` if your key is in it.
  </Tab>
</Tabs>

Replace `YOUR_API_KEY` with the key from step 1.

### 3. Enable the server in Cursor Settings

1. Open **Cursor Settings** → **MCP**
2. You should see `chartcastr` listed. Toggle it on.
3. Click **Refresh** if it doesn't appear immediately.

### 4. Use it in Agent mode

Switch Cursor to **Agent** mode (not Ask or Edit). You can now reference Chartcastr tools in your prompts.

## Available Tools

| Tool                | Description                                           |
| ------------------- | ----------------------------------------------------- |
| `list_sources`      | List all data sources connected to your account       |
| `list_destinations` | List all configured destinations (Slack, email, etc.) |
| `list_connections`  | List all active chart delivery connections            |
| `get_latest_pulse`  | Fetch the most recent AI analysis for a connection    |
| `verify_connection` | Confirm a connection is active                        |
| `open_chartcastr`   | Generate a deep link to open Chartcastr               |

## Example Prompts (in Agent mode)

* *"List my Chartcastr sources"*
* *"Which of my connections are currently active?"*
* *"Get the latest pulse for my Xero connection"*

## Further Reading

* [Cursor MCP docs](https://docs.cursor.com/context/model-context-protocol) — official setup guide
* [Chartcastr API Keys](https://chartcastr.com/admin/settings/api-keys?create=true) — manage your keys
