---
title: Remote MCP server
description: Every deployed Thally site is a Model Context Protocol server — attach it to any agent and your docs become native tools.
url: http://localhost:3040/guides/remote-mcp
---

# Remote MCP server

Every deployed Thally site is a Model Context Protocol server — attach it to any agent and your docs become native tools.

Every deployed Thally site exposes a **remote [Model Context Protocol](https://modelcontextprotocol.io) server** at `/api/mcp`. Any MCP-capable agent — Claude Code, Claude Desktop, Cursor, or your own — attaches over HTTP and gets your documentation as **native tools**: it can search, read pages, list the site, and check the Agent Readiness Score without you writing a line of integration code.

This is different from the [local MCP server](/guides/mcp-server) (`@thallylabs/mcp`), which operates on a project directory on your machine. The remote server runs **inside your deployed site** and serves exactly what the site serves.

## Attach it

```bash Claude Code
claude mcp add --transport http thally https://docs.example.com/api/mcp
```

```bash claude_desktop_config.json
{
  "mcpServers": {
    "thally": {
      "type": "http",
      "url": "https://docs.example.com/api/mcp"
    }
  }
}
```

Replace `https://docs.example.com` with your site's URL. That's it — no key, no account. On a public docs site the tools are open to any agent.

## Tools

| Tool | Arguments | What it does |
| --- | --- | --- |
| `search_docs` | `query`, `limit?` | Full-text search across all pages; returns titles, URLs, and snippets. |
| `read_page` | `pageId` | Returns a page's full Markdown by its ID or URL path. |
| `list_pages` | — | Lists every page with its ID, title, and URL. |
| `agent_readiness` | — | Returns the site's Agent Readiness Score with per-signal subscores. |

The tools are **read-only**. Editing docs through an agent is handled by the [docs agent](/guides/cli-reference) via reviewed pull requests, not by the public endpoint.

## Configuration

The endpoint works with zero configuration. Two optional environment variables tune it:

| Variable | Default | Purpose |
| --- | --- | --- |
| `THALLY_MCP_RATE_PER_MIN` | `60` | Per-IP ceiling on tool calls per minute (`0` disables). Backed by [durable storage](/guides/ai-features) when configured. |
| `THALLY_DATABASE_URL` | — | Point at Turso/libSQL to make the rate limit durable and shared across serverless instances. |

`search_docs` runs in **full-text** mode on the remote endpoint — it never embeds the query — so an anonymous, public server stays cheap. Semantic (hybrid) search remains available in-app and via `/api/search`.

## Verify it

Point the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) at your endpoint:

```bash
npx @modelcontextprotocol/inspector --cli https://docs.example.com/api/mcp --transport http --method tools/list
```

You should see the four tools listed. The endpoint is also advertised in your site's `llms.txt`, `ai.txt`, `skill.md`, and `/api/docs-index`, so agents can discover it on their own.