Transport methods, configuration fields, scope, and permissions for MCP servers
The Model Context Protocol (MCP) allows Qoder CLI to integrate with third-party tools and services. This page provides a complete reference for MCP server configuration. For a usage guide, see MCP Servers.
MCP servers specify the transport protocol via the
MCP servers are configured under the
Managed Gateway requests use the current Qoder sign-in credential. If the upstream provider requires authorization, QoderCLI presents a secure authorization URL and reconnects the server after authorization succeeds. An interrupted tool call is not replayed automatically; invoke it again after the server reconnects.
MCP servers can be configured at multiple levels:
Servers with the same name are overridden in the following order (later overrides earlier): User Level → Project-Level
MCP tool lazy loading is enabled by default (
Use the
Transport Methods
MCP servers specify the transport protocol via the type field:
| Type | Description |
|---|---|
stdio (default) | Spawns a subprocess and interacts via stdin/stdout. |
sse | Connects via Server-Sent Events over HTTP. |
http / streamable-http | Connects via HTTP (JSON-RPC + optional streaming). |
ws | Connects via WebSocket / TCP. |
sdk | Built-in SDK-level server (in-process). |
Configuration Fields
MCP servers are configured under the mcpServers field in settings.json, where each key represents a server name:
stdio Type
| Field | Type | Description |
|---|---|---|
command | string | The command to start the server. |
args | string[] | Arguments passed to the command. |
env | object | Environment variables passed to the subprocess. |
cwd | string | The working directory for the subprocess. |
sse Type
| Field | Type | Description |
|---|---|---|
url | string | The SSE endpoint URL. |
type | "sse" | Transport type identifier. |
headers | object | HTTP headers (may include authentication). |
http / streamable-http Type
| Field | Type | Description |
|---|---|---|
url | string | The HTTP endpoint URL. |
type | "http" | Transport type identifier. |
headers | object | HTTP headers. |
ws Type (TCP)
| Field | Type | Description |
|---|---|---|
tcp | object | TCP connection parameters (host/port). |
type | "ws" | Transport type identifier. |
Common Optional Fields
| Field | Type | Description |
|---|---|---|
timeout | number | Connection/request timeout (in milliseconds). |
type | string | Explicitly specifies the transport type. |
description | string | Server description, displayed in the management view. |
trust | boolean | Trusts the server, skipping confirmation when its tools are called. |
includeTools | string[] | Registers only the listed tools. |
excludeTools | string[] | Excludes the listed tools. |
disabled | boolean | Disables the server (keeps the configuration without deleting it). |
alwaysAllow | string[] | List of tool names that are always allowed without confirmation. |
protocolVersion | string | MCP protocol revision to connect with, for example "2025-11-25" or "2026-07-28". A 2025-family revision runs the legacy handshake at exactly that revision; "2026-07-28" requires the server to support server/discover negotiation. When omitted, the transport default applies: SSE/WebSocket use the legacy handshake, everything else negotiates automatically. |
oauth | object | OAuth authorization configuration (fields include enabled, clientId, clientSecret, authorizationUrl, tokenUrl, scopes, callbackPort, etc.). |
qoder_url | string | Complete HTTPS endpoint for a Qoder-managed MCP Gateway. When present, it is used with Streamable HTTP and takes precedence over other transport fields. |
Configuration Scope
MCP servers can be configured at multiple levels:
| Level | Location | Description |
|---|---|---|
| User Level | ~/.qoder/settings.json → mcpServers | Available to all projects. |
| Project-Level | <project>/.qoder/settings.json → mcpServers | Requires approval before use (for security reasons). |
| Project-Level | <project>/.mcp.json | Requires a top-level mcpServers key; requires approval before use. |
| Local Level | <project>/.qoder/settings.local.json → mcpServers | Local to the current project on this machine; the default scope for -s, loaded only when the directory is trusted. |
| Plugin | .mcp.json or mcp.json in the plugin directory | Loaded upon plugin installation. |
| CLI argument | --mcp-config <path>, --settings | Valid for this session only. |
settings.json → Project-Level .mcp.json → Local Level → CLI argument.
Project-level MCP servers require individual approval by default. This can be bypassed using the following methods:
mcp.enableAllProjectMcpServers: true: Automatically approves all project-level servers.mcp.enabledProjectMcpServers: Allowlist, approves by name.
mcp group in settings.json (a restart is required after modification):
Permissions and Security
- MCP tools are managed by the Permissions System just like built-in tools—user confirmation is required before invocation (unless using
autoorbypass_permissionsmode). --allowed-mcp-server-names: Restricts loading to only MCP servers with specified names.--strict-mcp-config: Strict mode: skip MCP servers from settings and.mcp.json, and disable plugin MCP servers by default. Servers specified by--mcp-configcan still load.mcp.allowed/mcp.excluded: Controls the allowlist or blocklist of servers in the configuration.
Lazy Loading Mode
MCP tool lazy loading is enabled by default (mcp.lazyLoad: true). Tool definitions are loaded on demand to reduce first-turn prompt token overhead when multiple MCP servers are connected.
To disable lazy loading, set lazyLoad to false in the mcp section of settings.json, then restart the CLI:
QODER_MCP_LAZY=1 forces lazy loading on and overrides this setting. Remove that environment variable to disable lazy loading. Setting it to 0 does not disable lazy loading; you must still set mcp.lazyLoad: false.
Management Commands
Use the /mcp Slash Command to manage MCP servers in an interactive session:
/mcp— View the list and status of connected servers./mcp reload(alias/mcp refresh) — Rediscover MCP servers and tools, useful after adding or modifying configurations.
qoder mcp subcommand in the command line for non-interactive management:
qoder mcp add <name> -- <command>— Add a stdio server.qoder mcp add <name> <command-or-url> --qoder-url <https-url>— Add a server routed through a managed MCP Gateway.qoder mcp list— List configured servers.qoder mcp remove <name>— Remove a server.
Next Steps
- MCP usage guide: MCP Servers.
- Full configuration reference: Configurations, environment variables, and file paths.
- Extension troubleshooting: Hooks, MCP, and plugin issues.