mcp-setup
Set up and configure MCP (Model Context Protocol) servers with Claude Code. Use when the user wants to connect Claude Code to external tools, databases, APIs, or services via MCP. Handles HTTP, SSE, and stdio server configurations with proper authentication.
What this skill does
# MCP Setup Skill
This skill helps configure Model Context Protocol (MCP) servers to connect Claude Code to external tools, databases, and APIs.
## What is MCP?
MCP (Model Context Protocol) is an open-source standard for AI-tool integrations. MCP servers give Claude Code access to:
- Issue trackers (Jira, GitHub Issues)
- Monitoring tools (Sentry, Statsig)
- Databases (PostgreSQL, MySQL)
- Design tools (Figma)
- Communication (Slack, Gmail)
- And hundreds more
## Server Types
### 1. HTTP Servers (Recommended for remote)
Cloud-based services, most widely supported.
```bash
claude mcp add --transport http <name> <url>
# Example: Connect to Notion
claude mcp add --transport http notion https://mcp.notion.com/mcp
# With Bearer token authentication
claude mcp add --transport http secure-api https://api.example.com/mcp \
--header "Authorization: Bearer your-token"
```
### 2. SSE Servers (Deprecated)
Use HTTP instead where available.
```bash
claude mcp add --transport sse <name> <url>
# Example: Connect to Asana
claude mcp add --transport sse asana https://mcp.asana.com/sse
```
### 3. Stdio Servers (Local processes)
Run as local processes on your machine.
```bash
claude mcp add --transport stdio <name> <command> [args...]
# Example: Airtable server
claude mcp add --transport stdio airtable --env AIRTABLE_API_KEY=YOUR_KEY \
-- npx -y airtable-mcp-server
# Example: PostgreSQL database
claude mcp add --transport stdio db -- npx -y @bytebase/dbhub \
--dsn "postgresql://user:pass@localhost:5432/mydb"
```
**Note**: The `--` separates Claude's flags from the server command.
## Configuration Scopes
| Scope | Storage | Use Case |
|-------|---------|----------|
| `local` | `~/.claude.json` (project path) | Personal, project-specific |
| `project` | `.mcp.json` in project root | Team-shared via git |
| `user` | `~/.claude.json` (global) | Personal across all projects |
```bash
# Add to specific scope
claude mcp add --transport http api --scope project https://api.example.com
```
## Management Commands
```bash
# List all configured servers
claude mcp list
# Get details for a specific server
claude mcp get <name>
# Remove a server
claude mcp remove <name>
# Check server status (in Claude Code)
/mcp
```
## Authentication
For OAuth 2.0 authentication:
1. Add the server: `claude mcp add --transport http sentry https://mcp.sentry.dev/mcp`
2. In Claude Code, run: `/mcp`
3. Select "Authenticate" and follow browser prompts
## Plugin MCP Servers
Plugins can bundle MCP servers. Create `.mcp.json` at plugin root:
```json
{
"mcpServers": {
"plugin-server": {
"command": "${CLAUDE_PLUGIN_ROOT}/servers/my-server",
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"],
"env": {
"API_KEY": "${API_KEY}"
}
}
}
}
```
Or inline in `plugin.json`:
```json
{
"name": "my-plugin",
"mcpServers": {
"plugin-api": {
"type": "http",
"url": "https://api.example.com/mcp"
}
}
}
```
## Project Shared Configuration
For team-shared servers, create `.mcp.json` in project root:
```json
{
"mcpServers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/"
},
"database": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@bytebase/dbhub", "--dsn", "${DATABASE_URL}"]
}
}
}
```
### Environment Variable Expansion
Supported in `.mcp.json`:
- `${VAR}` - Value of environment variable
- `${VAR:-default}` - Value or default if not set
Works in: `command`, `args`, `env`, `url`, `headers`
## Popular MCP Servers
| Server | Type | Install Command |
|--------|------|-----------------|
| GitHub | HTTP | `claude mcp add --transport http github https://api.githubcopilot.com/mcp/` |
| Sentry | HTTP | `claude mcp add --transport http sentry https://mcp.sentry.dev/mcp` |
| Notion | HTTP | `claude mcp add --transport http notion https://mcp.notion.com/mcp` |
| Postgres | stdio | `claude mcp add --transport stdio db -- npx -y @bytebase/dbhub --dsn "..."` |
| Filesystem | stdio | `claude mcp add --transport stdio fs -- npx -y @modelcontextprotocol/server-filesystem /path` |
## Using MCP in Claude Code
### Reference Resources
Type `@` to see available resources from MCP servers:
```
> Analyze @github:issue://123
```
### Execute Prompts
MCP prompts become slash commands:
```
> /mcp__github__list_prs
> /mcp__jira__create_issue "Bug title" high
```
## Troubleshooting
### Windows Users
Use `cmd /c` wrapper for npx:
```bash
claude mcp add --transport stdio my-server -- cmd /c npx -y @some/package
```
### Output Limits
Set `MAX_MCP_OUTPUT_TOKENS` for large outputs:
```bash
export MAX_MCP_OUTPUT_TOKENS=50000
claude
```
### Timeout Issues
Increase startup timeout:
```bash
MCP_TIMEOUT=10000 claude
```
## Setup Checklist
When setting up a new MCP server:
- [ ] Choose appropriate transport (HTTP for remote, stdio for local)
- [ ] Select correct scope (local/project/user)
- [ ] Configure authentication if required
- [ ] Set necessary environment variables
- [ ] Test with `/mcp` command
- [ ] Verify tools are available
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.