# Pane MCP server and your MCP servers

MCP (Model Context Protocol) is how an agent talks to tools outside itself. With Pane, MCP works two ways:

1. **Pane is an MCP server.** Your agents get tools to drive Pane: start other agents, check on them, send them follow-ups, read their screens, and manage panes.
2. **Your MCP servers keep working.** Claude Code in a pane reads `.mcp.json` and `~/.claude.json` like it does in any terminal. Same for Codex, Cursor and every other agent.

## Pane's MCP server

Install Pane and you're done. On launch, Pane registers a `pane` MCP server with every agent it finds:

| Agent | Where Pane registers it |
|-------|-------------------------|
| Claude Code | `~/.claude.json` (user scope, via `claude mcp add`) |
| Codex | `[mcp_servers.pane]` in `~/.codex/config.toml` |
| Cursor | `mcpServers.pane` in `~/.cursor/mcp.json` |

On Windows, Pane also registers inside each WSL distro where you've saved a repo. You don't need Node or npm for any of it. The server runs from Pane's own bundled copy of the `runpane` CLI.

Restart a running `claude` or `codex` session to pick it up. In Cursor, start a new chat. Check it worked with `claude mcp list`, `codex mcp list` or `agent mcp list`.

Pane also installs a small `pane` skill in each agent's home skill folder (like `~/.claude/skills`, `~/.agents/skills`, and the Codex and Cursor ones), including inside WSL distros. It tells agents how to find and use Pane. Pane never edits your repos for this, and it only ever touches its own copy.

Pane is careful with your config files. It only touches the `pane` entry it wrote. Your other servers, settings and comments stay exactly as they were. If you added a `pane` entry yourself, Pane leaves it alone.

### What your agent can do with it

By default, the server gives your agent a short list of tools. Fewer tools means the model picks the right one more often:

- `agents_start`: create a pane, start an agent on a task, and wait until it's ready
- `agents_status`: is that agent working, done, waiting on you, or stuck? Plus its current screen.
- `agents_send`: send a follow-up and confirm the agent got it
- `panels_input`: press exact keys, for menus and prompts
- `repos_list`, `repos_add`, `panes_list`, `workspace_state`, `panes_git_status`, `panes_archive`, `panes_restore`
- `links_create`: make a `pane://` link that opens a pane, repo or Session in Pane
- `docs_search`, `docs_read`: search Pane's docs, offline
- `doctor`: check that Pane is reachable

Want more? Run the server with extra toolsets, like `runpane mcp --toolsets core,git`. The toolsets are `agents`, `panes`, `panels`, `git`, `sessions`, `repos`, `docs`, `links`, `admin`, `all` and `read`. Add `--read-only` to keep only tools that don't change anything. To register every tool from the app, open **Settings → AI & Agents → Pane tools to register** and choose all.

### Turning it off

Open **Settings → AI & Agents** and switch off **Register Pane tools with Claude Code, Codex, and Cursor**. Pane removes its entry from each config.

### MCP or CLI?

Both do the same job. The MCP server is built on the [`runpane` CLI](/docs/runpane-cli), so anything an agent can do through MCP, it can also do with `runpane` commands in a terminal. Use whichever your agent handles better.

## Your own MCP servers

A pane is a real terminal. Claude Code running inside it reads `.mcp.json` exactly like it would anywhere else. So does any other agent that supports MCP. Pane gives each agent its own shell and worktree, and the agent handles its MCP servers on its own.

## Example: Context7 docs lookup

Drop an `.mcp.json` at the root of your worktree:

```json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp@latest"]
    }
  }
}
```

Claude Code will connect automatically the next time you start it.

<TerminalPreview lines={[
  { type: "command", text: "claude" },
  { type: "output",  text: "MCP server \"context7\" connected" },
  { type: "output",  text: "" },
  { type: "command", text: "How does React's reconciler work? Use context7." },
  { type: "success", text: "Fetched 12 docs from context7 (react)" },
  { type: "output",  text: "The reconciler works by diffing two fiber trees..." }
]} />

Source: [github.com/upstash/context7](https://github.com/upstash/context7)

## Example: Linear ticket to PR

```json
{
  "mcpServers": {
    "linear": {
      "command": "npx",
      "args": ["-y", "linear-mcp-server"],
      "env": {
        "LINEAR_API_KEY": "${LINEAR_API_KEY}"
      }
    }
  }
}
```

Workflow inside a Pane terminal:

1. Agent reads the Linear issue via MCP.
2. Agent writes code in the worktree.
3. Agent commits and opens a PR with `gh pr create`.
4. You review in the adjacent panel without switching windows.

Source: [linear.app](https://linear.app)

## Different MCPs per pane

Each pane runs in its own worktree directory. That means each worktree can have its own `.mcp.json`. One pane can connect to Context7 while another connects to an internal MCP server. No conflicts, no shared state.

```
my-repo/          ← main worktree (.mcp.json → context7)
../api-pane/      ← worktree for API work (.mcp.json → internal-mcp)
../web-pane/      ← worktree for UI work  (no .mcp.json)
```

## Where to put credentials

| Config file | Scope | Use for |
|-------------|-------|---------|
| `~/.claude.json` | All sessions | Personal API keys, MCPs you use everywhere |
| `.mcp.json` in worktree | This project | Repo-specific MCPs, team-shared config |

`~/.claude.json` is shared across all Pane sessions for the same OS user. `.mcp.json` in the worktree is for project-specific servers. Commit `.mcp.json` to your repo if the whole team uses those servers. Put secret env vars in `.env` and add it to `.gitignore`.

## What Pane Itself Integrates

Pane isn't a task manager or a Kanban board. It doesn't connect to Linear, Jira or GitHub Issues on its own. Your agents already talk to those through MCP servers and CLI tools. Pane gives them somewhere to run.

Pane's built-in GitHub features use the GitHub CLI (`gh`):

1. PR status badges on each pane.
2. In a [Session](/docs/sessions), Pane watches the open PRs from your panes and tells the Session when one has a conflict, when checks pass or fail, and when it merges.
3. A pane you haven't named shows its PR's title in the sidebar, so you can tell your panes apart.

For everything else, see the [Linear example](#example-linear-ticket-to-pr) above.

## Related

- [runpane CLI](/docs/runpane-cli): the commands the MCP server is built on
- [AI providers](/docs/providers): set provider API keys per pane
- [Security & permissions](/docs/security): what Pane does and doesn't send off-device
