Skip to content

MCP Setup - Essential Tool Integrations

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

ScopeStorage LocationUse CaseCommand Flag
LocalProject-specific user settingsPersonal dev servers-s local (default)
Project.mcp.json in project rootTeam-shared tools-s project
UserGlobal user configPersonal utilities-s user

Precedence: Local → Project → User (when servers have the same name)

The most fundamental MCP server for any developer:

Terminal window
# 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

Connect to GitHub’s API for comprehensive repository control:

Terminal window
# 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

Safer file system access with configurable boundaries:

Terminal window
# 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

Direct database access for development and debugging:

Terminal window
# 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

Enable browser testing and web scraping:

Terminal window
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

Access up-to-date documentation for thousands of libraries:

Terminal window
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:

{
"mcpServers": {
"git": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/git@latest"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "${DATABASE_URL:-postgresql://localhost:5432/dev}"
}
},
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"]
}
}
}

When team members clone the repository:

  1. Claude Code detects the .mcp.json file
  2. Prompts for approval of each server (security measure)
  3. Loads approved servers automatically in future sessions
  4. Team members can reset approvals with: claude mcp reset-project-choices

Transport Types

TypeUse CaseExample
stdioLocal command executionGit, filesystem
SSEServer-Sent Events streamingRemote APIs
HTTPRequest/response APIsREST services
Terminal window
# SSE server with authentication
claude mcp add api-server --transport sse \
https://api.example.com/mcp \
--header "Authorization: Bearer ${API_TOKEN}"
# HTTP server
claude mcp add data-service --transport http \
https://data.example.com/mcp

If you’ve already configured MCP servers in Claude Desktop:

Terminal window
# Import all servers from Claude Desktop
claude mcp add-from-claude-desktop
# You'll see an interactive picker to choose which servers to import
Terminal window
> 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:

  1. Fetch design from Figma MCP
  2. Generate React component matching the design
  3. Create backend API endpoint
  4. Write Playwright E2E tests
  5. Commit changes with descriptive message
Terminal window
> Analyze our orders table and suggest performance improvements.
> Then implement the changes and update affected API endpoints.
Terminal window
> Review the changes in this branch, create a PR with a comprehensive
> description, and link it to the relevant GitHub issues.
Terminal window
# List all servers
claude mcp list
# Get details for specific server
claude mcp get github
# Check server status in session
/mcp
Terminal window
# Remove a server
claude mcp remove playwright
# Remove from specific scope
claude mcp remove playwright -s project
Terminal window
# Launch with debug output
claude --mcp-debug
# Check MCP server logs
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

Terminal window
# Add servers
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
# Manage servers
claude mcp list # List all
claude mcp get <name> # Get details
claude mcp remove <name> # Remove server
# Advanced
claude mcp add-json <name> '<json>' # Add from JSON
claude mcp add-from-claude-desktop # Import servers
claude mcp reset-project-choices # Reset approvals
# In-session
/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.