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

# MCP Servers

Qoder CLI can connect to Model Context Protocol (MCP) servers to use external tools and data sources. After a server is added, its tools become available to the agent in interactive and non-interactive sessions.

## Quick Start

Add a stdio MCP server with `qodercli mcp add`. The command after `--` is the server process Qoder CLI should launch.

```shell theme={null}
qodercli mcp add playwright -- npx -y @playwright/mcp@latest
```

Stdio servers start automatically with the CLI. If Qoder CLI is already running, use `/mcp reload` to rediscover MCP servers and tools; new sessions discover them on startup.

## Server Types

Use `-t` to choose the MCP transport type.

| Type    | Use when                                                         |
| :------ | :--------------------------------------------------------------- |
| `stdio` | The MCP server runs as a local command.                          |
| `sse`   | The MCP server is exposed through a Server-Sent Events endpoint. |
| `http`  | The MCP server is exposed through an HTTP endpoint.              |
| `ws`    | The MCP server is exposed through a WebSocket endpoint.          |

If you do not specify a type, local command servers should use the default stdio behavior.

## Scopes

Use `-s` to choose where the MCP server configuration is stored.

| Scope     | Use when                                                                                               |
| :-------- | :----------------------------------------------------------------------------------------------------- |
| `user`    | You want the server available to your local account across projects.                                   |
| `local`   | You want the server available only for the current project on your machine. This is the default scope. |
| `project` | You want the server configuration shared with the project.                                             |

MCP server configuration is stored in these files:

```md theme={null}
# User-level configuration.
~/.qoder/settings.json

# Local project-specific configuration. Usually not committed.
${project}/.qoder/settings.local.json

# Project-level configuration. Usually committed with the project.
${project}/.mcp.json
```

## Manage Servers

List configured servers:

```shell theme={null}
qodercli mcp list
```

Remove a server:

```shell theme={null}
qodercli mcp remove playwright
```

## Recommended Servers

Common MCP servers include:

```shell theme={null}
qodercli mcp add context7 -- npx -y @upstash/context7-mcp@latest
qodercli mcp add deepwiki -- npx -y mcp-deepwiki@latest
qodercli mcp add chrome-devtools -- npx chrome-devtools-mcp@latest
```

## Permissions

MCP tools still pass through Qoder CLI permissions. In the default mode, calling an MCP tool usually asks for confirmation. You can approve a specific tool, approve all tools from one MCP server, or configure rules in settings.

MCP tool names commonly use this format:

```text theme={null}
mcp__<server>__<tool>
```

Examples:

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

## Troubleshooting

If an MCP tool is not available:

* Run `qodercli mcp list` and confirm the server is configured.
* If Qoder CLI is already running, run `/mcp reload` after adding or changing a server.
* Confirm the command after `--` works in your terminal.
* For `npx`-based servers, confirm Node.js and network access are available.
* Check permission prompts if the server is connected but tool calls are blocked.
