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

# MCP server overview

> Drive the entire Anyreach API from an MCP client.

Anyreach hosts a Model Context Protocol (MCP) server at `/mcp` that lets any MCP client drive the whole REST API. Point Claude Desktop, Cursor, or a custom agent at it, and the LLM can discover and invoke any Anyreach operation without per-endpoint integration code.

The server runs on the same host as the REST API, at `https://api.anyreach.ai/mcp/`. It uses the streamable-HTTP transport, returns plain JSON responses, and is stateless: every request is self-contained, so there is no session to establish or keep alive.

<Note>
  This is an MCP **server**, not a client. Anyreach exposes its own API as MCP tools for external agents to call. It does not consume external MCP servers as tools inside an Anyreach agent.
</Note>

## Four meta-tools

Anyreach has hundreds of API operations. Rather than register one MCP tool per endpoint, which would flood an LLM's context, the server exposes four generic meta-tools. The model uses them to discover what exists, fetch a schema, then invoke the operation.

| Tool             | What it does                                                                                                                           |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `list_all_tools` | Lists every operation by `name` with a one-line description. Names and descriptions only, no schemas.                                  |
| `search_tools`   | Finds operations matching a natural-language `query`. Returns the top matches with their input schemas inline. Defaults to 10 results. |
| `describe_tool`  | Fetches the full JSON Schema and metadata (`service`, `method`, `path`, `tags`) for one operation by `name`.                           |
| `call_tool`      | Invokes an operation by `name` with `arguments` and an optional `organization_id`. Returns the upstream JSON response.                 |

A typical client loop:

```
search_tools("create an outbound campaign")   -> candidate tool names + schemas
describe_tool("campaign_create_campaign")      -> resolved input schema   (optional)
call_tool("campaign_create_campaign", {...}, organization_id="org_...")
```

Tool names are prefixed with their service, for example `core_list_agents`. See [Tools and discovery](/mcp/tools-and-discovery) for the full discovery flow.

## What it proxies

The server introspects each downstream service's OpenAPI spec and flattens it into a single catalog of operations. It covers five services:

| Service          | Surface                                         |
| ---------------- | ----------------------------------------------- |
| `core`           | Voice and chat agents, conversations, telephony |
| `workflow`       | Automation workflows                            |
| `knowledge_base` | Documents, embeddings, and search               |
| `campaign`       | Outbound campaigns                              |
| `admin`          | Users and organizations                         |

`call_tool` forwards your credentials as-is to the matching downstream service per call. No new tokens are minted. See [Coverage and limits](/mcp/coverage-and-limits) for what is and is not exposed.

## Authentication

Every request to the MCP transport must carry a Bearer credential, and most operations are org-scoped.

* Send `Authorization: Bearer <token>` on the MCP transport, using a user PAT (`pat_`) or an org API key (`ak_`).
* A user PAT also needs an org context. Send `X-Anyreach-Org: <organization_id>` on the transport, and pass `organization_id` to `call_tool` for org-scoped operations.
* An org API key (`ak_`) carries its org implicitly.

If a downstream operation returns a `401` mentioning a missing organization claim, supply the organization and retry. See [Connecting a client](/mcp/connecting-a-client) for client configuration.

## Next steps

<CardGroup cols={3}>
  <Card title="Connecting a client" icon="plug" href="/mcp/connecting-a-client">
    Configure Claude Desktop, Cursor, or a custom agent against the MCP endpoint.
  </Card>

  <Card title="Tools and discovery" icon="magnifying-glass" href="/mcp/tools-and-discovery">
    How the four meta-tools work and how to drive the discover-then-invoke loop.
  </Card>

  <Card title="Coverage and limits" icon="list-check" href="/mcp/coverage-and-limits">
    Which operations are exposed and the constraints that apply.
  </Card>
</CardGroup>
