update-mcp-servers
Comprehensive MCP server management. Discovers, updates, and helps set up MCP servers with dependency detection and best practice guidance.
What this skill does
# Update MCP Servers
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.
## When to Use
- After a fresh Claude Code installation
- When MCP server tools return connection errors
- Periodically to get latest package versions
- After seeing "package outdated" warnings
- When setting up a new development environment
- To install missing dependencies for MCP servers
## Arguments
| 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 | |
## Workflow
### Step 1: Session-Aware Discovery
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.
#### Primary: File-Based Discovery (MANDATORY)
1. **Plugin configs**: Use `Glob` to find `plugins/*/.mcp.json` files
2. **Project config**: Read `.mcp.json` in the project root
3. **User config**: Read `~/.claude/settings.json` (or `$APPDATA/Claude/settings.json` on Windows)
Parse the `mcpServers` key from each file. Each entry has:
```json
{
"mcpServers": {
"server-name": {
"command": "cmd",
"args": ["/c", "npx", "-y", "perplexity-mcp"],
"env": {}
}
}
}
```
**For each server, extract:**
- `server_name`: The JSON key
- `command`: The `command` field
- `args`: The `args` array (join for pattern matching)
- `source_file`: Which config file defined it
- `is_http`: `type` is `"url"` or command/args contain an HTTP URL
- `is_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.
#### Secondary: CLI Validation (Best-Effort)
Attempt `CLAUDECODE= claude mcp list` to get live connection status:
- If the command succeeds, merge `status` (Connected/Disconnected/Error) into each server entry
- If the command fails (e.g., inside active session), proceed with file-based discovery and set `status` to `unknown`
- Do NOT block on CLI failure -- file-based discovery is sufficient for updates
### Step 2: Detect Installation Methods
For each server, determine the update method based on the command pattern:
#### Package Manager Patterns (Direct Update)
| 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 (Auto-Managed .NET Packages)
`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.
- **Detection**: Command or args contain `dnx`
- **Classification**: `dnx (auto-managed)` in report
- **Prerequisite**: .NET 10+ SDK must be installed (check via `dotnet --version`, major >= 10)
- **Update action**: None required. If .NET SDK < 10, provide install guidance (see Step 6.5)
- **Report note**: Show `.NET SDK version` and confirm auto-resolution is active
#### Git Clone / Local Repository Patterns (Multi-Step Update)
These 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:**
1. Extract the directory path from the command arguments
2. Check if the directory contains a `.git` folder
3. If yes, classify as `git-*` method based on runtime (node/python/dotnet)
4. If no `.git` folder, classify as `unknown` (manual update required)
#### Plugin-Vendored Patterns
Detect `${CLAUDE_PLUGIN_ROOT}` in command or args as plugin-vendored servers. These are managed by their owning plugin, not by this command.
**Detection:**
1. Check if `args` (joined) or `command` contains `${CLAUDE_PLUGIN_ROOT}` as a literal string
2. Extract the plugin name from the source file path (e.g., `plugins/microsoft/.mcp.json` -> `microsoft`)
**For each plugin-vendored server:**
- Check for a `VERSION` file in the vendor root (e.g., `plugins/<plugin>/vendor/<server>/VERSION`)
- Look for a plugin update command (e.g., `/microsoft:mssql update`)
- If `--check` is passed, run the plugin's update command with `--check` to see if upstream has changes
**Classification**: `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.
#### Dotnet Tool Name Resolution
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:**
1. Run `dotnet tool list -g` to get the installed tools table (`Package Id | Version | Commands`)
2. Build a command-to-package lookup map: `aspire` -> `aspire.cli`, etc.
3. When updating a dotnet tool, use the resolved **package name** (not the binary name) for `dotnet tool update -g <package-name>`
4. If resolution fails (binary not found in tool list), warn and fall back to binary name
**Package Name Extraction:**
- For `npx -y package-name@latest` -> extract `package-name` (strip `@latest`)
- For `cmd /c npx -y package` -> extract `package` (ignore Windows wrapper)
- For scoped packages `@org/package@version` -> extract `@org/package`
- For git repos: extract repo name from path for display purposes
- For dotnet tools: use resolved package name from `dotnet tool list -g`
**Group servers by updateable status:**
- `updateable`: Servers with npm, python, uvx, pipx, dotnet-tool, docker, or git methods
- `remote`: 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)
### Step 2.5: Dependency Detection & Setup Assistance
Before attempting updates, check if required tools are available. If missing, offer installation assistance with best practices.
#### Dependency Check Matrix
| Runtime/Tool | Detection Command | Required For |
|--------------|-------------------|--------------|
| node | `node --version` | npm, npx, git-node |
| npm | `npm --version` | npm packages |
| nvm | `nvm Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.