Plugin loader starts duplicate MCP servers from both cache and marketplace paths

Resolved 💬 3 comments Opened Mar 26, 2026 by liusining Closed Mar 26, 2026

Bug

When a plugin is installed from a marketplace, Claude Code starts two identical MCP server processes for it — one from the cache path and one from the marketplace path. This causes critical issues for plugins that use exclusive resources (e.g., Telegram bot polling via getUpdates).

Steps to reproduce

  1. Install a plugin from a marketplace (e.g., telegram@claude-plugins-official)
  2. Start a Claude Code session with that plugin enabled
  3. Check running processes

Expected

One MCP server process for the plugin (from the cache/installed path).

Actual

Two MCP server processes:

  • bun run --cwd ~/.claude/plugins/cache/<marketplace>/<plugin>/<version> start
  • bun run --cwd ~/.claude/plugins/marketplaces/<marketplace>/external_plugins/<plugin> start

Both directories contain identical code and identical .mcp.json. The plugin loader does not deduplicate — it loads the installed (cache) copy AND discovers the same plugin in the marketplace directory.

Impact

For the Telegram plugin, both processes call getUpdates with the same bot token, causing constant 409 Conflict errors. Messages are randomly delivered to one process, but the MCP notification may reach a different Claude Code connection, resulting in messages being silently dropped (user sees "typing" but never receives a reply).

Suggested fix

When loading installed plugins from cache, skip same-named plugins found during marketplace directory scanning.

View original on GitHub ↗

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