mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-02 19:49:18 +00:00
Filtering disabled shared servers out of `.mcp.json` (#9457) collapsed "present but disabled" and "absent" into the same output, so a server set `enabled = false` for OpenCode could no longer remain present in Claude Code. `.mcp.json` has no per-server `enabled` field, but settings.json does via `disabledMcpjsonServers`. Keep disabled servers in `.mcp.json` and list them under `disabledMcpjsonServers` (merged with any user-set value). This honors the disabled intent without dropping the server, and covers both shared and Claude Code-native servers.
44 lines
863 B
JSON
44 lines
863 B
JSON
{
|
|
"mcpServers": {
|
|
"customTransport": {
|
|
"customOption": "value",
|
|
"timeout": 5000,
|
|
"type": "websocket",
|
|
"url": "wss://example.com/mcp"
|
|
},
|
|
"database": {
|
|
"args": [
|
|
"-y",
|
|
"@bytebase/dbhub",
|
|
"--dsn",
|
|
"postgresql://user:pass@localhost:5432/db"
|
|
],
|
|
"command": "npx",
|
|
"env": {
|
|
"DATABASE_URL": "postgresql://user:pass@localhost:5432/db"
|
|
},
|
|
"type": "stdio"
|
|
},
|
|
"disabled-server": {
|
|
"args": [
|
|
"test"
|
|
],
|
|
"command": "echo",
|
|
"type": "stdio"
|
|
},
|
|
"filesystem": {
|
|
"args": [
|
|
"-y",
|
|
"@modelcontextprotocol/server-filesystem",
|
|
"/tmp"
|
|
],
|
|
"command": "npx",
|
|
"type": "stdio"
|
|
},
|
|
"github": {
|
|
"type": "http",
|
|
"url": "https://api.githubcopilot.com/mcp/"
|
|
}
|
|
}
|
|
}
|