/configure:mcp
Check and configure Model Context Protocol (MCP) servers for this project.
MCP Philosophy: Servers are managed project-by-project (in .mcp.json), not user-scoped (in ~/.claude/settings.json), to keep context clean and dependencies explicit.
For server configurations, environment variable reference, and report templates, see REFERENCE.md.
When to Use This Skill
| Use this skill when... | Use another approach when... |
|------------------------|------------------------------|
| Setting up MCP servers for a project | Configuring user-level settings (edit ~/.claude/settings.json directly) |
| Checking MCP server status and validating configuration | Just viewing .mcp.json contents (use Read tool) |
| Adding specific servers (context7, playwright, sequential-thinking, etc.) | Installing npm/bun packages for non-MCP purposes (use package manager) |
| Ensuring team-shareable MCP setups | Personal-only MCP configuration (use ~/.claude/settings.json) |
| Installing core productivity servers | Debugging specific server runtime issues (check server logs, restart Claude Code) |
Context
- Config exists: !
find . -maxdepth 1 -name '.mcp.json' - Git tracking: !
find . -maxdepth 1 -name '.gitignore' -exec grep '.mcp.json' {} + - Standards file: !
find . -maxdepth 1 -name '.project-standards.yaml' - Has playwright config: !
find . -maxdepth 1 -name 'playwright.config.*' -print -quit - Has TS/JS files: !
find . -maxdepth 2 \( -name '*.ts' -o -name '*.py' -o -name '*.go' -o -name '*.rs' \) -print -quit
Parameters
Parse these from $ARGUMENTS:
--check-only: Report current status, do not offer installation--fix: Install servers without prompting for confirmation--core: Install every core server (see Core Servers)--server <name>: Install specific server by name (repeatable)
If no flags provided, run interactive mode (detect → report → offer to install).
Core Servers
These servers should be installed in all projects. The core set is the mcpServers object of the repo baseline policy — pal (multi-model gateway), context7 (library docs) and sequential-thinking (reasoning) — and its settings.floor.enabledMcpjsonServers approves the same set in .claude/settings.json (merged by /configure:claude-plugins). Take each entry's config from the policy, not from memory.
Execution
Execute this MCP configuration workflow:
Step 1: Detect current state
First, test whether .mcp.json exists in the current working directory:
- If
.mcp.jsonis absent (theConfig existscontext line is empty, ortest -f .mcp.jsonwould fail): print "No.mcp.jsonfound — starting fresh." and treatmcpServersas{}for the remainder of the workflow. Do not abort. Proceed to Step 2 so the user can still install core servers or specific servers via flags / interactive mode; Step 3 will create the file from scratch. - If
.mcp.jsonexists: use theReadtool to load.mcp.jsonand parse themcpServersobject. List all configured servers and surface the result to subsequent steps. For each server, check its command type (npx,bunx,uvx,go run) and required env vars. Flag any servers with missing required environment variables. - Check
palagainst the policy form. Apalentry is in policy form when itscommandandargsequal the policy'smcpServers.paland everyenvkey the policy names carries the policy's value. Anything else is legacy and needs normalization: a barepal-mcp-servercommand, auvx --from git+…source, the pre-rename packagepal-mcp-server(with or without@latest),palaver-mcp-serverwithout@latest, or anenvvalue written as$VARinstead of${VAR}. Report it asNOT POLICY FORM.
If --check-only, skip to Step 4 (report only).
Step 2: Identify servers to install
Based on the flags:
--core: Select every server in the policy'smcpServers.--server <name>: Select the named server(s). Validate against the available servers in REFERENCE.md.- No flags (interactive): Show the user what's installed vs available. Use AskUserQuestion to ask which servers to add. Suggest servers based on project context (e.g., suggest
playwrightifplaywright.config.*exists).
A pal entry that is present but not in policy form (Step 1) is selected for normalization in every mode except --check-only, whether or not it was requested; in interactive mode, include it in the AskUserQuestion confirmation. If every requested server is present and none needs normalization, report "All servers already configured" and stop.
Step 3: Install selected servers
For each selected server:
- Get the server configuration: core servers from the policy's
mcpServers, every other server from REFERENCE.md. - If
.mcp.jsondoesn't exist, create it with{"mcpServers": {}}. - Merge the server config into the existing
mcpServersobject. Preserve every other server untouched. To normalize a legacypalentry, set itscommandandargsto the policy's and set eachenvkey the policy names to the policy's value; keep any extraenvkeys the existing entry carries. - Write the updated
.mcp.jsonwith proper JSON formatting.
Handle git tracking:
- Check if
.mcp.jsonis in.gitignore. - If not tracked and not ignored, recommend adding to
.gitignorefor personal projects or tracking for team projects.
Step 4: Report results
Print a summary using the report format from REFERENCE.md:
- List all configured servers with their status
- Flag missing environment variables with where to set them
- Show git tracking status
- If servers were added, show next steps (restart Claude Code, set env vars)
Step 5: Update standards tracking
If .project-standards.yaml exists, update the MCP section with current server list and timestamp.
Runtime Server Management
After configuring .mcp.json, use these /mcp commands in Claude Code to manage servers without editing files:
| Command | Description |
|---------|-------------|
| /mcp | List all configured servers and connection status |
| /mcp enable <server> | Enable a server for the current session |
| /mcp disable <server> | Disable a server for the current session (session-scoped) |
Note: Enable/disable are session-scoped only. Permanent changes require editing .mcp.json.
Under pi: the .mcp.json this skill writes works unchanged once pi-mcp-adapter is installed (pi install npm:pi-mcp-adapter; pi has no MCP client of its own). Its /mcp enable|disable persist in .pi/mcp.json rather than lasting one session. See docs/pi-export.md § MCP servers.
Agentic Optimizations
| Context | Command |
|---------|---------|
| Quick status check | jq -c '.mcpServers \| keys' .mcp.json 2>/dev/null |
| Validate JSON syntax | jq empty .mcp.json 2>&1 |
| List environment variables needed | jq -r '.mcpServers[] \| .env // {} \| keys[]' .mcp.json 2>/dev/null \| sort -u |
| Check if server installed | jq -e '.mcpServers.context7' .mcp.json >/dev/null 2>&1 && echo "installed" \|\| echo "missing" |
| Core servers install (automated) | /configure:mcp --core --fix |
| Specific server install (automated) | /configure:mcp --server context7 --fix |
| Check-only mode (CI/reporting) | /configure:mcp --check-only |
Flags
| Flag | Description |
|------|-------------|
| --check-only | Report status without offering to install servers |
| --fix | Install specified or suggested servers without prompting |
| --core | Install every core server in the policy's mcpServers |
| --server <name> | Install specific server (can be repeated) |
Error Handling
- Invalid
.mcp.json: Offer to backup and replace with valid template - Server already installed: Skip with informational message
- Missing env var: Warn but continue (server may work with defaults)
- Unknown server: Report error with available server names
- Managed settings restrict MCP servers to plugins:
claude mcp addrefuses and says what to do (2.1.284); before that it reported success and saved a server that never loaded. Report the restriction instead of adding the server another way - Settings-file approval lists: write
enabledMcpjsonServers/disabledMcpjsonServersas arrays; a string value voided the whole settings file before 2.1.299. Client behaviors behind other MCP symptoms (redirects, protocol negotiation, schema rejection):agent-patterns-plugin:mcp-management(see its REFERENCE.md)