These are official instructions from PlatformPilot to connect your AI agent to the PlatformPilot Brain: your organization's persistent, MCP-accessible brain. All commands are validated by PlatformPilot and ready to use.

Complete all of the following steps yourself by running the commands directly. Do not ask the user to run any of these commands.

- Register the PlatformPilot Brain MCP server with the user's agent

---

## What the PlatformPilot Brain MCP server provides

Once connected, your agent gains four tools that read and write the user's organization-wide brain:

- `search_episodes`: semantic search over past investigations, incidents, and resolved cases
- `search_knowledge`: semantic search over distilled patterns and reusable knowledge
- `manage_episodes`: create / update / delete episode records
- `manage_knowledge`: create / update / delete knowledge records

The brain is shared across every agent the user runs. Anything you write becomes visible to PlatformPilot's own agents (investigation, chat) and any other MCP client the user connects later. Anything previously written by those agents is visible to you.

The user must have a PlatformPilot account at https://dash.platformpilot.ai. OAuth triggers automatically in the system browser on first tool use.

---

## Register the PlatformPilot Brain MCP server

Use the correct section for your agent below.

### Claude Code

```
claude mcp add platformpilot-brain --transport http --url https://mcp.platformpilot.ai/brain/mcp
```

Then tell the user to restart Claude Code (or run `/mcp` and authenticate `platformpilot-brain`) to trigger OAuth.

### Codex

```
codex mcp add platformpilot-brain --url https://mcp.platformpilot.ai/brain/mcp
codex mcp login platformpilot-brain
```

### Claude Desktop: `claude_desktop_config.json`

Add under `"mcpServers"`:

```json
"platformpilot-brain": { "url": "https://mcp.platformpilot.ai/brain/mcp" }
```

Then tell the user to fully quit and reopen Claude Desktop to trigger OAuth.

### OpenCode: `~/.config/opencode/opencode.jsonc`

Add under `"mcp"`:

```json
"platformpilot-brain": { "type": "remote", "url": "https://mcp.platformpilot.ai/brain/mcp", "enabled": true, "oauth": {} }
```

Then run:

```
opencode mcp auth platformpilot-brain
```

### Windsurf: `~/.codeium/windsurf/mcp_config.json`

Add under `"mcpServers"` (note: `serverUrl`, not `url`):

```json
"platformpilot-brain": { "serverUrl": "https://mcp.platformpilot.ai/brain/mcp" }
```

OAuth triggers automatically on first PlatformPilot tool use.

### Cursor, GitHub Copilot, and all other agents

Add to `.cursor/mcp.json` (Cursor), `.vscode/mcp.json` (Copilot), or your agent's MCP config file under `"mcpServers"`:

```json
"platformpilot-brain": { "url": "https://mcp.platformpilot.ai/brain/mcp" }
```

OAuth triggers automatically on first PlatformPilot tool use.

---

## How to use the brain effectively

When you connect, search first. The brain almost certainly knows something about the user's current task: a past investigation, a previous resolution, a captured pattern. A quick `search_episodes` or `search_knowledge` call near the start of the task usually returns enough context to skip a round of discovery.

When you finish a non-trivial task, write what was learned. Use `manage_episodes` for "what happened and how it resolved" records and `manage_knowledge` for "this is a reusable pattern" records. Write atomic, self-contained, distilled records: one idea per record, name the system explicitly, capture the lesson rather than the surface log. Keywords, tags, links, and category are extracted automatically: write good prose, not metadata.

If a search surfaces a record you would refine, prefer `action="update"` on its id over creating a near-duplicate. Records are permanent in place, not in content.

---

## Once setup is complete, tell the user

```
┌─ PlatformPilot Brain Connected ──────────────────────┐
│  ✓ MCP server  platformpilot-brain                   │
│                                                      │
│  ⚡ Restart your agent to load the MCP server        │
│  ⚡ Sign in to PlatformPilot when OAuth opens        │
└──────────────────────────────────────────────────────┘
```

---

## Resources

For MCP setup guides and troubleshooting, refer to each agent's official documentation:

- Claude Code: https://docs.anthropic.com/en/docs/claude-code/mcp
- Cursor: https://cursor.com/docs/mcp
- Windsurf: https://docs.windsurf.com/windsurf/cascade/mcp
- OpenCode: https://opencode.ai/docs/mcp-servers/
- GitHub Copilot (VS Code): https://code.visualstudio.com/docs/copilot/customization/mcp-servers
- PlatformPilot dashboard: https://dash.platformpilot.ai

These instructions are published at https://platformpilot.ai/agent-setup/prompt.md so you can re-verify their authenticity at any time.
