[BUG] MCP server is suppressed as a duplicate of another MCP server defined in the same plugin

Resolved 💬 3 comments Opened Mar 9, 2026 by rmacconn Closed Apr 11, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I have a plugin that has multiple MCP servers defined which use the same command and args but have different environment variable values. The environment variable controls the source of the data so the two MCP servers serve distinct purposes.

Example .mcp.json in the plugin:

{
  "mcpServers": {
    "echo-server-a": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-everything@latest"],
      "env": {
        "SERVER_NAME": "server-a",
        "CUSTOM_GREETING": "Hello from Server A"
      }
    },
    "echo-server-b": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-everything@latest"],
      "env": {
        "SERVER_NAME": "server-b",
        "CUSTOM_GREETING": "Hello from Server B"
      }
    }
  }
}

This now results in an error when trying to load the MCP server:

[DEBUG] Suppressing plugin MCP server "plugin:dedup-bug:echo-server-b": duplicates earlier plugin server "plugin:dedup-bug:echo-server-a"

This regression was introduced in v2.1.71 based on Improved plugin-provided MCP server deduplication — servers that duplicate a manually-configured server (same command/URL) are now skipped, preventing duplicate connections and tool sets. Suppressions are shown in the /plugin menu. in the release notes.

This also leads to an issue in the plugin errors UI where Claude Code says to disable plugin 'dedup-bug' if you want to use plugin 'dedup-bug'.

✘ dedup-bug
MCP server 'echo-server-b' skipped — same command/URL as server provided by plugin 'dedup-bug'
Disable plugin 'dedup-bug' if you want this plugin's version instead

What Should Happen?

Deduplication should be on trigger when all input values (command, args, env) are the same

Error Messages/Logs

[DEBUG] Suppressing plugin MCP server "plugin:dedup-bug:echo-server-b": duplicates earlier plugin server "plugin:dedup-bug:echo-server-a"

Steps to Reproduce

  1. Create a plugin with multiple MCP servers where the only difference in the environment variables passed.
  2. Launch claude specifying --plugin-dir
  3. Run /plugin and check for errors

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.70

Claude Code Version

2.1.70 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗