/doctor reports false positive for uninstalled plugins with missing env vars

Resolved 💬 2 comments Opened Jun 17, 2026 by q3769-patientpoint Closed Jun 21, 2026

Summary

/doctor reports MCP server errors for plugins that have been uninstalled, causing false positives that cannot be resolved by the user.

Steps to Reproduce

  1. Install the terraform plugin from claude-plugins-official marketplace
  2. Uninstall it: claude plugin uninstall terraform
  3. Run /doctor

Expected: No errors reported for the uninstalled plugin.
Actual: /doctor still reports: Plugin (terraform @ terraform@claude-plugins-official): MCP server terraform invalid: Missing environment variables: TFE_TOKEN

Root Cause (observed)

After uninstalling, the plugin is correctly removed from ~/.claude/plugins/installed_plugins.json and its cache directory is gone. However, the marketplace index at ~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/terraform/.mcp.json still contains the MCP server config with the TFE_TOKEN env var reference.

/doctor appears to scan .mcp.json files from the marketplace index rather than (or in addition to) only installed plugins, causing it to report errors for plugins that are not installed.

Deleting the cache directory (~/.claude/plugins/cache/claude-plugins-official/terraform/) did not resolve the issue, confirming the source is the marketplace directory.

Environment

  • Claude Code version: 2.1.179
  • OS: macOS Darwin 25.5.0
  • Plugin: terraform@claude-plugins-official (uninstalled)

Impact

Users who uninstall a plugin with required env vars are stuck with a persistent /doctor error they cannot fix without deleting marketplace index files (which would corrupt the marketplace).

View original on GitHub ↗

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