mcpField
M
mcp-management

mcp-management

github.com/laurigatesAgent workflows5936 installsUpdated 2d ago
Repository

About mcp-management

mcp-management is a skill for managing MCP servers in Claude Code projects. It explains runtime server controls, OAuth for remote servers, dynamic tool discovery, configuration scopes, and troubleshooting.

Key features

  1. 01Runtime server status and controls
  2. 02OAuth 2.1 for remote servers
  3. 03Dynamic tool and resource discovery
  4. 04Project, user, and plugin configuration
  5. 05Connection and OAuth troubleshooting

Use cases

  1. 01Check and enable or disable configured servers
  2. 02Set up OAuth access to remote MCP servers
  3. 03Refresh tools when server capabilities change
  4. 04Diagnose connection and authorization issues

MCP support

The skill covers configuring and operating MCP servers in Claude Code, including local stdio and remote HTTP+SSE transports. It describes server status, OAuth, and dynamic discovery behavior.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/laurigates/claude-plugins --skill mcp-management

After installing, type/mcp-managementin Claude Code to confirm it loaded.

Bundled filesREFERENCE.md

Details

From the project README

MCP Server Management

Expert knowledge for managing Model Context Protocol (MCP) servers on a project-by-project basis, with support for runtime management, OAuth remote servers, and dynamic server discovery.

For server config examples, the OAuth deep-dive, dynamic-discovery detail, troubleshooting scripts, and full configuration-pattern examples, see REFERENCE.md.

When to Use This Skill

Use this skill when...Use configure-mcp instead when...
Understanding MCP architecture and conceptsSetting up .mcp.json for a new project
Managing servers at runtime (enable/disable)Installing new servers interactively
Setting up OAuth remote MCP serversRunning compliance checks on MCP configuration
Troubleshooting connection failuresAdding specific servers from the registry
Implementing list_changed dynamic discoveryGenerating project standards reports

MCP Architecture Overview

MCP connects Claude Code to external tools and data sources via two transport types:

TransportUsageAuthConfiguration
Stdio (local)Command-based servers via npx, bunx, uvx, go runNone needed.mcp.json
HTTP+SSE (remote)URL-based servers hosted externallyOAuth 2.1.mcp.json with url field

Local servers declare a command + args; remote servers declare a url + headers (with ${VAR_NAME} token references, never hardcoded). See REFERENCE.md → Server configuration examples.

Runtime Server Management

/mcp Commands (Claude Code 2.1.50+)

Manage servers without editing configuration files:

CommandDescription
/mcpList all configured MCP servers and their connection status
/mcp enable <server>Enable a server for the current session
/mcp disable <server>Disable a server for the current session (session-scoped only)

Note: Enable/disable are session-scoped. Edit .mcp.json for permanent changes.

Check Server Status
jq -r '.mcpServers | keys[]' .mcp.json   # List configured servers
jq '.mcpServers.context7' .mcp.json      # Verify a server's config

OAuth Remote Servers (2.1.50+)

Remote HTTP+SSE servers use OAuth 2.1: Claude Code discovers metadata from /.well-known/oauth-authorization-server (cached per URL), the user authorizes in-browser once, and step-up auth re-prompts when a tool needs elevated scope. To refresh stale OAuth config, /mcp disable then /mcp enable the server. Full flow, step-up detail, and caching behavior in REFERENCE.md → OAuth support.

Dynamic Tool Discovery (list_changed)

Servers declaring {"tools": {"listChanged": true}} push notifications/tools/list_changed when their tool set changes, and Claude Code refreshes that server's tools without a session restart — useful for servers exposing project-context-specific tools. Same pattern for resources and prompts. Subscription is automatic; no client config needed. See REFERENCE.md → Dynamic tool discovery.

Troubleshooting

Common failure modes and the diagnostic scripts for each (server won't connect, missing env vars, OAuth issues, the SDK MCP race condition) are in REFERENCE.md → Troubleshooting scripts. Quick OAuth triage:

SymptomLikely CauseAction
Authorization prompt repeatsToken not persistedCheck token storage permissions
Step-up auth loopScope mismatchRevoke and re-authorize
Discovery failsServer down or URL wrongVerify server URL and connectivity
Cache staleServer changed OAuth configDisable/enable server to refresh

Configuration Patterns

Three scopes, each with a worked .mcp.json / settings.json / plugin.json example in REFERENCE.md → Configuration patterns:

  • Project-scoped (recommended) — .mcp.json at project root; .gitignore it for personal configs or track for team configs.
  • User-scoped (personal) — ~/.claude/settings.json for servers available everywhere.
  • Plugin-scoped — declared in plugin.json (or referenced via "mcpServers": "./.mcp.json").
Post-add approval gate (project-scoped)

A newly-added project .mcp.json server requires one-time user approval before its tools are callable in the current session — this is expected, not an error. Immediately after writing the config, claude mcp list shows the server as ⏸ Pending approval (run 'claude' to approve) and it stays uncallable until the user approves it via the /mcp command or restarts the CLI session — both user-only actions the agent cannot perform for them. So after writing a project .mcp.json entry, tell the user proactively that a one-time approval (/mcp or a session restart) is needed for the new server's tools to become available, rather than discovering the gate via a status check and asking mid-flow.

Agentic Optimizations

ContextCommand
Quick status checkjq -c '.mcpServers | keys' .mcp.json 2>/dev/null
Validate JSONjq empty .mcp.json 2>&1
List env vars neededjq -r '.mcpServers[] | .env // {} | keys[]' .mcp.json 2>/dev/null | sort -u
Check specific serverjq -e '.mcpServers.context7' .mcp.json >/dev/null 2>&1 && echo "installed"
Find servers in pluginfind . -name '.mcp.json' -maxdepth 2

Quick Reference

Server Types by Transport
TypeWhen to UseExample
command (stdio)Local tools, no auth neededbunx, npx, uvx, go run
url (HTTP+SSE)Remote hosted servers, OAuth neededhttps://...
Key Files
FilePurpose
.mcp.jsonProject-level MCP server config (team-shareable)
~/.claude/settings.jsonUser-level MCP server config (personal)
plugin.jsonPlugin-level MCP server declarations

Comments

Markdown supported