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

# MCP Server

HolyDocs provides a per-project Model Context Protocol (MCP) server that lets AI tools read and search your documentation.

## Overview

HolyDocs includes a built-in [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server for each project. This allows AI coding assistants like Claude, Cursor, and Windsurf to directly access your documentation as context when helping developers write code.

## How It Works

Each HolyDocs project exposes an MCP endpoint that AI tools can connect to. The MCP server provides tools for:

- **Searching documentation** — Semantic and keyword search across all pages
- **Reading pages** — Fetch the full content of any documentation page
- **Listing pages** — Browse the documentation structure
- **Getting configuration** — Access the project's docs.json configuration

## MCP Endpoint

The MCP server uses the Streamable HTTP transport (stateless JSON-RPC):

```
POST https://api.holydocs.com/api/v1/mcp/{projectId}/message
```

Each request sends a JSON-RPC message and receives a JSON-RPC response. No session state is maintained between requests.

## Connecting AI Tools

### Claude Desktop

Add the MCP server to your Claude Desktop configuration at `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "holydocs": {
      "url": "https://api.holydocs.com/api/v1/mcp/YOUR_PROJECT_ID/message"
    }
  }
}
```

### Cursor

In Cursor settings, add a new MCP server:

1. Open **Settings > MCP**
2. Click **Add Server**
3. Set the URL to `https://api.holydocs.com/api/v1/mcp/YOUR_PROJECT_ID/message`
4. Set the transport type to **Streamable HTTP**

### Windsurf

Configure MCP in your Windsurf settings:

```json
{
  "mcp": {
    "servers": {
      "holydocs-docs": {
        "url": "https://api.holydocs.com/api/v1/mcp/YOUR_PROJECT_ID/message",
        "transport": "streamable-http"
      }
    }
  }
}
```

## Available Tools

The MCP server exposes these tools to connected AI assistants:

### `search_docs`

Search the documentation using a natural language query.

```json
{
  "name": "search_docs",
  "arguments": {
    "query": "How to set up custom domains",
    "limit": 5
  }
}
```

### `get_page`

Retrieve the full content of a specific documentation page.

```json
{
  "name": "get_page",
  "arguments": {
    "path": "/custom-domains"
  }
}
```

### `list_pages`

List all available documentation pages with their titles and paths.

```json
{
  "name": "list_pages",
  "arguments": {}
}
```

## Server Capabilities

Query the server info endpoint to see available capabilities:

```bash
curl "https://api.holydocs.com/api/v1/mcp/PROJECT_ID/info"
```

Response:

```json
{
  "name": "holydocs-docs",
  "version": "1.0.0",
  "capabilities": {
    "tools": true,
    "resources": false,
    "prompts": false
  }
}
```

## Plan Requirements

| Plan | MCP Server |
|---|---|
| Free | Not available |
| Starter | Available |
| Pro | Available |
| Business | Available |
| Enterprise | Available |

The MCP endpoint is public (no authentication required) so that AI tools can access your documentation without managing API keys. If your docs use content authentication, the MCP server only exposes public pages.

## Dashboard Configuration

Find your project's MCP URL and configuration in the dashboard:

1. Go to **AI Features** in your project sidebar
2. Scroll to the **MCP Server** section
3. Copy the endpoint URL and configuration snippets for your preferred AI tool