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

# Connect

> Connect the Cited MCP server to Claude, ChatGPT, Gemini, Cursor, or VS Code — zero-config OAuth for Claude Desktop, or an API key for everything else.

The Cited MCP is a remote **Streamable HTTP** server. There are **two ways to connect**, and which you use depends on your client:

|                         | Endpoint                            | Auth                                         | Best for                                              |
| ----------------------- | ----------------------------------- | -------------------------------------------- | ----------------------------------------------------- |
| **A — Sign-in (OAuth)** | `https://api.getcited.in/mcp-oauth` | Sign in with your Cited account — **no key** | **Claude Desktop** (paste one URL)                    |
| **B — API key**         | `https://api.getcited.in/mcp`       | A `cited_sk_…` key (header or in the URL)    | Claude Code · Cursor · VS Code · Gemini CLI · ChatGPT |

If you're on **Claude Desktop**, use **Option A** — it's the fastest (no key to manage). Everything else uses **Option B**.

***

## Option A — Claude Desktop, sign-in (no key)

Claude Desktop connects over OAuth: you paste one URL, then sign in — Claude registers itself and gets a token automatically.

<Steps>
  <Step title="Add the connector">
    **Settings → Connectors → Add custom connector.** Name it `Cited`, and in the **URL** field paste:

    ```
    https://api.getcited.in/mcp-oauth
    ```

    Leave the **OAuth Client ID / Secret** fields **blank** → **Add**.
  </Step>

  <Step title="Connect + sign in">
    Click **Connect**. You'll be taken to the Cited sign-in page — **sign in with Google** using the account whose email is on your Cited brand. Approve access, and the connector flips to **Connected**.
  </Step>

  <Step title="Use it">
    In a chat: *"use Cited — whoami"*. It returns your account + the brands you can access.
  </Step>
</Steps>

<Note>
  Sign in with the **email that's on your Cited brand(s)**. Your identity (and which brands you see) is resolved from that verified email — a super-admin sees every brand; a brand user sees theirs. Signing in with an email that isn't on any Cited brand returns no brands.
</Note>

***

## Option B — API key (all other clients)

### 1. Get a key

Create a key in the Cited dashboard under **Settings → API & MCP → Create key**: name it, pick the brand(s) it can access, and **copy the `cited_sk_…` value at the copy-once reveal** — it's shown only once. Store it like a password.

<Note>
  A key can grant **one brand** (in-house) or **several** (agency). Any brand admin of a granted brand can see and revoke it.
</Note>

### 2. Connect your client

The endpoint is `https://api.getcited.in/mcp` (both with and without a trailing slash work). **Two auth styles**, depending on the client:

* **Header** — clients that let you set an `Authorization: Bearer` header (Claude Code, Cursor, VS Code, Gemini CLI).
* **Key-in-URL** — clients whose connector UI has **no header field** (ChatGPT, or Claude Desktop if you prefer a key over sign-in): put the key in the URL as `?key=…`.

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http cited https://api.getcited.in/mcp \
      --header "Authorization: Bearer cited_sk_YOUR_KEY"
    ```

    Confirm with `claude mcp list` (shows `cited … ✔ Connected`), then ask *"use Cited — whoami"*.
  </Tab>

  <Tab title="ChatGPT">
    Requires a paid ChatGPT plan (Plus/Pro/Team/Enterprise); Free does not support custom connectors.

    1. **Settings → Connectors → Advanced → toggle Developer mode on.**
    2. **Settings → Connectors → Create.** Name it `Cited`, set **Authentication = No authentication**, and paste the URL (replace `YOUR_KEY`):
       ```
       https://api.getcited.in/mcp/?key=cited_sk_YOUR_KEY
       ```
    3. Create it, enable the Cited connector in a chat, and ask *"whoami"*.
  </Tab>

  <Tab title="Gemini CLI">
    Edit `~/.gemini/settings.json` (replace `YOUR_KEY`):

    ```json theme={null}
    {
      "mcpServers": {
        "cited": {
          "httpUrl": "https://api.getcited.in/mcp",
          "headers": { "Authorization": "Bearer cited_sk_YOUR_KEY" }
        }
      }
    }
    ```

    Restart Gemini CLI, then run `/mcp` to confirm `cited` is connected.
  </Tab>

  <Tab title="Cursor">
    Create `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global), replace `YOUR_KEY`:

    ```json theme={null}
    {
      "mcpServers": {
        "cited": {
          "url": "https://api.getcited.in/mcp",
          "headers": { "Authorization": "Bearer cited_sk_YOUR_KEY" }
        }
      }
    }
    ```

    Cursor → **Settings → MCP** → confirm `cited` shows a green dot.
  </Tab>

  <Tab title="VS Code">
    Create `.vscode/mcp.json` (replace `YOUR_KEY`):

    ```json theme={null}
    {
      "servers": {
        "cited": {
          "type": "http",
          "url": "https://api.getcited.in/mcp",
          "headers": { "Authorization": "Bearer cited_sk_YOUR_KEY" }
        }
      }
    }
    ```

    Reload the window, then open Copilot Chat → **Tools** → enable `cited`.
  </Tab>

  <Tab title="Claude Desktop (key)">
    Prefer **Option A (sign-in)** above. If you'd rather use a key, Claude Desktop's dialog has no header field, so put the key in the URL:

    1. **Settings → Connectors → Add custom connector.**
    2. Name it `Cited`. In the **URL** field, paste (replace `YOUR_KEY`):
       ```
       https://api.getcited.in/mcp/?key=cited_sk_YOUR_KEY
       ```
    3. Leave the OAuth fields blank → **Add** → *"use Cited — whoami"*.
  </Tab>
</Tabs>

<Note>
  If your client isn't listed, check its MCP docs for **remote / hosted HTTP MCP server** support. If it has a header field, use the `Authorization: Bearer cited_sk_…` header; if not, use the key-in-URL form (`…/mcp/?key=cited_sk_…`).
</Note>

***

## Verify

Ask your assistant: *"use Cited — whoami, and list my brands."* It should return your brands (id + role). Then try the recursive metrics primitive, e.g. *"use Cited — cube\_slice for \<brand>, metric citation\_share, broken down by platform"*, and head to [Recipes](/mcp/recipes).

## Troubleshooting

**Sign-in (Option A)**

* **"Authorization failed" / no brands after signing in** — you signed in with an email that isn't on a Cited brand. Sign in with the Google account whose email is on your brand (Settings → Manage Users shows brand members).
* **Connector won't connect** — remove and re-add it (URL only, OAuth fields blank), then Connect again.

**API key (Option B)**

* **"Missing API key"** — the key isn't reaching the server. Re-check the header value / the `?key=` in the URL, and make sure you copied the whole `cited_sk_…`.
* **"Invalid API key"** — the key is wrong, expired, or revoked. Create a fresh one in Settings → API & MCP.
* **"API key not granted this brand"** — the `brand_id` you passed isn't on your key. Call `list_brands` to see what it can access.

**Both**

* **Connected but tool calls fail** — a *connection* only lists tools (no auth needed); the first tool call is where auth is checked. If that fails, the credential/identity isn't attached — recheck your connect step.
