# Docs MCP Server



These docs are themselves an MCP server. Point any MCP client at
`https://docs.withsurface.com/mcp` and it can search every page and read it as
Markdown, instead of scraping HTML or guessing. No API key: the docs are public.

<Info>
  This is not the Surface MCP server. `docs.withsurface.com/mcp` is the
  documentation, read only and unauthenticated. `app.withsurface.com/mcp` is
  your workspace: forms, leads, responses and the Vault. See
  [Overview](/mcp-server/overview) for that one.
</Info>

## Connect [#connect]

<CodeBlockTabs defaultValue="Claude Code">
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="Claude Code">
      Claude Code
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="Cursor">
      Cursor
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="Claude Desktop">
      Claude Desktop
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="Claude Code">
    ```bash
    claude mcp add --transport http surface-docs https://docs.withsurface.com/mcp
    ```
  </CodeBlockTab>

  <CodeBlockTab value="Cursor">
    ```json
    // .cursor/mcp.json
    {
      "mcpServers": {
        "surface-docs": {
          "url": "https://docs.withsurface.com/mcp"
        }
      }
    }
    ```
  </CodeBlockTab>

  <CodeBlockTab value="Claude Desktop">
    ```json
    // claude_desktop_config.json
    {
      "mcpServers": {
        "surface-docs": {
          "url": "https://docs.withsurface.com/mcp"
        }
      }
    }
    ```
  </CodeBlockTab>
</CodeBlockTabs>

## Tools [#tools]

| Tool                  | What it does                                                                                                                                                      |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search_surface_docs` | Searches every page and returns the best matching ones, each with its path and a few matching snippets. Takes `query` and an optional `limit` (pages, default 8). |
| `list_surface_docs`   | Lists every page as path, title and description, in sidebar order, grouped by section. Takes an optional `section`, for example `platform` or `/build/webhooks`.  |
| `get_surface_doc`     | Returns one page as Markdown. Takes `path`, either a path or a full URL, with or without a `.md` suffix or an anchor.                                             |

The usual loop is one search, then a fetch of the two or three pages worth
reading in full. Reach for `list_surface_docs` when you want to see the shape
of a section rather than hunt for a phrase in it.

The server is public, unauthenticated and CORS enabled, so a browser based
client can call it directly.

## Without MCP [#without-mcp]

Every page is also plain Markdown over HTTP, which is the better fit for a
script or a crawler:

| URL                 | What                                                                |
| ------------------- | ------------------------------------------------------------------- |
| `/llms.txt`         | The whole site as a linked index                                    |
| `/llms-full.txt`    | Every page's Markdown in one file                                   |
| `<any-page-url>.md` | That page as Markdown, for example [/quickstart.md](/quickstart.md) |
