Guidance for configuring MCP servers in Claude Code projects. Covers transport selection, scopes, authentication, and security patterns. Use whenever adding MCP servers - projects, plugins, or any context.
Provides guidance for configuring MCP servers in Claude Code, covering transport selection, scopes, authentication, and security. Use when adding MCP servers to projects or user configurations to extend Claude's capabilities with external tools and APIs.
/plugin marketplace add racurry/neat-little-package/plugin install box-factory@neat-little-packageThis skill inherits all available tools. When active, it can use any tool Claude has access to.
plugin-mcp.mdsecurity-auth.mdThis skill provides guidance for configuring MCP (Model Context Protocol) servers for Claude Code. For bundling MCP servers in plugins, see the plugin-design skill instead.
Claude Code MCP configuration is post-training knowledge. Fetch current docs:
Use this table to navigate to relevant sections:
| Task | Section |
|---|---|
| Decide if MCP is the right tool | Tool Selection Philosophy |
| Understand plugin MCP gotchas | plugin-mcp.md (subpage) |
| Decide HTTP vs stdio transport | Transport Selection |
| Choose project vs user vs local scope | Configuration Scopes |
| Structure secrets safely | security-auth.md (subpage) |
| Validate before committing | Quality Checklist |
Add HTTP server (remote/cloud):
claude mcp add --transport http notion https://mcp.notion.com/mcp
claude mcp add --transport http api https://api.example.com/mcp \
--header "Authorization: Bearer ${API_TOKEN}"
Add stdio server (local tool):
claude mcp add github -- npx -y @modelcontextprotocol/server-github
claude mcp add --env GITHUB_TOKEN=${GITHUB_TOKEN} github -- npx -y @modelcontextprotocol/server-github
Check status:
claude mcp list # CLI
/mcp # Inside Claude Code
MCP servers connect Claude Code to external tools, databases, and APIs. They're not plugins - they're tool providers that Claude can invoke.
Key insight: Claude Code supports HTTP transport natively. No proxy needed for remote servers (unlike Claude Desktop).
| Approach | Use Case | Location |
|---|---|---|
| Project MCP config | Team shares MCP servers | .mcp.json at project root |
| User MCP config | Personal MCP servers | ~/.claude.json |
| Plugin bundling | Distribute with plugin | Plugin's .mcp.json |
This skill covers project and user configuration. For plugin bundling, load plugin-design skill.
Before adding any MCP server, apply this hierarchy:
If a dedicated CLI tool exists, use it instead of MCP:
| Service | Prefer | Over |
|---|---|---|
| GitHub | gh CLI | GitHub MCP server |
| Linear | linear CLI | Linear MCP server |
| AWS | aws CLI | AWS MCP server |
Why: CLI tools are battle-tested, have better error messages, don't consume context window, and Claude already knows how to use them.
When MCP is appropriate, prefer in this order:
https://mcp.notion.com/mcp)@modelcontextprotocol/server-*)Why: Official servers have better maintenance, security updates, and API compatibility.
.mcp.json Over settings.jsonStore MCP configuration in .mcp.json files, not IDE settings.json:
| Approach | Use |
|---|---|
.mcp.json | ✅ Portable, version-controlled, IDE-agnostic |
settings.json | ❌ IDE-specific, mixes concerns |
Why: .mcp.json is the Claude Code standard, works across editors, and keeps MCP config separate from IDE settings.
Local (project-specific in ~/.claude.json, highest precedence)
↓
Project (.mcp.json in repo)
↓
User (~/.claude.json, cross-project)
↓
Managed (enterprise, lowest)
Key insight: "Local" scope means project-specific but still stored in ~/.claude.json under the project path, not in the project directory itself. This keeps credentials out of your repo while allowing per-project overrides.
Local overrides Project overrides User overrides Managed.
| Scope | Flag | Use Case |
|---|---|---|
| Local | --scope local (default) | Personal dev servers, sensitive credentials |
| Project | --scope project | Team-shared servers, committed to git |
| User | --scope user | Cross-project personal utilities |
Project scope creates/updates .mcp.json at project root - check this into version control for team sharing.
Security note: Project-scoped MCP servers require user approval before first use (prevents malicious repo configs from auto-running). Reset approvals with: claude mcp reset-project-choices
| Server Type | Transport | Example |
|---|---|---|
| Cloud/SaaS service | --transport http | Notion, Linear, cloud APIs |
| Local tool/binary | Stdio (default) | npx servers, custom scripts |
| Legacy remote | --transport sse | Only if HTTP unavailable |
Default to HTTP for remote servers - it's the modern approach and Claude Code handles it natively.
Add MCP server when:
Don't add MCP when:
Use project scope when:
Use user scope when:
Before committing .mcp.json:
${ENV_VAR} referencesRead when:
plugin-design skill/mcp command in Claude Code@modelcontextprotocol/server-* packages