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

# ChatGPT

> Connect ChatGPT to Chartcastr and query your data from inside your conversations using the Model Context Protocol or GPT Actions.

## Overview

Chartcastr supports two ways to connect with ChatGPT:

1. **MCP (ChatGPT desktop)** — The ChatGPT desktop app supports MCP servers, letting you query Chartcastr data directly from any conversation.
2. **GPT Actions** — Build a custom GPT that calls Chartcastr's REST API. Best for sharing a configured assistant with your team.

***

## Option 1: MCP via ChatGPT Desktop

### Prerequisites

* ChatGPT desktop app (macOS or Windows) with MCP support enabled
* A Chartcastr account on any paid plan
* An API key from **Settings → API Keys**

### 1. Generate an API key

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

### 2. Add Chartcastr as an MCP server

Open ChatGPT Settings and navigate to the **MCP Servers** section. Add a new server with:

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

Or, if ChatGPT uses a JSON config file (check the [official ChatGPT MCP docs](https://openai.com/index/model-context-protocol-support) for the latest format):

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

### 3. Restart ChatGPT

Quit and reopen the app. Chartcastr tools should appear when you start a conversation.

***

## Option 2: GPT Actions

GPT Actions let your custom GPT call Chartcastr's REST API directly.

### 1. Create a Custom GPT

Go to [chatgpt.com/gpts/editor](https://chatgpt.com/gpts/editor) and click **Create a GPT**.

### 2. Add an Action

Under the **Actions** tab, click **Add action** and paste Chartcastr's OpenAPI spec URL:

```
https://api.chartcastr.com/api/gpt/openapi.json
```

### 3. Set authentication

Select **API Key** as the auth type and paste your Chartcastr API key. The header name is `X-API-Key`.

***

## Available MCP Tools

| Tool                | Description                                        |
| ------------------- | -------------------------------------------------- |
| `list_sources`      | List all data sources connected to your account    |
| `list_destinations` | List all configured destinations                   |
| `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                     |

## Further Reading

* [ChatGPT MCP announcement](https://openai.com/index/model-context-protocol-support) — official OpenAI MCP guide
* [Chartcastr API Keys](https://chartcastr.com/admin/settings/api-keys?create=true) — manage your keys
