# Connect an MCP client

> For AI agents: the index of these docs is at https://indrava.forumulate.com/docs/llms.txt (every page it lists has a Markdown version like this one).

Set up the Indrava MCP server in Claude Code, Cursor, VS Code and other MCP clients.

Indrava has a Model Context Protocol (MCP) server so that AI agents can read channels and write, schedule and retry posts. Every operation of the REST API is one MCP tool. There is one tool beyond those, `media_uploadLink`, described under [Tools](#tools).

|  |  |
| --- | --- |
| Address | `http://localhost:4000/mcp` (your Indrava API address, then `/mcp`) |
| Transport | Streamable HTTP |
| Authentication | OAuth, or an API key as a bearer token |

The server keeps no session between requests, so any request can be answered on its own.

## Choose how the client signs in

- **OAuth.** If your client supports OAuth for remote MCP servers, give it only the address. It opens a browser, you sign in to Indrava and approve the scopes, and the client acts as you. Nothing has to be pasted.
- **API key.** For clients without OAuth, and for unattended agents, create a key on the **Developers** screen with only the scopes the agent needs and send it in the `Authorization` header.

Both are described in [Authentication](https://indrava.forumulate.com/docs/authentication).

:::hint{style="warning" title="Give an agent only what it needs"}
A key with `posts:write` and `posts:publish` can publish at once to every channel of the workspace. For an agent that should only prepare posts, make its key without `posts:publish`: it can then save drafts and nothing else reaches the calendar. With an approval workflow switched on in **Settings → Approvals**, the agent can also submit its drafts for approval.
:::

## Claude Code

With an API key:

```bash
claude mcp add --transport http indrava http://localhost:4000/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"
```

With OAuth, leave the header out, then run `/mcp` inside Claude Code and choose to authenticate:

```bash
claude mcp add --transport http indrava http://localhost:4000/mcp
```

## Cursor

Add the server to `.cursor/mcp.json` in your project, or to `~/.cursor/mcp.json` for every project:

```json
{
  "mcpServers": {
    "indrava": {
      "url": "http://localhost:4000/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}
```

## VS Code

Add the server to `.vscode/mcp.json`:

```json
{
  "servers": {
    "indrava": {
      "type": "http",
      "url": "http://localhost:4000/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}
```

## Other clients

Most clients read a configuration of this shape. The Developers screen in the app shows it with your address filled in:

```json
{
  "mcpServers": {
    "indrava": {
      "type": "http",
      "url": "http://localhost:4000/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}
```

If a client can be given only an address and no header, use `http://localhost:4000/mcp/YOUR_API_KEY`. The key is then part of the address and can end up in logs, so use the header wherever the client can send one.

If a client copes badly with a long list of tools, name the groups it needs: `http://localhost:4000/mcp?tools=posts,media,channels` offers only the tools whose names start with those words.

A client that runs in a vendor's cloud, such as a connector in a hosted chat app, can only reach an Indrava API that is on the public internet over HTTPS. It cannot reach `localhost`.

## Tools

A tool is named after its operation with an underscore: `posts_save`, `posts_list`, `channels_list`, `slots_enqueue`. Its input is the same as the REST operation's parameters and body, and its result is the same JSON, as text. Tools from `GET` operations are marked read-only and tools from `DELETE` operations are marked destructive, so a client can ask before running them.

A chat client cannot send a file through a tool call. `media_uploadLink` returns a link that works for 15 minutes and can do nothing but add one file to the media library: the person opens it in a browser and picks the file. When the file is already on the internet, use `media_importUrl` instead.

The [operations page](https://indrava.forumulate.com/docs/operations) lists every tool with its scope and inputs.

## Check that it works

Ask the agent to list your Indrava channels. It should call `channels_list` and name the accounts you connected. If it reports an error:

| The agent sees | Cause |
| --- | --- |
| `401` when connecting | The key is wrong or revoked, or the OAuth sign-in was not finished |
| `Missing scope channels:read` | The key or token does not carry that scope |
| `Missing scope posts:publish` | The key may save drafts only. Save a draft, or use a key that may publish |
| `Rate limit exceeded` | See [Rate limits](https://indrava.forumulate.com/docs/rate-limits) |

---

## For AI agents

- This page for a human reader: https://indrava.forumulate.com/docs/mcp
- The whole space as one Markdown file: https://indrava.forumulate.com/docs/llms-full.txt
- Live search + fetch over MCP: https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/mcp
  - Install (Claude CLI): `claude mcp add forumulate-docs --transport http https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/mcp`

This Markdown is the same content the page renders — safe to quote and to ground answers in.
