Supercharge Claude Code by connecting it to external tools and services through the Model Context Protocol (MCP). This guide covers setting up essential MCP servers that transform Claude from a code generator into a comprehensive development platform.
Model Context Protocol Explained
MCP is an open standard that enables AI assistants to interact with external tools and data sources. Think of MCP servers as specialized APIs that give Claude new capabilities:
Direct tool access : Control Git, run Playwright tests, query databases
Real-time data : Fetch documentation, GitHub issues, Figma designs
Service integration : Connect to Slack, Jira, monitoring systems
File operations : Enhanced filesystem access with safety controls
MCP servers can be configured at three levels, each with specific use cases:
Scope Hierarchy
Scope Storage Location Use Case Command Flag Local Project-specific user settings Personal dev servers -s local
(default)Project .mcp.json
in project rootTeam-shared tools -s project
User Global user config Personal utilities -s user
Precedence : Local → Project → User (when servers have the same name)
The most fundamental MCP server for any developer:
# Install globally for all projects
claude mcp add git -s user -- npx -y @modelcontextprotocol/git@latest
Read repository history and diffs
Create commits with meaningful messages
Manage branches and merges
Analyze code changes
Handle merge conflicts
> What changes have been made to the authentication system recently ?
> Create a commit for the login feature I just implemented
> Show me the diff between main and feature/oauth
Connect to GitHub’s API for comprehensive repository control:
# Remote OAuth connection (recommended)
claude mcp add --transport sse github https://api.githubcopilot.com/mcp/
# Or with personal access token
claude mcp add github -e GITHUB_TOKEN=ghp_yourtoken -- npx -y @modelcontextprotocol/server-github
Create and manage pull requests
Work with issues and projects
Trigger GitHub Actions
Review code and comments
Access repository metadata
> Create a PR for the current branch with a summary of changes
> Find all open issues related to authentication
> Review PR #123 and suggest improvements
Safer file system access with configurable boundaries:
# Add with specific root directory
claude mcp add fs -- npx -y @modelcontextprotocol/server-filesystem /path/to/project
Read/write files with safety controls
Navigate directory structures
Bulk file operations
Search file contents
Respect .gitignore patterns
Always specify a root directory to prevent access to sensitive system files. The filesystem MCP server restricts operations to the specified path.
Direct database access for development and debugging:
# Add with connection string
claude mcp add postgres -e DATABASE_URL= " postgresql://user:pass@localhost:5432/mydb " \
-- npx -y @modelcontextprotocol/server-postgres
Schema exploration and documentation
Read-only queries by default
Data analysis and reporting
Migration planning
Performance optimization suggestions
> Describe the users table schema
> Find all orders placed in the last 30 days
> Suggest indexes to improve query performance
Enable browser testing and web scraping:
claude mcp add playwright -- npx -y @playwright/mcp@latest
Generate E2E tests from descriptions
Debug failing tests
Scrape web data
Automate browser workflows
Visual regression testing
> Write a test that verifies the login flow works correctly
> Debug why the checkout test is failing
> Scrape product data from our competitor ' s site
Access up-to-date documentation for thousands of libraries:
claude mcp add --transport sse context7 https://mcp.context7.com/sse
Supported Libraries
React, Vue, Next.js, Nuxt, Express, Django, Rails, Laravel, and 1000+ more libraries with real-time documentation access.
For team collaboration, create a .mcp.json
file in your project root:
"args" : [ " -y " , " @modelcontextprotocol/git@latest " ]
"args" : [ " -y " , " @modelcontextprotocol/server-github " ],
"GITHUB_TOKEN" : " ${GITHUB_TOKEN} "
"args" : [ " -y " , " @modelcontextprotocol/server-postgres " ],
"DATABASE_URL" : " ${DATABASE_URL:-postgresql://localhost:5432/dev} "
"args" : [ " -y " , " @playwright/mcp@latest " ]
When team members clone the repository:
Claude Code detects the .mcp.json
file
Prompts for approval of each server (security measure)
Loads approved servers automatically in future sessions
Team members can reset approvals with: claude mcp reset-project-choices
Transport Types
Type Use Case Example stdio Local command execution Git, filesystem SSE Server-Sent Events streaming Remote APIs HTTP Request/response APIs REST services
# SSE server with authentication
claude mcp add api-server --transport sse \
https://api.example.com/mcp \
--header " Authorization: Bearer ${ API_TOKEN } "
claude mcp add data-service --transport http \
https://data.example.com/mcp
If you’ve already configured MCP servers in Claude Desktop:
# Import all servers from Claude Desktop
claude mcp add-from-claude-desktop
# You'll see an interactive picker to choose which servers to import
> I need to add a user profile page. Use Figma MCP to get the design,
> create the React component, add the API endpoint, and write tests.
Claude will:
Fetch design from Figma MCP
Generate React component matching the design
Create backend API endpoint
Write Playwright E2E tests
Commit changes with descriptive message
> Analyze our orders table and suggest performance improvements.
> Then implement the changes and update affected API endpoints.
> Review the changes in this branch, create a PR with a comprehensive
> description, and link it to the relevant GitHub issues.
# Get details for specific server
# Check server status in session
claude mcp remove playwright
# Remove from specific scope
claude mcp remove playwright -s project
# Launch with debug output
tail -f ~/.claude/logs/mcp- * .log
Security Checklist
✅ Review third-party servers - Only use MCP servers from trusted sources
✅ Limit server permissions - Configure minimal required access
✅ Use environment variables - Never hardcode credentials in .mcp.json
✅ Audit project servers - Review .mcp.json before approving
✅ Control tool access - Use .claude/settings.json
to restrict tools:
"allowedTools" : [ " mcp__git__* " , " mcp__github__* " ]
Common MCP Commands
claude mcp add <name> <command> # Local scope
claude mcp add <name> -s project <cmd> # Project scope
claude mcp add <name> -s user <cmd> # User scope
claude mcp list # List all
claude mcp get <name> # Get details
claude mcp remove <name> # Remove server
claude mcp add-json <name> ' <json> ' # Add from JSON
claude mcp add-from-claude-desktop # Import servers
claude mcp reset-project-choices # Reset approvals
/mcp # Check server status
Now that you have MCP servers configured, continue with:
Remember: MCP servers are what transform Claude Code from a smart autocomplete into a comprehensive development platform. Start with the essentials, then expand based on your workflow needs.