agentleFS
CodeAlive-AICodeAlive-AI/ai-driven-development/skills/mcp-management/SKILL.md

mcp-management

Skill169 starsChanged 56 days agoMITView on GitHub

Search, install, configure, update, and remove MCP servers across coding agents (Claude Code, Cursor, VS Code, Claude Desktop, Gemini CLI, Codex, Goose, Zed, Devin CLI/Desktop, and more). Supports multi-agent installation via npx add-mcp, the official MCP registry, and direct config editing.

  • Reads credentials

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use Problem-Solving Techniques, mobile-development and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • truongtv22Skill

    Problem-Solving Techniques

    Apply systematic problem-solving techniques for complexity spirals (simplification cascades), innovation blocks (collision-zone thinking), recurring patterns (meta-pattern recognition), assumption constraints (inversion exercise), scale uncertainty (scale game), and dispatch when stuck. Techniques derived from Microsoft Amplifier project patterns adapted for immediate application.

    Also in 5 projects that use this

  • truongtv22Skill

    mobile-development

    Build modern mobile applications with React Native, Flutter, Swift/SwiftUI, and Kotlin/Jetpack Compose. Covers mobile-first design principles, performance optimization (battery, memory, network), offline-first architecture, platform-specific guidelines (iOS HIG, Material Design), testing strategies, security best practices, accessibility, app store deployment, and mobile development mindset. Use when building mobile apps, implementing mobile UX patterns, optimizing for mobile constraints, or making native vs cross-platform decisions.

    Also in 4 projects that use this

  • AWSSkill

    planning

    Discovers user intent and generates a structured, step-by-step plan for model customization workflows. This skill must always be activated alongside any other skill when the user's request relates to model customization — including fine-tuning, training, building, customizing, reviewing data, or getting advice on approach, regardless of domain. Do not skip this skill even if the immediate ask is narrow (e.g., reviewing data format or a single workflow step), because planning discovers the full scope of work needed. Also activate when the user wants to resume, continue, or modify an existing plan.

    Also in 5 projects that use this

  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 5 projects that use this

  • StrayDragonSkill

    ui-ux-pro-max

    UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 6 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    IMPORTANT: After adding, removing, or updating MCP servers, inform the user to restart the affected agent for changes to take effect.

    line 8
  2. Very specific:

    CRITICAL: Before removing any server, use AskUserQuestion to confirm with the user.

    line 10
  3. Distinctive:

    When configuring MCP for Codex App:

    line 92
  4. Very specific:

    Prefer project-level .codex/config.toml when the user explicitly asks for repo-level setup.

    line 94
  5. Very specific:

    If writing .codex/config.toml directly, this is the expected shape:

    line 107
  6. Distinctive:

    After adding, removing, editing, or logging in to a Codex App MCP server, tell the user to fully restart Codex App.

    line 116
  7. Very specific:

    If tool_search returns no tools while codex mcp list is correct, the issue is usually App/thread reload or the server being configured only …

    line 127
  8. Very specific:

    If project-level .codex/config.toml is not being picked up by Codex App, as a temporary diagnostic duplicate the server in user-level …

    line 129
  9. Distinctive:

    When users ask to find or install an MCP server, see references/search.md for:

    line 154
  10. Distinctive:

    Add server without env vars:

    line 168
  11. Very specific:

    Before installing, check if the server needs API keys or tokens.

    line 177
  12. Distinctive:

    No direct update command exists.

    line 181
  13. Very specific:

    Always confirm with user via AskUserQuestion before removing.

    line 191
  14. Very specific:

    Use opencode mcp auth <name> / opencode mcp logout <name> for OAuth servers (e.g., GitHub)

    line 206
  15. Very specific:

    Use cmd /c wrapper for npx:

    line 234

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MCP Server Management

IMPORTANT: After adding, removing, or updating MCP servers, inform the user to restart the affected agent for changes to take effect.

CRITICAL: Before removing any server, use AskUserQuestion to confirm with the user.

Quick Reference (Claude Code)

# Install
claude mcp add --transport http <name> <url>
claude mcp add --transport stdio <name> -- <command> [args...]
claude mcp add-json <name> '<json>'              # Full JSON config in one shot

# List/inspect
claude mcp list
claude mcp get <name>

# Remove (confirm with user first!)
claude mcp remove <name>

# OAuth login/logout (for OAuth-protected HTTP servers)
claude mcp login <name>
claude mcp logout <name>

Options must come BEFORE the server name. As of 2026-04, --transport http (Streamable HTTP) is recommended; sse is end-of-life.

Plugin MCP servers connect automatically at session start. Use /reload-plugins to re-init after enabling/disabling a plugin mid-session.

Multi-Agent Installation (npx add-mcp)

Install MCP servers to multiple coding agents at once using add-mcp:

# Remote server (HTTP)
npx add-mcp https://mcp.example.com/mcp

# npm package (stdio)
npx add-mcp @modelcontextprotocol/server-postgres

# Local command
npx add-mcp "npx -y @org/mcp-server --flag value"

# SSE transport
npx add-mcp https://mcp.example.com/sse --transport sse

Options

FlagDescription
-g, --globalInstall globally instead of project-level
-a, --agent <agent>Target specific agent(s), repeatable
-n, --name <name>Custom server name
-t, --transport <type>HTTP (default) or SSE
--header <header>Custom HTTP headers, repeatable
-y, --yesSkip confirmation prompts
--allInstall to all detected agents

Supported Agents

AgentCLI ArgumentSupports Project-Level
Claude Codeclaude-codeYes (.mcp.json)
Claude Desktopclaude-desktopNo (global only)
CursorcursorYes (.cursor/mcp.json)
VS CodevscodeYes (.vscode/mcp.json)
Gemini CLIgemini-cliYes (.gemini/settings.json)
CodexcodexYes (.codex/config.toml, trusted projects only)
GoosegooseNo (global only)
GitHub Copilot CLIgithub-copilot-cliYes (.vscode/mcp.json)
OpenCodeopencodeYes (opencode.json)
ZedzedYes (.zed/settings.json)

Codex App / Desktop caveats

Codex has two relevant surfaces:

  • Codex CLI (codex mcp list, codex mcp get, codex mcp login) can see and validate MCP configuration from the CLI process.
  • Codex App / Desktop threads receive MCP tools only when the app starts a thread with those servers loaded and authenticated. A server can appear in codex mcp list but still be absent from the current model turn's tool list if the thread was created before the server was added, authenticated, or reloaded.

When configuring MCP for Codex App:

  1. Prefer project-level .codex/config.toml when the user explicitly asks for repo-level setup. The project must be trusted in ~/.codex/config.toml under [projects."/absolute/path"] trust_level = "trusted".
  2. For HTTP servers that use OAuth, run:
    codex mcp login <server-name>
    Then verify codex mcp list shows Auth: OAuth.
  3. For HTTP servers that use bearer tokens, prefer Codex's native bearer-token env form over hardcoding a header:
    codex mcp add <name> --url https://example.com/mcp --bearer-token-env-var EXAMPLE_API_KEY
    If writing .codex/config.toml directly, this is the expected shape:
    [mcp_servers.example]
    type = "http"
    url = "https://example.com/mcp"
    bearer_token_env_var = "EXAMPLE_API_KEY"
    Some third-party installers write http_headers.Authorization = "Bearer ${EXAMPLE_API_KEY}"; Codex CLI may display this as a bearer-token server, but the native field is clearer.
  4. After adding, removing, editing, or logging in to a Codex App MCP server, tell the user to fully restart Codex App. Existing threads can receive newly available tools after the app restart; create a new thread only as a fallback if tool_search still cannot find the server tools in the existing thread.
  5. Verification has two levels:
    codex mcp list
    codex mcp get <server-name>
    confirms Codex CLI/config/auth. Inside a Codex App thread, also use tool_search for a server-specific tool name (for example supabase execute_sql or render list_services). If tool_search returns no tools while codex mcp list is correct, the issue is usually App/thread reload or the server being configured only in a scope the App did not load.
  6. If project-level .codex/config.toml is not being picked up by Codex App, as a temporary diagnostic duplicate the server in user-level ~/.codex/config.toml, restart the App, and confirm tools appear. Remove the user-level duplicate afterward if the user wanted repo-only setup.

Examples

# Install to Claude Code and Cursor only
npx add-mcp -a claude-code -a cursor https://mcp.stripe.com

# Install npm package to all agents, globally
npx add-mcp -g --all @modelcontextprotocol/server-postgres

# Install with custom name and headers
npx add-mcp -n my-api --header "Authorization: Bearer TOKEN" https://api.example.com/mcp

# List available agents
npx add-mcp list-agents

See references/multi-agent.md for agent-specific config paths, formats, and transformations.

Searching for MCP Servers

When users ask to find or install an MCP server, see references/search.md for:

  • Official vendor server lookup (always try first)
  • MCP Registry API queries (fallback)
  • Known official servers table
  • User choice template format

Trust hierarchy: Official vendor > MCP reference servers > Verified partners > Community

Adding Servers (Claude Code)

With Environment Variables

The --env CLI flag is unreliable with special characters. Instead:

  1. Add server without env vars:
    claude mcp add --transport stdio <name> -- npx -y @package/mcp-server
  2. Edit config file to add env vars. See references/scopes.md for file locations.

Collect Configuration First

Before installing, check if the server needs API keys or tokens. Use AskUserQuestion to collect required values before running install commands.

Updating Servers

No direct update command exists. Options:

  1. Edit config directly (preferred for credential changes)
  2. Remove and re-add (confirm removal with user first)
  3. Use environment variables for credentials that change often

For OAuth servers (GitHub, Sentry): Run /mcp in Claude Code to re-authenticate.

Removing Servers

Always confirm with user via AskUserQuestion before removing.

claude mcp remove <server-name>

For project-scoped servers in .mcp.json, delete the entry from the file after user confirmation.

OpenCode-specific notes

For OpenCode (anomalyco/opencode v1.14.x):

  • Top-level key is mcp (not mcpServers); each server must declare type: "local" or type: "remote"
  • For local servers, command is a single array ["bin", "arg1", "arg2"] — there's no separate args field
  • Env vars go under environment (not env)
  • Per-server enabled: false disables without removing
  • Use opencode mcp auth <name> / opencode mcp logout <name> for OAuth servers (e.g., GitHub)
  • Plugin tool.execute.* hooks do not fire for MCP tool calls in v1.14.x — use permission rules instead

See references/opencode-mcp.md for the full OpenCode MCP reference.

Reference

  • Search and known servers: references/search.md
  • Multi-agent installation: references/multi-agent.md
  • OpenCode MCP: references/opencode-mcp.md
  • Transport types: references/transports.md
  • Scopes and config files: references/scopes.md
  • Troubleshooting: references/troubleshooting.md

Scopes Summary (Claude Code)

ScopeFlagConfig LocationUse Case
Local--scope local (default)~/.claude.jsonPersonal dev servers
Project--scope project.mcp.jsonTeam-shared servers
User--scope user~/.claude.jsonCross-project tools

Environment Variable Syntax

In config files: ${VAR} or ${VAR:-default}

Windows Note

Use cmd /c wrapper for npx:

claude mcp add --transport stdio my-server -- cmd /c npx -y @some/package

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.