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

# MCP server

> Connect any MCP client to your Mesa repositories and let your agent read, write, and version files directly.

Mesa runs a hosted **Model Context Protocol (MCP)** server. Connect any MCP-compatible client such as Claude Code, Codex, Cursor, OpenCode, etc, and your agent can read and write versioned files in your repositories, create changes, move bookmarks, and inspect history, all through tools designed for agentic workflows.

## What your agent can do

Once connected, you can ask your agent to work directly against your repos. For example:

* *"Read `TODO.md` from the `dev` repo and summarize the open tasks."*
* *"Create a repo `prototype`, design a landing page, and publish it to `main`."*
* *"Fan out subagents to create an onboarding flow, each on its own bookmark of the `web` repo, then publish the best one."*
* *"My overnight agent rewrote the billing module. Show me every change it went through, where did it go wrong?"*

Your agent picks the right tools, addresses your repos and bookmarks, and writes to Mesa's versioned storage.

## How it works

* **Authenticate once.** Sign in with OAuth from inside your client, or use a repo-scoped API key. See [Authentication](/content/reference/mcp/authentication).
* **Use Mesa's 22 tools.** Repositories, changes, bookmarks, commits, content, and diffs. See the full [Tool reference](/content/reference/mcp/tools).
* **Teach your agent nothing.** The server ships its own usage guide to the agent on connect, so your agent already knows Mesa's change model, the canonical workflow, and how to recover from concurrency conflicts.

## Up next

<Columns cols={2}>
  <Card title="Connect a client" icon="plug" href="/content/reference/mcp/connect">
    Copy-paste setup for Claude Code, Codex, Cursor, VS Code, OpenCode, and Claude Desktop.
  </Card>

  <Card title="Authentication" icon="key" href="/content/reference/mcp/authentication">
    Scopes, repo-scoped API keys, and auth errors.
  </Card>

  <Card title="Tool reference" icon="wrench" href="/content/reference/mcp/tools">
    Every tool the server exposes, the access it needs, and what it does.
  </Card>

  <Card title="Versioning" icon="code-commit" href="/content/concepts/versioning">
    The change, commit, and bookmark model your agent operates on.
  </Card>
</Columns>
