# MCP server (/docs/api/mcp)



Recall runs an MCP server, so an AI agent can read a brand's visibility, share of voice, cited sources and answers, and add prompts to track.

|           |                                                                         |
| --------- | ----------------------------------------------------------------------- |
| URL       | `https://app.dorecall.com/api/mcp` (self-hosted: `<APP_URL>/api/mcp`)   |
| Transport | Streamable HTTP, stateless                                              |
| Auth      | Organization API key as `Authorization: Bearer rcl_…`, or OAuth sign-in |

There are two ways to authenticate:

* **API key.** Create one in **Settings → API keys** (see [API keys](/docs/api/api-keys)). It acts for one organization. A read key gets the read tools; a read-and-write key also gets `create_prompts`.
* **OAuth.** Clients that support it open a Recall page where you sign in and choose **Allow**. The connection then acts as you, in every organization you belong to, with read and write access. To disconnect, remove the server from the client.

The server lists only the tools the connection may call.

## Connect [#connect]

### Claude Code [#claude-code]

With an API key:

```bash
claude mcp add --transport http recall https://app.dorecall.com/api/mcp \
  --header "Authorization: Bearer rcl_YOUR_KEY"
```

With OAuth, add the server without a header, then run `/mcp` in Claude Code and choose **Authenticate**:

```bash
claude mcp add --transport http recall https://app.dorecall.com/api/mcp
```

### Cursor [#cursor]

Add to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):

```json
{
  "mcpServers": {
    "recall": {
      "url": "https://app.dorecall.com/api/mcp",
      "headers": {
        "Authorization": "Bearer rcl_YOUR_KEY"
      }
    }
  }
}
```

To use OAuth instead, leave out `headers`; Cursor shows a **Connect** button for the server in **Settings → MCP**.

### Claude Desktop and claude.ai [#claude-desktop-and-claudeai]

With OAuth: **Settings → Connectors → Add custom connector**. Name it `Recall`, enter `https://app.dorecall.com/api/mcp`, choose **Add**, then **Connect** and approve the request in Recall.

With an API key: add to `claude_desktop_config.json` (**Settings → Developer → Edit Config**) and restart Claude Desktop. This uses [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) to send the header and needs Node.js.

```json
{
  "mcpServers": {
    "recall": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://app.dorecall.com/api/mcp",
        "--header",
        "Authorization:${RECALL_API_KEY}"
      ],
      "env": {
        "RECALL_API_KEY": "Bearer rcl_YOUR_KEY"
      }
    }
  }
}
```

### ChatGPT [#chatgpt]

ChatGPT connects with OAuth only.

. **Settings → Apps & Connectors → Advanced settings**: turn on **Developer mode**.
. **Settings → Apps & Connectors → Create**.
. Name: `Recall`. MCP server URL: `https://app.dorecall.com/api/mcp`. Authentication: **OAuth**.
. Choose **Create**, then sign in to Recall and choose **Allow**.

ChatGPT asks before running `create_prompts`; the read tools run without asking.

### Check the connection [#check-the-connection]

Ask the agent to call `whoami`. It returns how the connection is authenticated, its organizations and scopes, and the tools it can use.

### OAuth details [#oauth-details]

For client developers. Discovery follows RFC 9728 and RFC 8414: a request without credentials gets `401` with `WWW-Authenticate: Bearer resource_metadata="<APP_URL>/.well-known/oauth-protected-resource"`.

|                               |                                                                    |
| ----------------------------- | ------------------------------------------------------------------ |
| Authorization server metadata | `<APP_URL>/.well-known/oauth-authorization-server`                 |
| Authorization endpoint        | `<APP_URL>/auth/authorize`                                         |
| Token endpoint                | `<APP_URL>/api/auth/mcp/token`                                     |
| Dynamic client registration   | `<APP_URL>/api/auth/mcp/register`                                  |
| Grant types                   | `authorization_code` with PKCE (`S256`, required), `refresh_token` |
| Scopes                        | `openid`, `profile`, `email`, `offline_access`                     |
| Token lifetime                | Access token 1 hour, refresh token 7 days                          |

## Numbers [#numbers]

* Rates and shares are fractions of 1, not percentages.
* Every number comes with `n` (the answers behind it), the `window`, and the `engine` it describes. `engine: "all"` covers every engine.
* Visibility counts measurable answers only. Refused, unanswered and failed runs are reported under `excluded`, not counted as absences.
* Windows are whole UTC days, both ends inclusive. Pass `days` (1–365, default 30, ending today) or `from` and `to` as `YYYY-MM-DD` (up to 366 days).
* `engine` filters to one engine id: `chatgpt`, `claude`, `perplexity`, `gemini`, `google-ai-overview`, `google-ai-mode`, `copilot`, `grok`, `mistral`, `deepseek`, `kimi`.

## Tools [#tools]

Every brand tool takes a `brandId` from `list_brands`. A brand in another organization returns `Brand not found`, the same as one that does not exist.

Read tools are annotated `readOnlyHint: true`. `create_prompts` is a write tool annotated `destructiveHint: false`: it only adds prompts. Any future write tool that changes or deletes data is annotated destructive.

| Tool                    | Scope | Inputs                                                                                                                      | Output                                                                                                                                                                                                                                                                                                                   |
| ----------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `whoami`                | read  | none                                                                                                                        | `kind` (`organization-api-key` or `oauth-user`), `keyName` or `email`, `organizationIds`, `scopes`, `tools`                                                                                                                                                                                                              |
| `list_brands`           | read  | none                                                                                                                        | `brands[]`: `id`, `name`, `website`, `additionalDomains`, `organizationId`, `enabled`, `engines`, `locale`                                                                                                                                                                                                               |
| `get_visibility`        | read  | `brandId`; `days` or `from`+`to`; `engine`                                                                                  | `window`, `prompts`; per engine and `allEngines`: `engine`, `visibility` and `nonBrandedVisibility` as `{ n, successes, rate, ci95 }`, `excluded { refused, noAnswer, error }`                                                                                                                                           |
| `get_share_of_voice`    | read  | `brandId`; `days` or `from`+`to`; `engine`                                                                                  | `window`, `competitorSet { version, locked, approvedAt, names }`; per engine and `allEngines`: `engine`, `n`, `totalMentions`, `entries[] { name, isBrand, mentions, share }`                                                                                                                                            |
| `get_top_cited_sources` | read  | `brandId`; `days` or `from`+`to`; `engine`; `limit` (1–100, default 20)                                                     | `window`, `engine`, `n`, `runsWithCitations`; `domains[] { domain, category, runs, runShare, citations, prompts }`; `urls[] { url, domain, title, category, runs, runShare, citations, prompts }`                                                                                                                        |
| `search_answers`        | read  | `brandId`; `days` or `from`+`to`; `engine`; `promptId`; `mentioned` (boolean); `contains` (text); `limit` (1–20, default 5) | `window`, `engine`, `n`, `scanned`, `matched`; `answers[] { runId, promptId, prompt, engine, observedAt, outcome, brandMentioned, competitorsMentioned, text, truncated, citations[] }`                                                                                                                                  |
| `list_prompts`          | read  | `brandId`; `enabled` (boolean)                                                                                              | `total`, `enabled`, `prompts[] { id, value, enabled, tags, intentRole, createdAt }`                                                                                                                                                                                                                                      |
| `create_prompts`        | write | `brandId`; `prompts[] { value, tags? }` (1–20)                                                                              | `created[] { id, value }`, `skipped[] { value, reason }`, `scopeVersion`, `total`, `limit`                                                                                                                                                                                                                               |
| `get_briefing`          | read  | `brandId`                                                                                                                   | `nextActions[] { title, detail, urgency, minutes }`; `recommendation { title, category, why, relatedPrompts, brandPagesCited, competitorPagesCited, deliverable }`; `changes { previousWindow, currentWindow, items[] { kind, title, detail, deltaPercentagePoints, engine, previous { n }, current { n }, evidence } }` |

### Details [#details]

* **`get_visibility`** — share of measurable answers that mention the brand, with a 95% Wilson interval. `nonBrandedVisibility` counts only prompts that do not name the brand. Computed over enabled prompts.
* **`get_share_of_voice`** — mentions of the brand and of each competitor in the approved competitor set, as a share of all their mentions. A run that names an entity counts once. `competitorSet.locked` is `false` when no set has been approved yet; the approved competitors are used instead.
* **`get_top_cited_sources`** — ranked by the number of answers that cited a source (`runs`), not by raw citation count. `runShare` is `runs / n`. `category` is `brand`, `competitor`, or the source type (`editorial`, `reviews`, `social`, …).
* **`search_answers`** — newest first. `n` is the number of runs matching every filter except `contains`. A `contains` search reads at most the 500 most recent of those (`scanned`) and reports how many matched. Answer text is cut at 4,000 characters (`truncated`).
* **`create_prompts`** — adds prompts and approves the new prompt set, as saving prompts in Settings does. Each new prompt is asked on every enabled engine from then on, which is billed usage. A prompt that matches an existing one (ignoring case and spacing) is skipped. A brand can track at most 100 prompts. It never edits or removes a prompt, so it is not marked destructive.
* **`get_briefing`** — the to-do list, the top recommendation of the latest plan with the cited pages behind it, and the week-over-week changes from the Briefing. Changes compare the last 7 days with the 7 before, across all engines; `previous.n` and `current.n` are the comparable answers in each period, and `evidence` is one answer that shows the change.

## Errors [#errors]

A failed tool call returns `isError: true` with a message, for example `Brand not found` or a window that is out of range. A request without a valid key or token gets HTTP 401 with a `WWW-Authenticate` challenge. Operator keys (`ADMIN_API_KEYS`) are not accepted. A key that sends more than 600 requests a minute gets HTTP 429 with `Retry-After`.

MCP is not available on the read-only demo.
