# 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](/docs/panes-and-worktrees).
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

### What your agent can do with it

Your agent can ask Pane for these. To start, check on or message other agents, see [Agents Managing Agents](/docs/agent-loops).

| You ask | The agent |
| --- | --- |
| "Ask me before you pick a database." | Shows a [Notify](/docs/notify) card with the choices over whatever app you're in, and waits for your click. |
| "Ask Codex what it thinks of this plan." | Asks Codex one read-only question and brings back its answer. No tab opens and nothing is left behind. |
| "Open the coverage report next to you." | Opens the file or URL as a tab beside the agent, in the same pane. |
| "Ask me for the Stripe API key." | Shows you a masked card and saves what you type as a Pane secret. The agent never sees the value. |
| "Close the tabs you opened." | Closes the tabs it opened. It won't close your tabs, a busy agent, or a tab with unsent input. |
| "Make Pane dark with a green accent." | Writes a custom theme and switches Pane to it. |

### Set it up

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.

If Cursor asks for approval, run `agent mcp enable pane`.

Pane also installs two skills in each agent's home skill folder (like `~/.claude/skills` and `~/.agents/skills`), including inside WSL distros. `pane` tells agents how to find and use Pane. `pane-manage-and-message-agents` tells them how to start, check on and message other agents. Pane never edits your repos for this.

Pane only touches the entries and skills it wrote. Your other servers, settings and comments stay exactly as they were. If you added a `pane` entry or skill yourself, Pane leaves it alone.

### The tools

> **Note:** Tool names call tabs *panels*. A `panels_*` tool works on a tab.

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`, `agents_status`, `agents_send`: start an agent and wait until it's ready, check on it, send it a follow-up. Pass `pane` to `agents_start` to open the agent as a tab in an existing pane, or `repo` and `name` for new work, which creates a pane.
- `panels_create`, `panels_open`, `panels_input`, `panels_close`: open an agent tab in an existing pane, show a page or file beside the agent, press exact keys, close a tab the agent opened.
- `repos_list`, `repos_add`, `repos_rename`, `panes_list`, `panes_adopt`, `panes_rename`, `panes_git_status`, `panes_archive`, `panes_restore`, `workspace_state`
- `sessions_create`, `sessions_associate`, `sessions_pin`: [Sessions](/docs/sessions).
- `workspace_list`, `workspace_read`, `workspace_write`, `workspace_exec`: your other machines ([Workspaces](/docs/runpane-workspaces)).
- `loops_list`, `loops_create`, `loops_update`, `loops_run`, `loops_pause`, `loops_resume`, `loops_delete`: [Scheduled Loops](/docs/loops).
- `notify`, `agents_ask`, `secrets_request`, `theme_read`, `theme_set`: the requests in the table above. `theme_set` runs only when you ask for a new look.
- `links_create`, `docs_search`, `docs_read`, `doctor`: make a `pane://` link, search Pane's docs offline, check that Pane is reachable.

For more, run the server with extra toolsets, like `runpane mcp --toolsets core,git`. The toolsets are `core`, `agents`, `panes`, `panels`, `git`, `sessions`, `repos`, `workspace`, `loops`, `secrets`, `autopilot`, `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**:

- Switch off **Register Pane tools with Claude Code, Codex, and Cursor**. Pane removes its entry from each config, and the `pane-manage-and-message-agents` skill.
- Switch off **Install Pane skill for agents**. Pane removes its `pane` skill.

### Check that it works

Run `claude mcp list`, `codex mcp list` or `agent mcp list`. You should see `pane`. If it's missing:

1. Check that Pane is running and **Register Pane tools with Claude Code, Codex, and Cursor** is on.
2. Restart the agent, or start a new chat in Cursor.
3. Run `runpane doctor` to check that Pane is reachable.

Without the desktop app, or for another MCP client, register it by hand with Node: `claude mcp add --scope user pane -- npx --yes runpane@latest mcp`.

### 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. MCP takes fewer calls. The CLI works in scripts, CI and agents without MCP.

## Your own MCP servers

A pane is a real terminal. 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's 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. 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

- [AI providers](/docs/providers): set provider API keys per pane
- [Security & permissions](/docs/security): what Pane does and doesn't send off-device
