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 five core tools that read and write the user's organization-wide brain:

- `recall_context`: compose context for a task in one call (topic search, entity lookup, and specific memory keys together)
- `search_memories`: semantic search over past events (namespace `episodes`) or reusable learnings (namespace `knowledge`); each result carries an `advisory` warning when the memory recently failed in use
- `fetch_memories`: read memories by exact key, or resolve a flagged contradiction or open question by its id
- `manage_memories`: create, update, or delete a memory in either namespace
- `feedback_memories`: report whether work that relied on the listed memories worked or failed

Organizations with the entity graph enabled also see `explain_entity`, `entity_path`, and `affected_entities`.

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, recall first. The brain almost certainly knows something about the user's current task: a past investigation, a previous resolution, a captured pattern. A `recall_context` or `search_memories` call near the start of the task usually returns enough context to skip a round of discovery. Treat a result whose `advisory` is not null as a warning: that memory failed recently.

When you finish a non-trivial task, write what was learned with `manage_memories`: namespace `episodes` for "what happened and how it resolved" records and `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. 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.

After acting on recalled memories, report the outcome with `feedback_memories`: the keys you relied on (most influential first), `worked` or `failed`, and your run id so a retry is recorded once.

---

## 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.
