Official MCP documentation: docs.anthropic.com/en/docs/claude-code/mcp
This guide provides comprehensive installation instructions for MCP (Model Context Protocol) servers, enabling Claude Code to interact with external tools and services.
- Claude Code: Version 1.0 or higher
- Node.js: Version 18+ (for npm/npx commands)
- Python: Version 3.10+ with pip/uvx (for Python-based servers)
- Operating System: macOS, Linux, or Windows with WSL
- Permissions: Write access to home directory for user configurations
For new users, install these three essential MCP servers to get started:
# 1. File system access (required for most projects)
claude mcp add filesystem -- npx --yes @modelcontextprotocol/server-filesystem $(pwd)
# 2. Git integration (for version control)
claude mcp add git --scope user -- uvx mcp-server-git
# 3. Web fetching (for accessing online resources)
claude mcp add fetch --scope user -- uvx mcp-server-fetchAfter installation, restart Claude Code to activate the servers.
| Command | Args (default) | Description (examples) |
|---|---|---|
-s, --scope |
<scope> (local) |
Configuration scope (local, user, or project) |
-t, --transport |
<transport> (stdio) |
Transport type (stdio, sse, http) |
-e, --env |
<env...> |
Set environment variables (e.g. -e KEY=value) |
-H, --header |
<header...> |
Set HTTP headers for SSE and HTTP transports (e.g. -H "X-Api-Key: abc123" -H "X-Custom: value") |
-h, --help |
Display help for command |
- Local scope (default): Personal, project-specific configurations, runs in the current directory.
- User scope (
-s user): Personal utilities available across all projects - Project scope (
-s project): Team-shared configurations via.mcp.json
-
Use
localscope for:- Testing new MCP servers
- Project-specific database connections
- Temporary configurations
-
Use
userscope for:- General-purpose tools (fetch, time, context7)
- Personal AI assistants (perplexity, sequential-thinking)
- UI/component generators used across projects
-
Use
projectscope for:- Team-shared tools (git, filesystem)
- Project-specific databases
- CI/CD related servers
-
Never commit API keys to version control
- Use
.gitignorefor any files containing keys - Review commits before pushing
- Use
-
Use environment variables for sensitive data
# Good: API key as environment variable claude mcp add server-name --env API_KEY="your-key" -- command # Avoid: API key in args (may be logged) claude mcp add server-name -- command --api-key="your-key"
-
Secure storage recommendations:
- Store API keys in password managers
- Use system keychains when available
- Set file permissions to 600 for config files with secrets
- Consider using
.envfiles (never commit these)
-
Scope-specific security:
- Use
localscope for testing with temporary keys - Use
userscope for personal API keys - Never put API keys in
projectscope (shared with team)
- Use
-
Service account files:
# Store outside project directory chmod 600 ~/secrets/service-account.json # Reference with absolute path claude mcp add firebase --env SERVICE_ACCOUNT_KEY_PATH=~/secrets/service-account.json
Core Development
- Filesystem - File operations and management
- Git - Version control integration
- GitHub - Repository and issue management
- Docker - Container management
AI & Search
- Context7 - Up-to-date documentation lookup
- Perplexity Ask - AI-powered web search
- Sequential Thinking - Structured problem-solving
UI & Frontend
- 21st.dev Magic - AI-driven UI components
- Magic UI - Magic UI design system
- Playwright - Browser automation and testing
- Puppeteer - Web scraping and automation
Databases
- SQLite [Archived] - Local database operations
- PostgreSQL [Archived] - PostgreSQL connections
- Redis [Archived] - Key-value store operations
- Firebase - Firebase services
- Neon - Serverless PostgreSQL
- Upstash - Serverless Redis/Kafka
- Prisma-Local - Prisma ORM integration
Web & Documentation
- Fetch - Web content fetching
- Cloudflare Docs - Cloudflare documentation
Utilities
- Memory - Persistent memory across sessions
- Time - Time and timezone utilities
- Blender - 3D modeling automation
Functionality: Secure file operations with configurable access controls. Read, write, search, and manage files within specified directories.
GitHub: modelcontextprotocol/servers
claude mcp add filesystem \
-- npx --yes @modelcontextprotocol/server-filesystem \
$(pwd) \ # COMMAND DETECTS CURRENT DIRECTORY
# ADD ANY OTHER \
# DIRECTORIES HERE Functionality: Tools to read, search, and manipulate Git repositories. View diffs, commit history, branches, and repository status.
GitHub: modelcontextprotocol/servers
claude mcp add git \
--scope user \
-- uvx mcp-server-gitNote: These instructions use the official, new
github/github-mcp-server, instead of the archived@modelcontextprotocol/server-github.
Functionality: Repository management, file operations, and GitHub API integration. Create issues, manage PRs, search repositories.
GitHub: github/github-mcp-server
From their official documentation:
Run the following command to add the GitHub MCP server using Docker:
claude mcp add github -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-serverThen set the environment variable:
claude mcp update github -e GITHUB_PERSONAL_ACCESS_TOKEN=your_github_patOr as a single command with the token inline:
claude mcp add-json github '{"command": "docker", "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"], "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_pat"}}'Important: The npm package
@modelcontextprotocol/server-githubis no longer supported as of April 2025. Use the official Docker imageghcr.io/github/github-mcp-serverinstead.
Setup: Get your token from GitHub Settings → Developer settings → Personal access tokens
Warning
In my experience, these commands don't work, try this:
claude mcp add github \
--scope user \
--transport http "https://api.githubcopilot.com/mcp/" \
--header "Authorization: Bearer <YOUR_TOKEN>"Functionality: Docker container and image management. List containers, images, start/stop containers, view logs.
GitHub: QuantGeekDev/docker-mcp
claude mcp add mcp-server-docker \
--scope project \ # OR user
-- uvx docker-mcpFunctionality: Up-to-date Code Docs For Any Prompt.
GitHub: upstash/context7
claude mcp add context7 \
--scope user \
--transport http https://mcp.context7.com/mcp \
--header "CONTEXT7_API_KEY: YOUR_API_KEY"Or using SSE transport:
claude mcp add context7 \
--scope user \
--transport sse https://mcp.context7.com/sse \
--header "CONTEXT7_API_KEY: YOUR_API_KEY"Or...
claude mcp add context7 \
-- npx --yes @upstash/context7-mcp \
--api-key YOUR_API_KEYYou can get your API key by creating an account at context7.com/dashboard.
claude mcp add context7 \
--scope user \
-- npx --yes @upstash/context7-mcpFunctionality: AI-powered search and question answering using Perplexity's API. Get real-time web search results.
GitHub: ppl-ai/modelcontextprotocol
claude mcp add perplexity \
--env PERPLEXITY_API_KEY=<your_api_key_here> \
-- npx --yes server-perplexity-askSetup: Get API key from Perplexity Labs
Functionality: An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.
GitHub: modelcontextprotocol/servers
claude mcp add sequential-thinking \
--scope user \
-- npx --yes @modelcontextprotocol/server-sequential-thinkingFunctionality: AI-driven UI component creation through natural language. Generate beautiful, modern UI components instantly with the Magic Component Platform.
Website: 21st.dev
claude mcp add @21st-dev/magic \
--scope user \
-- npx --yes @21st-dev/magic@latest API_KEY="your-api-key"Setup: Get your API key from 21st.dev (requires account)
Usage examples:
- "Create a modern pricing card component"
- "Build a responsive navigation menu with dropdown"
- "Generate a data table with sorting and filtering"
- "Design a hero section with gradient background"
- "Create an interactive dashboard widget"
Functionality: UI component generation with Magic UI design system. Create beautiful animations, backgrounds, and UI components with minimal errors.
GitHub: magicuidesign/mcp
Docs: magicui.design/docs/mcp
claude mcp add @magicuidesign/mcp \
--scope user \
-- npx --yes @magicuidesign/mcp@latestUsage examples:
- "Add a blur fade text animation"
- "Add a grid background"
- "Add a vertical marquee of logos"
- "Create a shimmer button component"
- "Add a particle effect background"
Functionality: Advanced browser automation and testing. Cross-browser testing, mobile emulation, network interception.
GitHub: microsoft/playwright
claude mcp add playwright \
--scope user \
-- npx @playwright/mcp@latestFirst-time setup: Playwright will automatically install browser binaries on first use
Customization options:
# With specific browser
claude mcp add playwright \
--scope user \
--env BROWSER=firefox \
-- npx @playwright/mcp@latest
# With custom user agent
claude mcp add playwright \
--scope user \
--env USER_AGENT="Custom Bot 1.0" \
-- npx @playwright/mcp@latestNote: These instructions use a fork
merajmehrabi/puppeteer-mcp-server, instead of the deprecated@modelcontextprotocol/server-puppeteer.
Functionality: Browser automation and web scraping. Take screenshots, fill forms, navigate pages, extract data.
GitHub: merajmehrabi/puppeteer-mcp-server
claude mcp add puppeteer \
--scope user \
-- npx --yes puppeteer-mcp-serverCustomization options:
# With custom settings
claude mcp add puppeteer \
--scope user \
--env PUPPETEER_LAUNCH_OPTIONS="{ \"headless\": false, \"defaultViewport\": { \"width\": 1280, \"height\": 720 }, \"executablePath\": \"C:/Program Files/Google/Chrome/Application/chrome.exe\", \"args\": [] }" \
--env ALLOW_DANGEROUS=true \
-- npx --yes puppeteer-mcp-serverWARNING: This repository was archived by the owner on May 29, 2025. It is now read-only.
Functionality: Database interaction and business intelligence features for SQLite. Query, insert, update, analyze data.
GitHub: modelcontextprotocol/servers-archived
claude mcp add sqlite \
--scope project \
-- uvx mcp-server-sqlite \
--db-path ./prisma/db.sqliteCustomization: Adjust --db-path to point to your SQLite database file
WARNING: This repository was archived by the owner on May 29, 2025. It is now read-only.
Functionality: Read-only database access with schema inspection capabilities. Query tables, views, analyze database structure.
GitHub: modelcontextprotocol/servers-archived
claude mcp add postgres \
--scope project \
-- npx --yes @modelcontextprotocol/server-postgres \
"postgresql://user:password@localhost:5432/database_name"Note: Replace connection string with your actual PostgreSQL credentials
WARNING: This repository was archived by the owner on May 29, 2025. It is now read-only.
Functionality: Redis key-value store operations. Set, get, delete keys, manage data structures (hashes, lists, sets).
GitHub: modelcontextprotocol/servers-archived
claude mcp add redis \
-- npx --yes @modelcontextprotocol/server-redis \
redis://localhost:6379Customization: Adjust Redis URL for different hosts, ports, or authentication
Functionality: Firebase services integration. Manage Firestore, Authentication, Storage, and other Firebase services.
GitHub: gannonh/firebase-mcp
claude mcp add firebase-mcp \
--env SERVICE_ACCOUNT_KEY_PATH=/absolute/path/to/serviceAccountKey.json \
-- npx --yes @gannonh/firebase-mcpSetup: Download service account key from Firebase Console → Project Settings → Service Accounts
Functionality: Serverless PostgreSQL database management. Create branches, manage databases, monitor performance on Neon.
GitHub: neondatabase/mcp-server-neon
claude mcp add neon \
--env NEON_API_KEY=your_actual_api_key \
-- npx --yes @neondatabase/mcp-server-neon startSetup: Get API key from Neon Console → Account Settings → API Keys
Warning
In my experience, these commands don't work, try this:
claude mcp add neon \
--scope local \ # or user
--transport http "https://mcp.neon.tech/mcp" \
--header "Authorization: Bearer <YOUR_TOKEN>"Functionality: Serverless Redis and Kafka management. Create databases, manage data, monitor usage through natural language.
GitHub: upstash/mcp-server
claude mcp add upstash \
--scope local \
-- npx -y @upstash/mcp-server run \
<UPSTASH_EMAIL> \
<UPSTASH_API_KEY>Setup: Get credentials from Upstash Console
Functionality: Prisma ORM integration for database management. Generate schemas, run migrations, manage database models and queries through Prisma CLI.
prisma.io: prisma/prisma
claude mcp add prisma-local \
--scope project \
-- npx --yes prisma mcpRequirements: Project must have prisma installed and a schema.prisma file configured
Setup: Run in a directory with an existing Prisma project
Functionality: Web content fetching and conversion optimized for LLM usage. Fetch and process web pages, APIs, and documents.
GitHub: modelcontextprotocol/servers
claude mcp add fetch \
--scope user \
-- uvx mcp-server-fetchFunctionality: Access Cloudflare's documentation and developer resources. Search docs, get API references.
GitHub: cloudflare/mcp-server-cloudflare
Remote SSE server (no local installation)
claude mcp add cloudflare-docs \
--scope user \ # OR project
--transport sse https://docs.mcp.cloudflare.com/sseFunctionality: Knowledge graph-based persistent memory system. Store and retrieve contextual information across conversations.
GitHub: modelcontextprotocol/servers
claude mcp add memory \
--scope project \ # OR user
-- npx --yes @modelcontextprotocol/server-memoryadd a custom file path for the memory database:
claude mcp add memory \
--scope user \ # OR local
--env MEMORY_FILE_PATH=/path/to/custom/memory.json \
-- npx --yes @modelcontextprotocol/server-memoryFunctionality: Time and timezone conversion capabilities. Get current time, convert between timezones using IANA names.
GitHub: modelcontextprotocol/servers
claude mcp add time \
--scope user \
-- uvx mcp-server-time \
--local-timezone=Europe/Amsterdam # Optionally add your timezoneCustomization: Replace Europe/Amsterdam with your local timezone
Functionality: 3D modeling and animation automation in Blender. Create objects, materials, animations through natural language.
GitHub: ahujasid/blender-mcp
claude mcp add blender \
--scope user \
-- uvx blender-mcpRequirements: Blender must be installed and accessible in PATH. And a setup.py has to have been added to blender, see the project for details.