> ## 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 `qoder mcp add`. The command after `--` is the server process Qoder CLI should launch.

```shell
qoder 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.

When the shell command prefix is enabled, Qoder CLI launches stdio servers through the configured executable wrapper. The wrapper receives the original server executable and arguments as one shell-quoted argument and must execute it while preserving stdio and the exit status. The configured value must be a single executable path. This setting does not affect `sse`, `http`, or `ws` servers.

## 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
# 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
qoder mcp list
```

Remove a server:

```shell
qoder mcp remove playwright
```

## Recommended Servers

Common MCP servers include:

```shell
qoder mcp add context7 -- npx -y @upstash/context7-mcp@latest
qoder mcp add deepwiki -- npx -y mcp-deepwiki@latest
qoder 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
mcp__<server>__<tool>
```

Examples:

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

## Troubleshooting

If an MCP tool is not available:

- Run `qoder 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.
