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

# Connect to Our Docs via MCP

> Query Contextual AI documentation directly from Claude, Cursor, VS Code, and other AI tools

Query Contextual AI documentation in real-time from your favorite AI tools using the Model Context Protocol (MCP). Ask questions about our APIs, SDKs, Agent Composer, and more—without leaving your development environment.

## Overview

Our documentation is available as an MCP server, allowing AI applications to search and retrieve information directly. This means you can:

* **Ask questions** about Contextual AI APIs and features while coding
* **Get code examples** from our documentation in context
* **Search across all docs** without switching browser tabs

## MCP Server URL

```
https://docs.contextual.ai/mcp
```

***

## Setup Instructions

### Claude Desktop

1. Navigate to Claude's [Connectors settings page](https://claude.ai/settings/connectors)
2. Select **Add custom connector**
3. Enter the details:
   * **Name:** `Contextual AI Docs`
   * **URL:** `https://docs.contextual.ai/mcp`
4. Click **Add**
5. During chat, use the attachments button (plus icon) to access the docs

### Claude Code

Run this command in your terminal:

```bash theme={null}
claude mcp add --transport http contextual-docs https://docs.contextual.ai/mcp
```

Verify the installation:

```bash theme={null}
claude mcp list
```

### Cursor

1. Open the command palette (<kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> on Mac, <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> on Windows)
2. Search for **MCP: Open User Configuration**
3. Add the following to your `mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "contextual-docs": {
      "url": "https://docs.contextual.ai/mcp"
    }
  }
}
```

4. Restart Cursor

### VS Code

Create a `.vscode/mcp.json` file in your project:

```json theme={null}
{
  "servers": {
    "contextual-docs": {
      "type": "http",
      "url": "https://docs.contextual.ai/mcp"
    }
  }
}
```

***

## Usage Examples

Once connected, you can ask questions like:

* "How do I create a datastore using the Python SDK?"
* "What are the parameters for the rerank API?"
* "Show me an example of Agent Composer YAML configuration"
* "How do I configure retrieval settings for my agent?"

Your AI tool will search the Contextual AI documentation and provide answers with relevant context.

***

## Notes

* The MCP server provides access to all public documentation pages
* Multiple MCP servers can be connected simultaneously—context is only consumed when actively searched
* The AI tool automatically determines when to search based on your query

***

## Related Resources

* [Contextual AI MCP Server](/quickstarts/mcp-server) — Build your own RAG-powered MCP server with Contextual AI
* [Python SDK Reference](/sdks/python) — Full SDK documentation
* [API Reference](/api-reference) — Complete API documentation
