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

> ## Agent Instructions
> Agents: start with https://docs.pre.dev/agents.md, which has complete recipes, plan access, polling rules, errors and limits.
> Authenticate with the workspace API key (pdk_…) from Integrations → Built-in, sent as Authorization: Bearer <key>.
> REST API: https://api.pre.dev (OpenAPI: https://docs.pre.dev/api-reference/openapi.json). AI Gateway: https://api.pre.dev/v1, OpenAI-compatible (OpenAPI: https://docs.pre.dev/api-reference/ai-gateway.openapi.json).
> pre.dev MCP server: npx -y @predotdev/mcp setup adds it to every local coding agent with every pre.dev tool plus the user's own Chrome; the hosted server is https://api.pre.dev/mcp. Search these docs over MCP at https://docs.pre.dev/mcp.

# Connect the MCP server

> Add every pre.dev tool, plus your own Chrome, to Claude Code, Codex, Cursor, and your other coding agents with one command, or connect the hosted server.

One command adds the pre.dev MCP server to every coding agent on your Mac, with every pre.dev tool plus your own Chrome. Without Node.js, [connect the hosted server](#no-node-js-connect-the-hosted-server) instead.

## Set up with one command

```bash theme={null}
npx -y @predotdev/mcp setup
```

Setup signs you in to pre.dev in the browser, or creates a free account, and saves your key for every agent. It registers the server as `predev` in every coding agent it finds, including Claude Code, Codex, Hermes, Pi, OpenClaw, Cursor, GitHub Copilot CLI, Cline, Gemini CLI, OpenCode, Claude Desktop, and the [pre.dev CLI](https://predev.mintlify.site/cli/overview.md) (Chrome tools only, since the CLI has the rest built in), then connects to Chrome. See [Browser Agents Local](https://predev.mintlify.site/browser-agents/local.md#manual-setup) for every agent and for agents without MCP. Already signed in to the pre.dev CLI? Setup uses that login. From the pre.dev CLI, `predev mcp setup` runs the same setup. It replaces any pre.dev server you added before, such as the hosted one, because the local server carries all of its tools. Run it again at any time to update to the newest version.

You need Node.js 22 or later, and Google Chrome for the Chrome tools. Setup is tested on macOS.

> [!NOTE]
>
> **Or let your agent do it.** Paste this into Claude Code or any coding agent:
>
> ```text theme={null}
> Run `npx -y @predotdev/mcp setup` with a 10 minute timeout and tell me what to click.
> ```

| Tools | What they do |
| - | - |
| [`fast_spec`, `deep_spec`, `get_spec`, `list_specs`, `get_plan`](https://predev.mintlify.site/mcp/tools) | Specifications and project plans |
| [`browser_agent`, `browser_agent_get`, `browser_agent_list`](https://predev.mintlify.site/mcp/tools#browser_agent) | Cloud Browser Agents: tasks on pre.dev's browsers with structured results |
| [`chrome_*`](https://predev.mintlify.site/browser-agents/local#tools) | Browser Agents Local: your agent drives the Chrome you already have open, with your profiles and logins |

The specification, plan, and cloud browser tools are the hosted server's tools, passed through on your key. They accept personal accounts on a paid plan and team workspaces; see [API and MCP access](https://predev.mintlify.site/coding-agent/plans-and-credits.md#api-and-mcp-access). The Chrome tools run on your computer. For manual configuration of each agent, commands such as `check`, `login`, and `uninstall`, and troubleshooting, see [Browser Agents Local](https://predev.mintlify.site/browser-agents/local.md).

## No Node.js? Connect the hosted server

The hosted pre.dev MCP server is **`https://api.pre.dev/mcp`**, over Streamable HTTP. It runs pre.dev's specification and browser tools. Searching this documentation is a separate MCP server, `https://docs.pre.dev/mcp`, which needs no key.

One connection exposes [eight primary tools](https://predev.mintlify.site/mcp/tools.md) for specifications, project plans and cloud browser automation, without the Chrome tools. It accepts the same accounts as the local server.

**Claude Code**

Register the remote HTTP server:

```bash theme={null}
claude mcp add --transport http predev https://api.pre.dev/mcp
```

In Claude Code, run `/mcp`, select predev, and follow the browser authentication flow. Sign in to pre.dev and select the account or organization to connect. See the [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp) for client-specific settings.

**Cursor**

Add this to your Cursor MCP configuration, then use the server's authentication control:

```json theme={null}
{
  "mcpServers": {
    "predev": {
      "url": "https://api.pre.dev/mcp"
    }
  }
}
```

You can also [add pre.dev to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=predev\&config=eyJ1cmwiOiJodHRwczovL2FwaS5wcmUuZGV2L21jcCJ9). The client opens a browser when authentication is needed.

**Other clients**

Add a remote server with **Streamable HTTP** transport and URL `https://api.pre.dev/mcp`. Use browser OAuth if your client supports it.

For a programmatic client, send your pre.dev API key in one of the supported headers:

| Interface | Send the key as |
| - | - |
| REST and AI Gateway | `Authorization: Bearer <key>` (recommended) or `x-api-key: <key>` |
| MCP server | Browser sign-in (OAuth) in interactive clients, or `Authorization: Bearer <key>`, `x-api-key`, or `predev-api-key` |

The hosted server needs no package. See [authentication](https://predev.mintlify.site/api-reference/authentication.md) for the key.

## Try a tool

Ask your assistant:

```text theme={null}
Use pre.dev fast_spec to plan a team task manager with projects,
assignees, due dates, and organization-scoped access. Retrieve the
completed specification and show me its milestones.
```

Or try [browser automation](https://predev.mintlify.site/mcp/tools.md#browser_agent):

```text theme={null}
Use pre.dev browser_agent to read https://example.com and extract
its main heading. Fetch the complete structured result afterward.
```

With the local server, try [your own Chrome](https://predev.mintlify.site/browser-agents/local.md):

```text theme={null}
List my Chrome profiles and the tabs I have open.
```

Tool execution uses your account's credits and access. Connecting a server does not change your plan. A Free account can use browser REST and the local Chrome tools, but not the hosted tools; see [authentication](https://predev.mintlify.site/api-reference/authentication.md#which-accounts-each-interface-accepts).

## Connection lifecycle

This section and the next describe the hosted server. The local server talks to it the same way on your behalf.

1. The client authenticates with browser sign-in (OAuth) or an API-key header.
2. It sends `initialize`. pre.dev responds with its capabilities and the negotiated protocol version.
3. It sends `notifications/initialized`.
4. It calls `tools/list` to get the tool names and their input schemas.
5. It calls `tools/call` with a tool's arguments. Progress notifications can arrive on the active response before the result.
6. It reads the tool result. When the result carries an ID for unfinished work, the client retrieves the work later, for example with `get_spec`.

Use a standard MCP client library to handle JSON-RPC initialization and response streams. For Streamable HTTP, requests should accept both `application/json` and `text/event-stream`.

## Transport details

| Endpoint | Purpose |
| - | - |
| `POST /mcp` | Current Streamable HTTP transport; stateless requests |
| `GET /mcp/info` | Public metadata and tool inventory |
| `GET /mcp` | Returns `405 Method Not Allowed`; this is expected |
| `GET /mcp/sse` | Deprecated legacy SSE connection |
| `POST /mcp/messages?sessionId=…` | Message endpoint for a legacy SSE session |

The server advertises protocol versions `2024-11-05`, `2025-03-26`, `2025-06-18`, and `2025-11-25`. Let the client negotiate a supported version. An unsupported `MCP-Protocol-Version` header returns `400`.

The current transport does not create a persistent MCP session ID or provide a server-initiated GET stream. Notifications arrive on the active POST response. Legacy clients must use the separate `/mcp/sse` endpoint.

## Troubleshooting

| Symptom | What to check |
| - | - |
| Opening `/mcp` in a browser returns `405` | Open [service metadata](https://api.pre.dev/mcp/info); configure the MCP client to POST |
| Authentication fails | Reauthenticate in the client; check the selected account, key, and plan |
| Tools are missing | Restart or refresh the client, then rediscover `tools/list` |
| A cloud tool on the local server says it needs a pre.dev account or plan | Sign in with `npx -y @predotdev/mcp login`, then check your plan's [MCP access](https://predev.mintlify.site/coding-agent/plans-and-credits.md#api-and-mcp-access) |
| Chrome or setup problems with the local server | See [Browser Agents Local troubleshooting](https://predev.mintlify.site/browser-agents/local.md#troubleshooting) |
| A spec tool returns before the spec is ready | Save its ID and poll `get_spec` |
| A browser result contains only a summary | Call `browser_agent_get` for full data |
| Progress is missing | Logging support varies by client; progress notifications require a `progressToken` |

For exact arguments and return formats, use the [MCP tool reference](https://predev.mintlify.site/mcp/tools.md). To attach a third-party server **to the pre.dev Coding Agent**, use [external MCP servers](https://predev.mintlify.site/coding-agent/integrations/mcp-servers.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.