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

# External MCP servers

> Give the Coding Agent tools and data from other services with remote MCP servers.

Connect an external MCP server when the agent needs tools from another service or your own system. To use **pre.dev's tools in another assistant**, follow [product MCP setup](https://predev.mintlify.site/architect-agent/mcp-setup.md) instead.

## Add a server

1. Open **MCP Servers** in [workspace Integrations](https://pre.dev/projects/integrations?tab=mcp), or the same tab in a project's **Project setup**.
2. Choose **Add server**, then pick a preset or paste the server's URL. pre.dev detects HTTP or SSE transport from the URL.
3. Name the server and add any headers it needs.
4. Test the connection and save.

Header values can reference your environment variables with `${NAME}`, so a credential stays in one place:

```json theme={null}
{
  "url": "https://mcp.example.com/mcp",
  "headers": {
    "Authorization": "Bearer ${MY_API_KEY}"
  }
}
```

**Advanced: edit config JSON** accepts the same configuration directly.

## Sign in to a server

Servers that use OAuth offer **Connect**. Sign in on the server's own page; the card then shows who you are signed in as, with **Reconnect** and **Disconnect**. When a sign-in expires, the card asks you to reconnect. Each connect shows the host where you will sign in; if that host changes, continue only when you trust it.

## Local commands run only in the CLI

Web builds use remote servers. A local command, such as `npx -y <package>`, only runs in the pre.dev CLI, on your machine. Add one there:

```text theme={null}
/mcp add files npx -y @modelcontextprotocol/server-filesystem ./docs
```

`/mcp add <name> <url>` adds a remote server from the terminal as well.

To let the agent use your own Chrome, with your open tabs and the sites you are signed in to, type `/chrome`. See [Browser Agents Local](https://predev.mintlify.site/browser-agents/local.md#use-it-in-the-cli).

## Scope and controls

Personal projects inherit personal entries and can override a matching name. Organization entries are shared across the organization. See [integration scope](https://predev.mintlify.site/coding-agent/integrations/overview.md#skill-and-mcp-scope).

In the CLI, `/mcp` lists personal entries. Enter or Space toggles an entry, `d` removes it, and `o` opens workspace Integrations in the browser.

Enable the servers needed for the task, and describe the operation you want the agent to perform. A successful connection test confirms tool discovery; individual calls can still fail because of provider permissions or service errors.


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