From claude-ecosystem
Discovers MCP servers from Claude Code configs, detects dependencies, updates packages using best practices. Run after fresh installs, connection errors, or periodically.
npx claudepluginhub melodic-software/claude-code-plugins --plugin claude-ecosystemThis skill is limited to using the following tools:
Comprehensive one-stop shop for MCP server management. Dynamically discovers all MCP servers, detects installation methods, identifies missing dependencies, offers installation assistance, and updates servers using best practices.
Manages MCP servers across coding agents like Claude Code, Cursor, VS Code: search, install via npx add-mcp or claude mcp, configure, update, remove.
Manages Model Context Protocol (MCP) servers for Claude Code projects: installs/configures .mcp.json, OAuth remotes, runtime enable/disable, troubleshooting connections.
Manages MCP servers by searching, installing, configuring, updating, and removing them across agents like Claude Code, Cursor, VS Code, and more. Supports npx add-mcp multi-agent installs.
Share bugs, ideas, or general feedback.
Comprehensive one-stop shop for MCP server management. Dynamically discovers all MCP servers, detects installation methods, identifies missing dependencies, offers installation assistance, and updates servers using best practices.
| Argument | Description | Default |
|---|---|---|
--all | Update all updateable servers | Default if no args |
--enabled-only | Only update currently connected servers | |
--server NAME | Update specific server(s) | Can be repeated |
--dry-run | Show what would be updated without executing | false |
--interactive | Force interactive selection mode | Auto if <10 servers |
--non-interactive / --yes | Skip all prompts, proceed with updates | |
--help | Show comprehensive help and supported methods |
Discover all configured MCP servers by parsing configuration files directly. This avoids the limitation that claude mcp list cannot run inside an active Claude Code session.
Glob to find plugins/*/.mcp.json files.mcp.json in the project root~/.claude/settings.json (or $APPDATA/Claude/settings.json on Windows)Parse the mcpServers key from each file. Each entry has:
{
"mcpServers": {
"server-name": {
"command": "cmd",
"args": ["/c", "npx", "-y", "perplexity-mcp"],
"env": {}
}
}
}
For each server, extract:
server_name: The JSON keycommand: The command fieldargs: The args array (join for pattern matching)source_file: Which config file defined itis_http: type is "url" or command/args contain an HTTP URLis_plugin_vendored: args contain ${CLAUDE_PLUGIN_ROOT} (treat as literal pattern, do not expand)Merge servers across files, noting source. If a server appears in multiple files, note all sources.
Attempt CLAUDECODE= claude mcp list to get live connection status:
status (Connected/Disconnected/Error) into each server entrystatus to unknownFor each server, determine the update method based on the command pattern:
| Pattern | Method | Update Command |
|---|---|---|
Contains npx -y | npm | npm install -g <package> |
Contains npm exec | npm | npm install -g <package> |
Contains uvx | uvx | uv tool upgrade <package> |
Contains pipx run | pipx | pipx upgrade <package> |
Contains python -m or .py (not in repo) | python | pip install --upgrade <package> |
Contains uv run (not in repo) | python (uv) | uv pip install --upgrade <package> |
Contains dotnet tool run | dotnet-tool | dotnet tool update -g <tool> |
Contains dnx | dnx (.NET 10) | None (auto-managed) |
Contains docker run | docker | docker pull <image> |
Starts with https:// or has (HTTP) | remote | None (server-managed) |
dnx is .NET 10 SDK's equivalent of npx. Packages auto-resolve to the latest version on each run -- there is no local install to update.
dnxdnx (auto-managed) in reportdotnet --version, major >= 10).NET SDK version and confirm auto-resolution is activeThese patterns require detecting when an MCP server points to a local file path that is inside a git repository.
| Pattern | Method | Update Sequence |
|---|---|---|
node /path/to/repo/... (with .git) | git-node | git pull && npm install && npm run build |
python /path/to/repo/... (with .git) | git-python | git pull && pip install -r requirements.txt |
uv run --directory /path/to/repo ... (with .git) | git-python-uv | git pull && uv sync |
dotnet run --project /path/to/repo (with .git) | git-dotnet | git pull && dotnet build |
dotnet /path/to/repo/bin/... (with .git) | git-dotnet | git pull && dotnet build |
Git Repository Detection:
.git foldergit-* method based on runtime (node/python/dotnet).git folder, classify as unknown (manual update required)Detect ${CLAUDE_PLUGIN_ROOT} in command or args as plugin-vendored servers. These are managed by their owning plugin, not by this command.
Detection:
args (joined) or command contains ${CLAUDE_PLUGIN_ROOT} as a literal stringplugins/microsoft/.mcp.json -> microsoft)For each plugin-vendored server:
VERSION file in the vendor root (e.g., plugins/<plugin>/vendor/<server>/VERSION)/microsoft:mssql update)--check is passed, run the plugin's update command with --check to see if upstream has changesClassification: plugin-vendored -- delegate to the plugin's own update command.
Report format: Show server name, owning plugin, current version/commit, and the update command to run.
Binary names used in MCP configs may differ from dotnet tool package names (e.g., aspire binary is installed as aspire.cli package). Resolve the correct package name before updating.
Resolution process:
dotnet tool list -g to get the installed tools table (Package Id | Version | Commands)aspire -> aspire.cli, etc.dotnet tool update -g <package-name>Package Name Extraction:
npx -y package-name@latest -> extract package-name (strip @latest)cmd /c npx -y package -> extract package (ignore Windows wrapper)@org/package@version -> extract @org/packagedotnet tool list -gGroup servers by updateable status:
updateable: Servers with npm, python, uvx, pipx, dotnet-tool, docker, or git methodsremote: HTTP/SSE servers (no local update needed)dnx: Auto-managed by .NET SDK (no update needed, verify SDK version)plugin-vendored: Managed by plugin update commands (delegate, not auto-updated here)unknown: Unrecognized command patterns (report for manual handling)Before attempting updates, check if required tools are available. If missing, offer installation assistance with best practices.
| Runtime/Tool | Detection Command | Required For |
|---|---|---|
| node | node --version | npm, npx, git-node |
| npm | npm --version | npm packages |
| nvm | nvm --version or check $NVM_DIR | Best practice for Node |
| python | python --version or python3 --version | python packages |
| pip | pip --version or pip3 --version | python packages |
| uv | uv --version | uv/uvx packages |
| pipx | pipx --version | pipx packages |
| dotnet | dotnet --version | dotnet tools |
| dotnet 10+ | dotnet --version (major >= 10) | dnx-based servers |
| docker | docker --version | docker images |
| git | git --version | git-cloned repos |
When a dependency is missing, offer installation options via AskUserQuestion:
Node.js/npm:
nvm installation commands:
# macOS/Linux
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source ~/.bashrc # or ~/.zshrc
nvm install --lts
# Windows - guide to nvm-windows
# https://github.com/coreybutler/nvm-windows
Python:
uv installation:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
.NET SDK:
Docker:
When user approves installation:
Detect platform for appropriate package manager suggestions:
# Check OS
uname -s # Linux, Darwin (macOS), MINGW*/MSYS* (Windows Git Bash)
| Platform | Package Manager | Notes |
|---|---|---|
| macOS | Homebrew (brew) | Preferred for system tools |
| Windows | winget / chocolatey | winget is built-in on modern Windows |
| Linux (Debian/Ubuntu) | apt | sudo apt install |
| Linux (Fedora/RHEL) | dnf | sudo dnf install |
Parse the command arguments to determine the operation mode:
Mode selection (mutually exclusive):
--all (default): Update all updateable servers--enabled-only: Only update servers with "Connected" status--server NAME: Update only the specified server(s)--help: Show comprehensive helpOptions:
--dry-run: Display what would be updated without executing--interactive: Force interactive selection via AskUserQuestion--non-interactive or --yes: Skip all promptsAuto-interactive logic:
If neither --interactive nor --non-interactive is specified:
When interactive mode is enabled, use AskUserQuestion to let the user select which servers to update.
Question 2 (if "Select specific servers"):
Before executing updates, snapshot current versions for before/after comparison in the report.
NPM global packages:
npm ls -g --depth=0 2>/dev/null
Parse package@version pairs. For npx-only packages (not globally installed), record as (npx on-demand).
Dotnet global tools:
dotnet tool list -g 2>/dev/null
Parse the Package Id | Version | Commands table columns.
Docker images:
docker images --format "{{.Repository}}:{{.Tag}}" 2>/dev/null
Git repositories:
git -C /path/to/repo rev-parse --short HEAD 2>/dev/null
Capture the short commit hash for each git-cloned server.
Plugin-vendored servers:
cat plugins/<plugin>/vendor/<server>/VERSION 2>/dev/null
If no VERSION file, use git commit hash of the vendor directory.
Python (uvx/pipx):
uv tool list 2>/dev/null
pipx list --short 2>/dev/null
Store all versions in a lookup map keyed by server/package name for use in Step 6.
Group packages by installation method and execute updates efficiently:
NPM packages:
npm install -g package1 package2 package3
Python packages (pip):
pip install --upgrade package1 package2
Python packages (uvx):
uv tool upgrade package1
uv tool upgrade package2
pipx packages:
pipx upgrade package1
pipx upgrade package2
.NET tools (use resolved package names):
Use the package names resolved in Step 2 (Dotnet Tool Name Resolution), NOT the binary names from the MCP config.
# Example: binary "aspire" resolves to package "aspire.cli"
dotnet tool update -g aspire.cli
dotnet tool update -g tool2-package-name
If package name resolution was not possible (tool not in dotnet tool list -g), warn and attempt with the binary name as fallback.
Docker images:
docker pull image1:latest
docker pull image2:latest
For git-cloned MCP servers, execute update sequence per repository:
git-node:
cd /path/to/repo
git status --porcelain # Check for uncommitted changes
git pull origin $(git rev-parse --abbrev-ref HEAD)
npm install
npm run build # if build script exists in package.json
git-python:
cd /path/to/repo
git status --porcelain
git pull origin $(git rev-parse --abbrev-ref HEAD)
pip install -r requirements.txt # if exists
# or: pip install -e . # if setup.py/pyproject.toml exists
git-python-uv:
cd /path/to/repo
git status --porcelain
git pull origin $(git rev-parse --abbrev-ref HEAD)
uv sync
git-dotnet:
cd /path/to/repo
git status --porcelain
git pull origin $(git rev-parse --abbrev-ref HEAD)
dotnet build
Safety Checks for Git Updates:
After all updates complete, re-run the same version detection commands from Step 4.5 to capture updated versions. Store in a separate lookup map for comparison in the report.
After execution, display a summary of the update results with before/after version tracking:
# MCP Server Update Results
## Summary
- **Discovered:** 14 MCP servers
- **Remote (no update needed):** 3 servers
- **Package managers updated:** 4 servers
- **Git repositories updated:** 2 servers
- **Plugin-vendored (delegated):** 2 servers
- **dnx (auto-managed):** 1 server
- **Unknown (manual):** 1 server
- **Failed:** 0 servers
## NPM Packages
| Package | Previous | Updated | Status |
|---------|----------|---------|--------|
| perplexity-mcp | 0.2.2 | 0.2.3 | Updated |
| firecrawl-mcp | 1.8.0 | 1.8.0 | Already latest |
| chrome-devtools-mcp | (npx on-demand) | (npx on-demand) | On-demand |
| @playwright/mcp | 0.1.5 | 0.1.6 | Updated |
## Dotnet Tools
| Package (resolved) | Previous | Updated | Status |
|---------------------|----------|---------|--------|
| aspire.cli (binary: aspire) | 9.1.0 | 9.2.0 | Updated |
## Git Repositories
| Repository | Method | Previous | Updated | Status |
|------------|--------|----------|---------|--------|
| mssql-mcp-server | git-node | a1b2c3d | f4e5d6a | Pulled + Rebuilt |
| custom-tools | git-python | 7g8h9i0 | 7g8h9i0 | Already latest |
## Plugin-Vendored Servers
| Server | Plugin | Current Version | Update Command |
|--------|--------|-----------------|----------------|
| mssql-node | microsoft | v1.2.0 | `/microsoft:mssql update` |
| mssql-dotnet | microsoft | v1.2.0 | `/microsoft:mssql update` |
## dnx Servers (Auto-Managed)
| Server | Package | .NET SDK | Status |
|--------|---------|----------|--------|
| nuget | nuget-mcp | 10.0.100 | Auto-resolves latest on each run |
## Remote Servers (no action needed)
| Server | URL |
|--------|-----|
| context7 | https://mcp.context7.com/mcp |
| microsoft-learn | https://... |
| Ref | https://... |
## Unknown / Manual Update Required
| Server | Command | Reason |
|--------|---------|--------|
| custom-local | /path/to/binary | Not a git repo, unknown package manager |
## Next Steps
- Restart Claude Code to use updated servers
- Run `/mcp` to verify server connections
- For plugin-vendored servers, run their update commands separately
When automation cannot complete an update, provide actionable manual instructions. Each template follows the format: problem statement, WHY explanation, numbered steps with copy-paste commands.
Cannot update <tool> while Claude Code is running.
WHY: The <tool> binary is currently in use by this Claude Code session.
Updating it while locked may fail or corrupt the installation.
MANUAL STEPS:
1. Close this Claude Code session:
Press Ctrl+C or type /exit
2. Run the update command in your terminal:
<update-command>
3. Restart Claude Code:
claude
4. Verify the update:
/update-mcp-servers --dry-run
npm install -g failed with EACCES (permission denied).
WHY: Global npm packages are installed in a system directory that
requires elevated permissions, or npm prefix is misconfigured.
MANUAL STEPS (Option A - Fix npm prefix, recommended):
1. Set npm prefix to user directory:
npm config set prefix ~/.npm-global
2. Add to your shell profile (~/.bashrc or ~/.zshrc):
export PATH="$HOME/.npm-global/bin:$PATH"
3. Reload shell and retry:
source ~/.bashrc
npm install -g <package>
MANUAL STEPS (Option B - Use sudo):
1. Run with elevated permissions:
sudo npm install -g <package>
git pull failed with merge conflicts in <repo>.
WHY: Local changes conflict with upstream changes. Automatic merge
cannot resolve these differences.
MANUAL STEPS:
1. Navigate to the repository:
cd <repo-path>
2. Check conflict status:
git status
3. Resolve conflicts in each file (edit and remove conflict markers)
4. Mark resolved and complete merge:
git add .
git commit -m "Resolve merge conflicts"
5. Rebuild the project:
<build-command>
6. Verify server works:
/update-mcp-servers --server <name> --dry-run
dnx-based server requires .NET 10+ SDK but found version <version> (or none).
WHY: dnx is a .NET 10 SDK feature (equivalent of npx). Packages
auto-resolve to latest on each run, but the SDK must be version 10+.
MANUAL STEPS:
Windows:
winget install Microsoft.DotNet.SDK.10
macOS:
brew install dotnet@10
Linux (Ubuntu/Debian):
sudo apt-get update
sudo apt-get install -y dotnet-sdk-10.0
Linux (Fedora):
sudo dnf install dotnet-sdk-10.0
Verify installation:
dotnet --version
# Should show 10.x.xxx or higher
This command acts as an intelligent assistant that can handle any situation:
| Scenario | Behavior |
|---|---|
| All deps present | Proceed with updates normally |
| Some deps missing | Offer installation for missing, skip unavailable servers if declined |
| No MCP servers | Guide user on how to add MCP servers with claude mcp add |
| All servers remote | Explain no local updates needed, offer to verify connectivity |
| Git repo dirty | Offer to stash changes, or skip with explanation |
| Network unavailable | Detect and report, suggest retry later |
| Partial failure | Continue with remaining, summarize what succeeded/failed |
When analyzing servers, proactively suggest improvements:
Recommendations:
- Consider using nvm to manage Node.js versions (you're using system Node)
- Server 'custom-mcp' uses deprecated SSE transport - consider migrating to HTTP
- 3 npm packages could use @latest for auto-updates in config
If user runs with --help, display comprehensive help:
MCP Server Update Command - Comprehensive Management Tool
DISCOVERY:
Automatically finds all MCP servers from:
- .mcp.json files (project + plugins)
- User settings.json
- claude mcp list (best-effort for live status)
SUPPORTED UPDATE METHODS:
npm/npx packages
Python (pip, uv, uvx, pipx)
.NET tools (with package name resolution)
Docker images
Git-cloned repositories (Node, Python, .NET)
dnx packages (auto-managed, .NET 10+ SDK)
Plugin-vendored servers (delegated to plugin commands)
Remote HTTP/SSE (no update needed)
DEPENDENCY MANAGEMENT:
Missing tools? We'll help you install them with best practices:
- Node.js via nvm (recommended)
- Python via uv or pyenv
- .NET SDK via official installer
- Docker Desktop
COMMON USAGE:
/update-mcp-servers # Interactive update of all servers
/update-mcp-servers --dry-run # Preview what would be updated
/update-mcp-servers --server X # Update specific server
/update-mcp-servers --all --yes # Update all, no prompts
For more details, see: https://code.claude.com/docs/en/mcp
When errors occur, provide actionable troubleshooting:
npm install failed for 'perplexity-mcp'
Possible causes:
1. Network connectivity issue
2. npm registry temporarily unavailable
3. Package name changed or deprecated
Suggested actions:
- Retry: /update-mcp-servers --server perplexity
- Check npm status: https://status.npmjs.org/
- Verify package: npm view perplexity-mcp
- Search for alternatives: Would you like me to search for similar MCP servers?
| Type | Description | Update Required |
|---|---|---|
| stdio | Local process (npm, python, docker, git) | Yes - update package/image/repo |
| http | Remote HTTP server | No - server-managed |
| sse | Server-Sent Events (deprecated) | No - server-managed |
| Error | Handling |
|---|---|
claude mcp list fails | Proceed with file-based discovery; set status to unknown |
| No updateable servers | Report "All servers are remote HTTP - no local updates needed" |
| npm install fails | Report failure, continue with remaining packages |
| pip install fails | Report failure, suggest venv activation if needed |
| dotnet tool update fails | Report failure, show resolved package name, suggest SDK version check |
| git pull fails | Report failure (dirty working directory, network, etc.) |
| git repo has conflicts | Skip update, report "Manual merge required" (see Step 6.5) |
| Unknown method | Report "Cannot auto-update: unknown method" with guidance |
| Permission denied | Suggest sudo or npm prefix configuration (see Step 6.5) |
| Missing dependency | Offer to install with best practices (see Step 2.5) |
| Tool locked by session | Provide manual steps to close session, update, restart (see Step 6.5) |
| dnx requires .NET 10+ SDK | Show SDK version found, provide install commands (see Step 6.5) |
| Plugin-vendored server | Delegate to plugin update command, do not attempt direct update |
User: /claude-ecosystem:update-mcp-servers
# Discovery output:
Found 10 MCP servers:
- 4 updateable (npm)
- 2 updateable (git-node)
- 3 remote (no update needed)
- 1 unknown (manual)
# Interactive prompt (auto-enabled, <10 updateable):
Which MCP servers would you like to update?
> Update all (6 servers)
# Execution:
npm install -g chrome-devtools-mcp firecrawl-mcp perplexity-mcp @playwright/mcp
Updating git repo: mssql-mcp-server...
Updating git repo: custom-tools...
# Results:
Updated 6 servers successfully.
User: /claude-ecosystem:update-mcp-servers --dry-run
# Shows what would be updated without executing:
Would update 4 npm packages:
npm install -g chrome-devtools-mcp firecrawl-mcp perplexity-mcp @playwright/mcp
Would update 2 git repositories:
mssql-mcp-server (git-node): git pull && npm install && npm run build
custom-tools (git-python): git pull && pip install -r requirements.txt
Remote servers (no update needed): context7, microsoft-learn, Ref
Unknown (manual): custom-local
User: /claude-ecosystem:update-mcp-servers
# Dependency check:
Node.js/npm is required but not found.
# AskUserQuestion:
How would you like to install Node.js?
> Install via nvm (Recommended)
# Installation:
Installing nvm...
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
nvm install --lts
Node.js v22.x installed successfully
# Continue with updates...
User: /claude-ecosystem:update-mcp-servers --server mssql
# Git status check:
Repository 'mssql-mcp-server' has uncommitted changes.
# AskUserQuestion:
How would you like to handle this?
> Stash changes and continue
# Execution:
git stash
git pull origin main
npm install
npm run build
git stash pop
Updated mssql-mcp-server
User: /claude-ecosystem:update-mcp-servers --all --non-interactive
# Skips prompts, updates all immediately:
Checking dependencies...
All required dependencies available
Updating 6 servers...
npm install -g chrome-devtools-mcp firecrawl-mcp perplexity-mcp @playwright/mcp
Updating mssql-mcp-server...
Updating custom-tools...
Done. Updated 6 servers.
User: /claude-ecosystem:update-mcp-servers --dry-run
# Discovery:
Found 14 MCP servers from 5 config files
# Classification:
- 4 npm packages (updateable)
- 1 dotnet tool: aspire.cli (resolved from binary "aspire")
- 1 dnx server: nuget-mcp (auto-managed, .NET SDK 10.0.100)
- 2 plugin-vendored: mssql-node, mssql-dotnet (plugin: microsoft)
- 3 remote (no update needed)
- 2 git repositories
- 1 unknown
# Plugin-vendored note:
mssql-node and mssql-dotnet are managed by the microsoft plugin.
Run `/microsoft:mssql update` to update these servers.
# dnx note:
nuget-mcp uses dnx (auto-resolves latest on each run).
.NET SDK 10.0.100 detected -- no update action needed.
/audit-mcp - Audit MCP server configurations/user-config:mcp - Manage MCP server configurations/mcp - Check MCP server status (built-in)Invoke mcp-integration skill for MCP transport type guidance and validation patterns.