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

# MCP Overview

> Extend Devin CLI with external tool servers using the Model Context Protocol

MCP (Model Context Protocol) lets you connect external tool servers to Devin CLI, giving the agent access to APIs, databases, issue trackers, and any other service you can wrap in an MCP server.

When you configure an MCP server, its tools become available to the agent just like built-in tools. The agent can discover what tools are available and call them as needed.

***

## How It Works

<Steps>
  <Step title="Configure a server">
    You define an MCP server in your config file with a command, arguments, and optional environment variables.
  </Step>

  <Step title="Server launches">
    Devin CLI starts the server process when needed. The server connects to the external API (GitHub, Linear, etc.).
  </Step>

  <Step title="Tool discovery">
    The agent discovers what tools the server provides (e.g., `create_issue`, `list_repos`).
  </Step>

  <Step title="Tool execution">
    When the agent calls an MCP tool, the request flows through the server to the external service and the result is returned.
  </Step>
</Steps>

***

## Quick Example

Add a GitHub MCP server to your project:

```json theme={null}
// .devin/config.local.json  (gitignored — keep tokens out of committed config)
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}
```

Now the agent can create issues, read PRs, search repos, and more — all through natural language.

***

## Permission Control

Once configured, MCP tools appear with a namespaced format: `mcp__<server>__<tool>`. For example, a "github" server with a "create\_issue" tool becomes `mcp__github__create_issue`.

MCP tools are subject to the same permission system as built-in tools. You can control access at multiple levels:

```json theme={null}
{
  "permissions": {
    "allow": [
      "mcp__github__*"
    ],
    "deny": [
      "mcp__github__delete_repo"
    ]
  }
}
```

See [Permissions](/cli/reference/permissions) for the full permission syntax.

***

## Authentication

Some remote MCP servers (such as Atlassian, Notion, and Linear) require OAuth authentication. Each MCP client authenticates independently — tokens from Windsurf or Claude Code are **not** shared with Devin CLI.

After adding a remote server, authenticate with:

```bash theme={null}
devin mcp login <server-name>
```

This opens a browser window for the OAuth flow. See [MCP Configuration — Authentication](/cli/extensibility/mcp/configuration#authentication) for details.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/cli/extensibility/mcp/configuration">
    Learn how to configure MCP servers in detail
  </Card>

  <Card title="Permissions" icon="shield" href="/cli/reference/permissions">
    Control which MCP tools the agent can use
  </Card>
</CardGroup>
