> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt.
> For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# MCP Server

> Connect Cursor, Claude Code, and other AI coding assistants to the Sarvam docs MCP server so they can search the documentation while they help you build.

The Sarvam docs expose a [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server. Connect it to your AI coding assistant and the assistant can **search the live documentation on demand** — so the code it writes uses the right models, parameters, and endpoints instead of guessing from stale training data.

## Server details

| Field       | Value                                                 |
| ----------- | ----------------------------------------------------- |
| Server name | `sarvam-docs`                                         |
| Transport   | Streamable HTTP                                       |
| Endpoint    | `https://docs.sarvam.ai/_mcp/server`                  |
| Tool        | `searchDocs` — semantic search over the documentation |

## Connect your assistant

Add the server to `.cursor/mcp.json` in your project root (or `~/.cursor/mcp.json` to enable it everywhere):

```json
{
  "mcpServers": {
    "sarvam-docs": {
      "url": "https://docs.sarvam.ai/_mcp/server"
    }
  }
}
```

Then open **Cursor Settings → MCP** and confirm `sarvam-docs` shows a green "connected" status.

Register the server from your terminal:

```bash
claude mcp add --transport http sarvam-docs https://docs.sarvam.ai/_mcp/server
```

Verify it is connected:

```bash
claude mcp list
```

Any MCP-compatible client can connect using the streamable-HTTP endpoint:

```
https://docs.sarvam.ai/_mcp/server
```

Point your client's MCP configuration at that URL with the HTTP transport.

## Try it

Once connected, ask your assistant something that requires current docs, for example:

> "Using the Sarvam docs, write a Python script that transcribes `audio.wav` with the latest speech-to-text model."

The assistant calls `searchDocs`, pulls the relevant page, and writes code against the current API.

Prefer zero setup? Every page has **Ask AI** and **Open in Claude / ChatGPT / Cursor** actions in the toolbar at the top — no configuration required.

## MCP vs. `llms.txt`

The MCP server is best when you want an assistant to **fetch docs on demand** during a coding session. If you instead want to hand an LLM the **entire documentation up front** (for retrieval, fine-tuning context, or offline use), use [`llms.txt`](/api-reference-docs/developer-tools/llms-txt).

## Related pages

* [llms.txt & Markdown docs](/api-reference-docs/developer-tools/llms-txt)
* [SDKs & Libraries](/api-reference-docs/getting-started/sd-ks-libraries)
* [Errors & Troubleshooting](/api-reference-docs/errors-troubleshooting)