---
title: Connect to the remote MCP server
description: Connect an MCP-compatible agent to a deployed Thally site so it can search and read your documentation.
url: https://pr-7-a9c4e9fe1b6c.thally.app/guides/remote-mcp
---

# Connect to the remote MCP server

Connect an MCP-compatible agent to a deployed Thally site so it can search and read your documentation.

A deployed Thally site exposes a remote [Model Context Protocol](https://modelcontextprotocol.io)
server at `/api/mcp` when MCP is enabled. An MCP-compatible client can connect
over HTTP to search the docs, read pages, list the site, and check the Agent
Readiness Score.

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. |

> **Note:**
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 is enabled by default. Two optional environment variables adjust 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.