docs/user-manual/en/3-extensions/3.1-mcp.md
MCP (Model Context Protocol) is a protocol that allows AI tools to access external data sources and tools. Through MCP servers, you can enable AI to:
Click the MCP button in the top navigation bar.
| Preset | Package Name | Description |
|---|---|---|
| fetch | mcp-server-fetch | HTTP request tool that enables AI to fetch web content |
| time | @modelcontextprotocol/server-time | Time tool that provides current time information |
| memory | @modelcontextprotocol/server-memory | Memory tool that enables AI to store and retrieve information |
| sequential-thinking | @modelcontextprotocol/server-sequential-thinking | Chain-of-thought tool that enhances AI reasoning |
| context7 | @upstash/context7-mcp | Documentation search tool for querying technical docs |
After selecting "Custom", fill in:
| Field | Required | Description |
|---|---|---|
| Server ID | Yes | Unique identifier |
| Name | No | Display name |
| Description | No | Function description |
| Transport Type | Yes | stdio / http / sse |
| Command | Yes* | Required for stdio type |
| Arguments | No | Command-line arguments |
| URL | Yes* | Required for http/sse type |
| Headers | No | Request headers for http/sse type |
| Environment Variables | No | Environment variables passed to the server |
The most common type, communicating by launching a local process.
{
"command": "uvx",
"args": ["mcp-server-fetch"],
"env": {}
}
Requirements:
uvx, npx)Communicates with a remote server via HTTP protocol.
{
"url": "http://localhost:8080/mcp"
}
Communicates with a server via SSE protocol, supporting real-time push.
{
"url": "http://localhost:8080/sse"
}
Each MCP server can independently control which apps it is enabled for.
| Toggle | Effect | Configuration File Path |
|---|---|---|
| Claude | Sync to Claude Code | ~/.claude.json's mcpServers |
| Codex | Sync to Codex | ~/.codex/config.toml's [mcp_servers] |
| Gemini | Sync to Gemini CLI | ~/.gemini/settings.json's mcpServers |
| OpenCode | Sync to OpenCode | ~/.opencode/config.json's mcpServers |
Note: OpenClaw does not currently support MCP server management. MCP functionality is currently only supported for Claude, Codex, Gemini, and OpenCode.
When enabling an app's toggle, CC Switch will:
apps.claude/codex/gemini/opencode status to trueWhen disabling an app's toggle, CC Switch will:
falseMCP server sync only executes when the corresponding app is installed:
~/.claude/ directory or ~/.claude.json file to exist~/.codex/ directory to exist~/.gemini/ directory to exist~/.opencode/ directory to existTip: If a CLI tool is not installed, enabling its toggle will not cause an error, but the configuration will not be written.
When the toggle is disabled, the configuration is removed from the file.
Changes are immediately synced to enabled app configuration files.
After deletion, the configuration is removed from all app configuration files.
If you have already configured MCP servers in CLI tools, you can import them into CC Switch:
~/.claude.json){
"mcpServers": {
"mcp-fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
}
}
~/.codex/config.toml)[mcp_servers.mcp-fetch]
command = "uvx"
args = ["mcp-server-fetch"]
~/.gemini/settings.json){
"mcpServers": {
"mcp-fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
}
}
Check:
uvx)Ensure: