claude-code - 💡(How to fix) Fix [FEATURE] Allow customizing MCP server args for plugin-installed MCPs [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48533Fetched 2026-04-16 06:57:31
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

no error or warning is shown. Users naturally try .mcp.json first, and when it silently does nothing, it leads to hours of confused debugging. 4. I add --autoConnect to my project's .mcp.json → Does not work. No error, no warning.

Root Cause

  • Environment: Claude Code on Windows 11, plugin chrome-devtools-mcp@chrome-devtools-plugins v0.21.0
    • Root cause: The plugin system and .mcp.json are completely independent config paths. Plugin-installed MCPs are launched solely from plugin.json, and .mcp.json entries for the same server name are silently ignored.
    • Files involved:
      • ~/.claude/plugins/marketplaces/<marketplace>/.claude-plugin/plugin.json (marketplace source definition)
      • ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/.claude-plugin/plugin.json (cached copy used at runtime)
      • ~/.claude/plugins/installed_plugins.json (installation registry)
      • {project}/.claude/settings.json → enabledPlugins (project-level enablement, no arg override support)
    • This issue likely affects all plugin-installed MCPs where users need custom arguments, not just chrome-devtools-mcp.

Fix Action

Fix / Workaround

  • extraArgs: appended to the args defined in plugin.json
    • extraEnv: merged into the env defined in plugin.json
    • Non-breaking: existing "pluginName": true shorthand still works
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

When an MCP server is installed via the plugin system, its startup arguments are defined in .claude-plugin/plugin.json inside the marketplace/cache directories. There is currently no way for users to customize these arguments without manually editing plugin.json, which gets overwritten on plugin updates.

The .mcp.json file — the documented way to configure MCP servers — has no effect on plugin-installed MCPs. There is no indication of this anywhere, and no error or warning is shown. Users naturally try .mcp.json first, and when it silently does nothing, it leads to hours of confused debugging.

I needed to add --autoConnect to chrome-devtools-mcp so it would connect to my existing browser session. After extensive debugging, I discovered:

  1. .mcp.json configuration is completely ignored for plugin-installed MCPs
  2. The plugin system reads from plugin.json in two separate locations (marketplace source + cache copy)
  3. Both files must be manually edited, and both will be overwritten on plugin update

Proposed Solution

Option A: Support arg/env overrides in enabledPlugins (Preferred)

Allow users to append or override MCP server arguments in the project-level .claude/settings.json:

{                                                                                                                                                             
  "enabledPlugins": {                                                                                                                                         
    "chrome-devtools-mcp@chrome-devtools-plugins": {                                                                                                          
      "enabled": true,                                                                                                                                        
      "extraArgs": ["--autoConnect"],                                                                                                                         
      "extraEnv": { "PORT": "9222" }                                                                                                                          
    }                                                                                                                                                         
  }                                                                                                                                                           
}                                                                                                                                                             
                                                                                                                                                              
- extraArgs: appended to the args defined in plugin.json                                                                                                      
- extraEnv: merged into the env defined in plugin.json                                                                                                        
- Non-breaking: existing "pluginName": true shorthand still works                                                                                             
                                                                                                                                                              
Option B: Let .mcp.json merge with plugin-defined MCPs                                                                                                        
                                                                                                                                                              
If a plugin registers an MCP server named chrome-devtools and the user also defines chrome-devtools in .mcp.json, merge the user's config on top of the       
plugin's config. User-defined args/env take precedence.                                                                                                       
                                                                                                                                                              
Option C: Add a warning when .mcp.json conflicts with a plugin                                                                                                
                                                                                                                                                              
At minimum, if a user defines an MCP server in .mcp.json that shares the same name as a plugin-installed MCP, show a warning:                                 
                                                                                                                                                              
⚠ MCP server "chrome-devtools" is also defined by plugin                                                                                                      
  "chrome-devtools-mcp@chrome-devtools-plugins".                                                                                                              
  The plugin config takes precedence.                                                                                                                         
                                                                                                                                                              
This alone would have saved me hours of debugging.

### Alternative Solutions

## Alternative Solutions

1. Manually edit plugin.json — This is what I currently do. I edit both ~/.claude/plugins/marketplaces/<marketplace>/.claude-plugin/plugin.json and
~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/.claude-plugin/plugin.json. The downside is that plugin updates overwrite these changes silently.
2. Uninstall the plugin and configure via .mcp.json instead — This works for the MCP server itself, but loses the plugin's bundled skills, guides, and agent
rules that are only available through the plugin system.

Neither alternative is satisfactory.

### Priority

High - Significant impact on productivity

### Feature Category

MCP server integration

### Use Case Example

## Use Case Example

1. I install chrome-devtools-mcp via the plugin system to get its bundled skills (a11y-debugging, troubleshooting, performance analysis, etc.)
2. I open Chrome with remote debugging enabled on my machine
3. I want chrome-devtools-mcp to connect to my existing browser session using --autoConnect, instead of launching a new browser
4. I add --autoConnect to my project's .mcp.json → Does not work. No error, no warning.
5. After hours of debugging, I discover .mcp.json is not read for plugin-installed MCPs
6. I manually edit two plugin.json files deep inside ~/.claude/plugins/ → Works, but fragile
7. Next plugin update → my changes are gone, back to step 4

### Additional Context

## Additional Context

- Environment: Claude Code on Windows 11, plugin chrome-devtools-mcp@chrome-devtools-plugins v0.21.0
- Root cause: The plugin system and .mcp.json are completely independent config paths. Plugin-installed MCPs are launched solely from plugin.json, and
.mcp.json entries for the same server name are silently ignored.
- Files involved:
  - ~/.claude/plugins/marketplaces/<marketplace>/.claude-plugin/plugin.json (marketplace source definition)
  - ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/.claude-plugin/plugin.json (cached copy used at runtime)
  - ~/.claude/plugins/installed_plugins.json (installation registry)
  - {project}/.claude/settings.json → enabledPlugins (project-level enablement, no arg override support)
- This issue likely affects all plugin-installed MCPs where users need custom arguments, not just chrome-devtools-mcp.

extent analysis

TL;DR

To fix the issue, support arg/env overrides in enabledPlugins by modifying the project-level .claude/settings.json to include extraArgs and extraEnv for the plugin.

Guidance

  • Modify the enabledPlugins section in the project-level .claude/settings.json to include extraArgs and extraEnv for the plugin, as shown in the proposed solution.
  • Verify that the extraArgs and extraEnv are correctly appended and merged into the plugin's configuration.
  • Test the modified configuration to ensure that the plugin-installed MCP server is launched with the custom arguments.
  • Consider implementing one of the alternative solutions, such as merging the user's config with the plugin's config or adding a warning when .mcp.json conflicts with a plugin.

Example

{
  "enabledPlugins": {
    "chrome-devtools-mcp@chrome-devtools-plugins": {
      "enabled": true,
      "extraArgs": ["--autoConnect"],
      "extraEnv": { "PORT": "9222" }
    }
  }
}

Notes

The proposed solution requires modifying the project-level configuration file, which may have implications for other plugins or configurations. Additionally, the solution may not work for all plugin-installed MCPs, and further testing is needed to ensure compatibility.

Recommendation

Apply the workaround by modifying the enabledPlugins section in the project-level .claude/settings.json to include extraArgs and extraEnv for the plugin, as this provides a non-breaking solution that allows users to customize the plugin's configuration without modifying the plugin itself.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING