/claude-code-capabilities:managing-mcpsfrom claude-code-capabilities
Creates, analyzes, updates, and evaluates Model Context Protocol (MCP) servers including architecture assessment, security validation, and connection configuration. Use when user asks if current context or logic should be MCP, requests MCP creation/improvement/update, mentions MCP is outdated, or asks how MCPs work, what MCPs are, explaining MCP concepts, understanding MCP architecture, protocol specification, server implementation, client integration, or connecting MCP servers to Claude Code.
Ships in claude-code-capabilities. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Enables comprehensive management of Model Context Protocol (MCP) servers including creation, analysis, improvement, and configuration.
Activate when:
When assessing whether current context or logic should become an MCP server:
Evaluate as checklist. Convert to MCP if 4+ criteria met:
Decision Rule:
Alternative patterns when MCP not appropriate:
When building new MCP server:
Transport Priority: HTTP is the recommended transport for remote servers (better cloud support, more reliable, widely supported). SSE is deprecated. For migration details, load deprecation-notes.md.
Load architecture-overview.md for protocol structure. Design:
Load creation-guide.md for detailed steps. Plan:
Follow creation-guide.md systematic implementation:
Load configuration-guide.md for setup. Create:
Document:
When evaluating existing MCP for improvements:
Document:
Load analysis-framework.md and evaluate:
Categorize findings:
Provide specific improvements:
When updating MCP for new specifications or improvements:
Check against current MCP specification:
When connecting MCP server to Claude Code:
Identify scope level (priority: Local > Project > User):
.mcp.json in project root (team-shared, requires approval)Security: Project-scoped servers require user approval before first use. Claude Code prompts for approval when detecting .mcp.json servers. Use claude mcp reset-project-choices to clear previous approvals.
Execute:
Add server:
claude mcp add --transport [stdio|http|sse] [--scope local|project|user] [--env KEY=VALUE] [--header "Name: Value"] [name] [command/url]
Common flags:
--scope local (default) - Session-specific, not persisted--scope project - Team-shared via .mcp.json--scope user - Cross-project personal--env KEY=VALUE - Pass environment variables (repeatable)--header "Name: Value" - HTTP headers for http/sse (repeatable)Examples:
# Local stdio server (default scope)
claude mcp add --transport stdio my-server -- node /path/to/server.js
# Project-scope server (team-shared)
claude mcp add --transport stdio --scope project github -- npx -y @modelcontextprotocol/server-github
# Remote HTTP server with auth header
claude mcp add --transport http api-server --header "Authorization: Bearer token" https://api.example.com/mcp
# With environment variables
claude mcp add --transport stdio github --env API_KEY=secret -- npx -y @modelcontextprotocol/server-github
Manage servers:
claude mcp list
claude mcp get [name]
claude mcp remove [name]
claude mcp add-json [json-string]
claude mcp reset-project-choices
Windows-specific: Native Windows (not WSL) requires cmd /c wrapper for npx servers:
claude mcp add --transport stdio server -- cmd /c npx -y @package/name
Without this wrapper, connection fails with "Connection closed" error.
When CLI unavailable or batch operations needed:
.mcp.json from project root{"mcpServers": {"name": {"command": "...", "args": [...], "env": {...}}}}For team sharing with machine-specific values, load environment-variable-expansion.md for parameterization patterns.
For OAuth-protected servers:
/mcp in conversationFor detailed OAuth flow and troubleshooting, load oauth-authentication-flow.md.
Plugins can bundle MCP servers automatically. For plugin MCP details, see managing-plugins skill (handles plugin bundling, distribution, mcpServers configuration in plugin.json/.mcp.json).
/mcp in conversation to check server statusUse Bash for diagnostics:
# Verify command exists
which node
# Test server standalone
node /path/to/server.js
# Test with Inspector
npx @modelcontextprotocol/inspector node /path/to/server.js
# Check configuration
claude mcp get server-name
When integrating MCPs into applications via the Anthropic Messages API (not Claude Code):
Load mcp-connector-api-integration.md for complete workflow including:
Note: This workflow is for API users. Claude Code users should use Workflows 5 and 7 instead.
When referencing or invoking MCP capabilities during Claude Code conversations:
User command:
/mcp
Shows:
Syntax: @server:protocol://resource/path
Examples:
@github:issue://owner/repo/123
@database:schema://users
@filesystem:file:///path/to/file
When user requests resource: "Analyze @github:issue://anthropics/claude-code/456" → Claude Code fetches issue content
For detailed resource reference patterns and troubleshooting, load mcp-resources-and-prompts.md.
MCP prompts become slash commands: /mcp__servername__promptname
Examples:
/mcp__github__list_prs
/mcp__github__pr_review 123
/mcp__jira__create_issue "Bug title" high
When user requests prompt: "Execute /mcp__github__pr_review 456" → Claude Code invokes GitHub MCP prompt with arg 456
For prompt discovery, argument patterns, and examples, load mcp-resources-and-prompts.md.
Limits:
Configure limits:
MAX_MCP_OUTPUT_TOKENS=50000 claude # Increase output limit
When approaching limits:
When MCP requires authentication:
/mcp in conversationNo manual token management needed. For detailed OAuth setup and troubleshooting, load oauth-authentication-flow.md.
Load these files when specific detail needed for current workflow step:
Core Guidance:
Advanced Topics:
Cross-Skill References:
Reference:
Discovering MCP servers:
**/package.json, **/*mcp*.py, **/server.tsAnalyzing MCP implementation:
Creating MCP server:
npm init or python -m venvnpm install @modelcontextprotocol/sdknpx @modelcontextprotocol/inspectorConfiguring MCP connection:
claude mcp add --transport [stdio|http|sse] --scope [local|project|user] [name] -- [command].mcp.json from project root, use Edit to modify mcpServersFor advanced configuration topics:
Validating MCP security:
Tool Schema Definition:
{
name: "tool-name",
description: "What it does",
inputSchema: {
type: "object",
properties: {
param: { type: "string", description: "Parameter purpose" }
},
required: ["param"]
}
}
Resource URI Pattern:
protocol://host/path?query=value
Examples:
- file:///path/to/resource
- db://database/table/id
- api://service/endpoint
Error Response:
{
code: -32600, // Invalid request
message: "Clear error description",
data: { additional: "context" }
}
Third-party MCP servers:
Project-scope approval:
.mcp.json servers require user approval before first useclaude mcp reset-project-choicesCross-reference these complementary skills when managing MCPs:
Before considering MCP complete:
When completing MCP management tasks:
For history, see HISTORY.md
analysis-framework.md (opens in a new tab)architecture-overview.md (opens in a new tab)configuration-guide.md (opens in a new tab)creation-guide.md (opens in a new tab)deprecation-notes.md (opens in a new tab)enterprise-mcp-configuration.md (opens in a new tab)environment-variable-expansion.md (opens in a new tab)examples.md (opens in a new tab)mcp-connector-api-integration.md (opens in a new tab)mcp-resources-and-prompts.md (opens in a new tab)oauth-authentication-flow.md (opens in a new tab)plugin-mcp-servers.md (opens in a new tab)security-best-practices.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/managing-agent-skillsCreates, analyzes, updates, and improves Claude Code agent skills including YAML frontmatter, allowed-tools field, progressive disclosure, and skill authoring workflows. Use when user asks how skills work, what agent skills are, explaining skill concepts, understanding SKILL.md structure, describing .md files organization, skill authoring process, asked to create a new skill, evaluate existing skills for improvements, optimize skills for AI/Claude effectiveness, suggest converting current logic into a skill, update outdated skill information, or when user mentions skill validation, best practices, supporting files, skill security, API integration, or technical architecture./managing-hooksCreates, analyzes, updates, and improves Claude Code hooks including configuration, scripts, and security validation. Use when user asks how hooks work, explaining hook concepts, understanding hook types and event lifecycle, describing hook configuration, creating new hooks, analyzing existing hooks for improvements, validating hook security, debugging hook activation, updating hook configurations, or when user mentions "hook", "PreToolUse", "PostToolUse", "SessionStart", or other hook event types. Handles both command hooks and prompt-based hooks across all 9 event types.npx claudepluginhub thoeltig/claude-code-toolkit --plugin claude-code-capabilities