MCPs
Claude
Intermediate
Configure MCP in Claude Code
Add MCP servers to Claude Code for browser testing, docs lookup, and more
33 of 66
MCP in Claude Code
Claude Code connects to MCP servers through its settings file, giving the agent access to external tools.
Configuration
Add servers to .claude/settings.json in your project:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"]
},
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp@latest"]
}
}
}
Or add globally to ~/.claude/settings.json for all projects.
Using MCP tools in a session
Once configured, Claude Code discovers the tools automatically. Ask naturally:
"Navigate to localhost:3000 and take a screenshot" "Look up the latest Tailwind CSS docs for grid layout"
Useful servers
| Server | Package | Purpose |
|---|---|---|
| Playwright | @playwright/mcp@latest | Browser automation |
| Context7 | @upstash/context7-mcp@latest | Library docs lookup |
| Filesystem | @anthropic/mcp-server-filesystem | Enhanced file ops |
Permissions
Some MCP servers need network access. Claude Code may prompt you to allow it. Pre-approve with:
{
"permissions": {
"allow": ["mcp__playwright__browser_navigate"]
}
}