Skip to content

optimize: MCP finding suggests claude mcp remove for claude.ai connectors, which cannot remove them (and collides with same-named local servers) #975

Description

@adamkwhite

Problem

The "N MCP servers with low tool coverage" finding emits a remediation command per server:

-- Run this command ────────────────────────────────────
Remove underused servers, or trim their tools in your MCP config:
  claude mcp remove 'firecrawl-mcp'
  claude mcp remove 'claude_ai_Slack'
  claude mcp remove 'filesystem'
  claude mcp remove 'claude_ai_Google_Calendar'
  claude mcp remove 'claude_ai_Netlify'

claude mcp remove edits local MCP config (~/.claude.json / .mcp.json). The claude_ai_* entries are claude.ai connectors, provisioned server-side and toggled through /mcp or claude.ai's connector settings. They have no local mcpServers entry, so the command cannot remove them.

codeburn 0.9.20 (npm), Claude Code 2.1.228.

Evidence

Detection is correct — these servers really are loaded and unused. Only the remediation is wrong.

My local mcpServers at user scope, at the time codeburn suggested removing three claude_ai_* servers:

autoclaude-channel, claude-memory, google-workspace, playwright

No claude_ai_* key exists anywhere in ~/.claude.json or ~/.claude/settings.json. codeburn is deriving these names from transcript tool prefixes (mcp__claude_ai_Netlify__*), which is a reasonable detection method, but the fix assumes local config ownership that isn't there.

There is also a naming mismatch that would defeat a name-based match. Claude Code's own disabledMcpServers lists spell the connector with a dot and a space:

"disabledMcpServers": ["jira", "MongoDB", "claude.ai Jira",
  "claude.ai Google Calendar", "firecrawl-mcp",
  "claude.ai Slack", "claude.ai Netlify"]

claude.ai Netlify in config vs claude_ai_Netlify in the tool prefix.

Second problem: name collision with a real local server

I run a local netlify MCP, configured at project scope and actively used in two projects. codeburn's advice was claude mcp remove 'claude_ai_Netlify', referring to the unused connector.

Read quickly, that is "remove Netlify" — while a differently-scoped Netlify server is a live dependency. A user who acts on it either removes the wrong thing or spends time working out that these are two different servers with near-identical names.

Third, smaller: the finding is not scoped where it applies

Connectors are enabled/disabled per project. In my case the connector was already disabled in one project and still loading in another, so the correct action was a per-project toggle, not a global remove. The finding aggregates across projects and suggests one global command.

(Related: #974 covers a separate inflation in the session population these findings run over.)

Suggested direction

Listing options rather than assuming a preference:

  1. Detect the claude_ai_* prefix and emit connector-appropriate guidance — "disable in /mcp, or at claude.ai → Settings → Connectors" — instead of claude mcp remove.
  2. Before suggesting claude mcp remove <name>, confirm <name> actually resolves in local MCP config; if it doesn't, say where the server is actually configured rather than emitting a command that will fail.
  3. When an unused server's name is a substring/variant of a used server elsewhere, disambiguate explicitly in the finding text (scope + config source), so the advice can't be misread as targeting the live one.
  4. Where per-project usage data already exists, scope the suggestion to the projects where the server is loaded-but-unused.

Option 2 generalises best — it turns any "command targets config codeburn doesn't own" case into a diagnostic rather than a broken command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions