ucsandman/claude-code-capability-primer/claude-code-mcp
Claude Code and agent skill by ucsandman/claude-code-capability-primer
- community
Checking that the SKILL.md file is still in the repository.
Use when configuring MCP servers in Claude Code — connecting external tools (GitHub, Stripe, Sentry, databases), choosing transports (HTTP, stdio, WebSocket), managing scopes, handling authentication, scaling with tool search, and decidi...
Install
npx vskill@latest install ucsandman/claude-code-capability-primer/claude-code-mcpSKILL.md
Claude Code MCP Servers
What is MCP?
Model Context Protocol (MCP) = external tools/data/resources exposed to Claude as callable tools. Live systems: issue trackers, databases, APIs, browsers, design tools. Not suitable for repo-local logic (use skills or scripts instead).
Tools are named mcp__<server-name>__<tool-name> in output. Example: mcp__github__list_issues.
Configuration
Three scopes, stored in two files:
| Scope | Stored in | Shared with team | Loaded in | |
|---|---|---|---|---|
| Local (default) | ~/.claude.json (project-specific path) | No | Current project only | |
| Project | .mcp.json (repo root) | Yes, via git | Current project only | |
| User | ~/.claude.json (top-level mcpServers key) | No | All your projects |
Add a server:
Verify:
Remove:
Edit `.mcp.json` directly:
Transports
HTTP (hosted, recommended for remote servers):
- Stateless, runs at a URL.
claude mcp add --transport http <name> <url>- Also called
streamable-httpin JSON (MCP spec naming).
Stdio (local, for filesystem/browser/db access):
- Command runs on your machine, talks via stdin/stdout.
claude mcp add <name> -- <command> [args...]- Critical: Separate options from server command with
--. Everything after--goes untouched to the server. - Pass env vars via
--env KEY=valueorenvin config. - Startup timeout: 30s default; set
MCP_TIMEOUT=60000(ms) if slow.
SSE (hosted, DEPRECATED — use HTTP instead):
- Server-Sent Events; older streaming transport.
"type": "sse"in.mcp.json.
WebSocket (hosted, for persistent bidirectional connections):
- Configure in
.mcp.jsonorclaude mcp add-json. "type": "ws"withurl,headers,timeout,alwaysLoad.- Use HTTP instead when server only responds to requests (HTTP has OAuth support, WebSocket does not).
Authentication
Environment variables (stdio servers):
${} syntax (or ${VAR:-default} for defaults) expands from shell env at runtime.
HTTP headers (hosted servers):
OAuth (interactive browser sign-in):
claude mcp add --transport http <name> <url>- Server shows
! Needs authenticationin/mcp - Inside
claudesession:/mcp→ select server →Authenticate→ sign in → auto-connected
Static token (at add time):
Tool Search (Deferred Loading)
What it does: Instead of loading all tool definitions upfront (bloats context for 50+ tools), Claude searches on demand and loads only what it needs (3–5 tools per search). Saves ~85% context overhead.
Who supports it: Requires Sonnet 4.5+ or Opus 4.5+. Haiku does not support tool search (on Claude Code or API).
Enabled by default: Yes. Falls back to upfront loading on Vertex AI or custom ANTHROPIC_BASE_URL.
Configure via `ENABLE_TOOL_SEARCH` env var:
| Value | Behavior | |
|---|---|---|
| (unset) | Deferred on demand (default). Falls back to upfront on Vertex AI / proxy. | |
true | Force deferred (fails on older models or proxies without tool_reference support). | |
false | Force upfront; load all tool defs at startup. | |
auto | Threshold: upfront if <10% of context, deferred otherwise. | |
auto:N | Threshold: upfront if <N% of context. Example: auto:5 for 5%. |
Set in settings.json:
Override per query (Agent SDK only):
Always load one server upfront (skip search):
Permissions
Tools from MCP require explicit allow-list.
CLI (first time):
- Claude asks: "Allow use of
mcp__<server>__<tool>?" - Approve in session.
Pre-approve via settings.json:
Use wildcards to avoid per-tool approval.
Scope Precedence
When the same server is defined in multiple scopes:
- Local
- Project
- User
- Plugin-provided
- Claude.ai connectors
The entry from the highest-precedence source is used entirely (fields not merged).
Connection Status
Run /mcp in session or claude mcp list from shell:
| Status | Meaning | Fix | |
|---|---|---|---|
| ✓ Connected | Ready. | Use it. | |
| ! Needs authentication | OAuth/token required. | /mcp → select → Authenticate or --header on add. | |
| ✗ Failed to connect | Server down, unreachable, or bad config. | Check URL (HTTP), command (stdio), env vars, timeouts. | |
| ⏸ Pending approval | Project-scope server awaiting approval. | /mcp → approve, or add to permissions.allow. |
Debug stdio: Run the command directly to see errors:
Debug HTTP:
Startup timeout:
Resources and Prompts
Reference resources in prompts (like @file.md):
Execute MCP prompts as commands:
When to Use MCP vs Skills/Scripts
Use MCP when:
- Tool is external API/service/database with live state.
- Needs to read/act on remote system (GitHub, Stripe, Slack, browser).
- Shared across projects (user or project scope).
- Already exists and MCP-compatible.
Use skill/script when:
- Repo-local logic, refactoring, generation, testing.
- Parses your codebase and emits artifacts.
- Runs only in this project.
- Custom to your workflow.
Examples
Stdio server (local CLI, no auth):
Common servers people add: context7 (live library docs), github (GitHub API), stripe (Stripe API), plus filesystem, database, and browser/automation servers.
Check your actual servers: /mcp in session or claude mcp list from shell.
Troubleshooting Checklist
- Server not in `/mcp` list?
- Check scope:
claude mcp get <name>or grep~/.claude.jsonand.mcp.json. - Local servers tied to project root or exact directory. Re-add if different project.
- Status: "Failed to connect"?
- HTTP:
curl -I <url>to confirm reachable. - Stdio: run command directly to see error.
- Missing env var / token / startup timeout.
- Tools visible but Claude won't call?
- Missing
permissions.allowpre-approval./mcpto approve, or add to settings.
- No tools in `/mcp` tool list?
- Server started but no tools registered → likely missing API key / env var.
- Check server docs for required vars; pass via
--env KEY=valueorenvfield.
- Changes to `.mcp.json` don't apply?
- Restart session (Claude reads
.mcp.jsonat startup). - Check file syntax (valid JSON).
- Run
claude mcp reset-project-choicesif you rejected server earlier.
Key Settings You Control
Related
- MCP quickstart
- MCP full reference
- Managed MCP (team/enterprise control)
- MCP specification
- MCP server directory
- Build your own server
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/claude-code-mcp/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ucsandman/claude-code-capability-primer/claude-code-mcp)