Skip to main content
Guides

MCP Services

Qoder CN CLI can connect to Model Context Protocol (MCP) services to use external tools and data sources. After a service is added, its tools are made available to the agent in both interactive and non-interactive sessions.

Quick Start

Use qodercli mcp add to add a stdio MCP service. The command after -- is the service process that Qoder CN CLI needs to start.
qodercli mcp add playwright -- npx -y @playwright/mcp@latest
Stdio services start automatically with the CLI. If Qoder CN CLI is already running, use /mcp reload to rediscover MCP services and tools; new sessions discover them automatically at startup.

Service Types

Use -t to select the MCP transport type.
TypeApplicable Scenarios
stdioThe MCP service runs as a local command
sseThe MCP service is exposed through a Server-Sent Events endpoint
httpThe MCP service is exposed through an HTTP endpoint
wsThe MCP service is exposed through a WebSocket endpoint
If no type is specified, a local command service should use the default stdio behavior.

Scopes

Use -s to select where the MCP service configuration is saved.
ScopeApplicable Scenarios
userYou want the service to be available in all projects of the current account
localYou want the service to be available only in the current project on this machine. The default scope is local
projectYou want the service configuration to be shared with the project
The MCP service configuration is saved in the following files:
# User-level configuration.
~/.qoder/settings.json

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

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

Managing Services

List configured services:
qodercli mcp list
Remove a service:
qodercli mcp remove playwright
Common MCP services include:
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 are still subject to Qoder CN CLI's permission system. In the default mode, calling an MCP tool usually requests confirmation. You can approve a specific tool, approve all tools under a specific MCP service, or configure rules in settings. MCP tool names usually use the following format:
mcp__<server>__<tool>
Example:
{
  "permissions": {
    "allow": [
      "mcp__context7__*"
    ],
    "deny": []
  }
}

Troubleshooting

If an MCP tool is unavailable:
  • Run qodercli mcp list to confirm that the service is configured.
  • If Qoder CN CLI is already running, run /mcp reload after adding or modifying a service.
  • Confirm that the command after -- can run normally in the terminal.
  • For npx-based services, confirm that Node.js and network access are available.
  • If the service is connected but tool calls are blocked, check the permission prompts.