-
Notifications
You must be signed in to change notification settings - Fork 76
Description
Feature Description
Add a new mcp_config
configuration option that allows claudecode.nvim to automatically configure Claude Code CLI to use MCP servers from Claude Desktop's configuration file.
Use Case
Currently, Claude Desktop and Claude Code CLI maintain separate MCP server configurations. Users who have already configured MCP servers in Claude Desktop (filesystem, GitHub, SQLite, etc.) must manually reconfigure the same servers in Claude Code CLI's ~/.claude.json
file to use them with claudecode.nvim.
This creates:
- Configuration duplication and maintenance overhead
- Potential for configuration drift between the two systems
- Poor user experience when switching between Claude Desktop and claudecode.nvim
Proposed Solution
Add a new mcp_config
field to the plugin configuration:
opts = {
-- Server Configuration
port_range = { min = 10000, max = 65535 },
auto_start = true,
log_level = "info",
terminal_cmd = "claude",
mcp_config = "/Users/username/Library/Application Support/Claude/claude_desktop_config.json"
}
When mcp_config
is specified, claudecode.nvim would automatically modify the Claude Code CLI launch command to include the --mcp-config
flag:
claude --mcp-config='/Users/username/Library/Application Support/Claude/claude_desktop_config.json'
This leverages Claude Code CLI's existing --mcp-config
flag to point to an external configuration file.
Alternatives Considered
- Manual configuration copying - Users manually copy MCP server configs from Claude Desktop to
~/.claude.json
(current workaround) - Configuration sync utility - A separate tool to sync configurations between the two systems
- Environment variable approach - Using environment variables to specify the config path
The proposed solution is cleaner as it uses existing Claude Code CLI functionality and keeps the configuration declarative within the plugin setup.
Additional Context
Default Claude Desktop config locations by OS:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Linux:
~/.config/claude/claude_desktop_config.json
This feature would provide a seamless experience for users who want to use their existing Claude Desktop MCP configurations with claudecode.nvim without manual duplication.