claude-code-mcp-setup
Skill81 starsChanged 42 days agoMITView on GitHub
Add and configure MCP (Model Context Protocol) servers in Claude Code. Use when adding new MCP servers, configuring remote MCP, setting up OAuth MCP servers, troubleshooting MCP connections, or running /mcp diagnostics. Covers stdio, HTTP, and SSE transport types.
- Reads credentials
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- acquia-sourceSkill
- canvas-contributionSkill
- design-reviewSkill
- drupal-api-endpointsSkill
- drupal-at-your-fingertipsSkill
- drupal-canvas-sdcSkill
- drupal-canvasSkill
- drupal-config-mgmtSkill
- drupal-config-reconcileSkill
- drupal-contrib-mgmtSkill
- drupal-ddevSkill
- drupal-deploy-safetySkill
- drupal-mailSkill
- drupal-performanceSkill
- drupal-search-apiSkill
- drupal-simple-oauthSkill
- drupal-testingSkill
- drupal-views-patternsSkill
- drupal-vite-themeSkill
- ivangrynenko-cursorrules-drupalSkill
- mockup-paritySkill
- sentry-integrationSkill
- skill-developerSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 63
After adding, restart Claude Code and run /mcp.
- Very specific: line 134
Use claude mcp add CLI command instead of manual JSON editing
- Distinctive: line 135
Ensure correct transport type for remote servers
- Distinctive: line 139
Verify OAuth authorization completed
- Very specific: line 144
Run /mcp to trigger connection
- Distinctive: line 145
Check browser for blocked popups
- Very specific: line 148
Use -e VAR=value flag when adding
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Claude Code MCP Setup
Purpose
Guide for adding and configuring MCP (Model Context Protocol) servers in Claude Code CLI.
When to Use
- Adding a new MCP server to Claude Code
- Configuring remote MCP servers (HTTP/SSE)
- Troubleshooting MCP connection failures
- Understanding MCP transport types
- Setting up OAuth-authenticated MCP servers
Quick Reference
CLI Commands
# Add local stdio MCP server
claude mcp add <name> <command> [args...]
# Add remote HTTP MCP server (supports OAuth)
claude mcp add --transport http <name> <url>
# Add remote SSE MCP server
claude mcp add --transport sse <name> <url>
# Add with environment variables
claude mcp add <name> -e API_KEY=xxx -- <command> [args...]
# Add with custom headers
claude mcp add --transport http <name> <url> --header "Authorization: Bearer xxx"
# List configured servers
claude mcp list
# Remove a server
claude mcp remove <name>Transport Types
| Type | Use Case | Example |
stdio | Local NPM packages, scripts | claude mcp add my-server npx @org/mcp-server |
http | Remote servers with OAuth | claude mcp add --transport http monday https://mcp.monday.com/mcp |
sse | Server-Sent Events servers | claude mcp add --transport sse name https://example.com/sse |
Common MCP Server Examples
monday.com (Remote HTTP with OAuth)
claude mcp add --transport http monday https://mcp.monday.com/mcpAfter adding, restart Claude Code and run /mcp. First connection will prompt OAuth authorization in browser.
GitHub (Local with Token)
claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx -- npx @modelcontextprotocol/server-githubFilesystem (Local)
claude mcp add filesystem npx @modelcontextprotocol/server-filesystem /path/to/directoryCustom Local Server
claude mcp add my-server node /path/to/server.jsConfiguration Files
MCP servers are stored in:
- User config:
~/.claude.json(global) - Project config:
.mcp.json(per-project, legacy)
Manual Configuration (if needed)
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["@org/mcp-package"],
"env": {
"API_KEY": "your-key"
}
}
}
}For remote servers:
{
"mcpServers": {
"remote-server": {
"type": "url",
"url": "https://example.com/mcp"
}
}
}Troubleshooting
Check MCP Status
# Inside Claude Code
/mcp
# Detailed diagnostics
/doctorCommon Issues
"Does not adhere to MCP server configuration schema"
- Use
claude mcp addCLI command instead of manual JSON editing - Ensure correct transport type for remote servers
"Failed to reconnect"
- Check network connectivity
- Verify OAuth authorization completed
- Try removing and re-adding:
claude mcp remove <name> && claude mcp add ...
OAuth not prompting
- Restart Claude Code after adding server
- Run
/mcpto trigger connection - Check browser for blocked popups
Environment variable errors
- Use
-e VAR=valueflag when adding - Or set in shell before running Claude Code
Verify Configuration
# Check what was added
cat ~/.claude.json | jq '.mcpServers'
# Validate JSON syntax
jq . ~/.claude.jsonResources
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

