configure-mcp
Check and configure MCP servers for project integration. Use when setting up MCP servers, checking MCP status, or adding new servers to a project.
What this skill does
# /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](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: !`grep '.mcp.json' .gitignore`
- 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`
- Dotfiles registry: !`find . -maxdepth 1 -name \'~/.local/share/chezmoi/.chezmoidata.toml\'`
## Parameters
Parse these from `$ARGUMENTS`:
- `--check-only`: Report current status, do not offer installation
- `--fix`: Install servers without prompting for confirmation
- `--core`: Install all core servers (`context7`, `sequential-thinking`)
- `--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**:
| Server | Purpose | Env Vars |
|--------|---------|----------|
| `context7` | Documentation context from Upstash | None |
| `sequential-thinking` | Enhanced reasoning and planning | None |
## Execution
Execute this MCP configuration workflow:
### Step 1: Detect current state
First, test whether `.mcp.json` exists in the current working directory:
- **If `.mcp.json` is absent** (the `Config exists` context line is empty, or `test -f .mcp.json` would fail): print "No `.mcp.json` found — starting fresh." and treat `mcpServers` as `{}` 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.json` exists**: use the `Read` tool to load `.mcp.json` and parse the `mcpServers` object. 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.
If `--check-only`, skip to Step 4 (report only).
### Step 2: Identify servers to install
Based on the flags:
- **`--core`**: Select `context7` and `sequential-thinking`.
- **`--server <name>`**: Select the named server(s). Validate against the available servers in [REFERENCE.md](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 `playwright` if `playwright.config.*` exists, suggest `cclsp` if large TS/Python/Rust codebase).
If all requested servers are already installed, report "All servers already configured" and stop.
### Step 3: Install selected servers
For each selected server:
1. Get the server configuration from [REFERENCE.md](REFERENCE.md).
2. If `.mcp.json` doesn't exist, create it with `{"mcpServers": {}}`.
3. Merge the server config into the existing `mcpServers` object. Preserve existing servers.
4. Write the updated `.mcp.json` with proper JSON formatting.
If `cclsp` is selected, also set up `cclsp.json` (see [REFERENCE.md](REFERENCE.md) for language detection and setup details).
Handle git tracking:
- Check if `.mcp.json` is in `.gitignore`.
- If not tracked and not ignored, recommend adding to `.gitignore` for personal projects or tracking for team projects.
### Step 4: Report results
Print a summary using the report format from [REFERENCE.md](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`.
## 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 all core servers (context7, sequential-thinking) |
| `--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
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.