TL;DR - MCP Installation Quick Start
Want to get MCP running in 5 minutes? Here’s the fastest path:
🆕 December 2025: MCP is now supported by ChatGPT, Copilot, and Gemini in addition to Claude Desktop! For an introduction to MCP, see the MCP Introduction guide.
Prerequisites:
# Check Node.js (v18+ required)
node --version
# If not installed, get it from nodejs.org
Claude Desktop Setup:
-
Create/edit config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
- macOS:
-
Add this config:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/your/projects"]
}
}
}
-
Restart Claude Desktop completely (quit and reopen)
-
Test it: Ask Claude “What files are in my projects folder?”
💡 That’s it! For more servers, hosts, and advanced config, read on.
Prerequisites
Before installing MCP servers, ensure you have the required runtime environments:
Node.js (Required for Most Servers)
Most MCP servers are written in TypeScript/JavaScript and distributed via npm.
# Check if Node.js is installed
node --version
# Should output v18.0.0 or higher
# Check npm
npm --version
# Check npx (comes with npm)
npx --version
Installing Node.js:
| Platform | Installation Method |
|---|---|
| macOS | brew install node or download from nodejs.org |
| Windows | Download installer from nodejs.org |
| Linux | sudo apt install nodejs npm or use nvm |
⚠️ Important: MCP servers require Node.js v18 or higher. If you have an older version, upgrade first.
Python (For Python-based Servers)
Some MCP servers are written in Python (like mcp-server-sqlite):
# Check Python version
python3 --version
# Should output Python 3.10.0 or higher
# Check pip
pip3 --version
# Install uvx (recommended for Python MCP servers)
pip3 install uvx
Docker (Optional)
For fully isolated environments or server environments:
# Check Docker
docker --version
# Pull an MCP server image
docker pull ghcr.io/modelcontextprotocol/server-filesystem
Installation Methods Comparison
There are several ways to run MCP servers. Here’s when to use each:
| Method | Command | Best For | Pros | Cons |
|---|---|---|---|---|
| npx | npx -y @pkg/server | Quick start, testing | Always latest, no install | Slower first run |
| npm global | npm i -g @pkg/server | Frequent use | Fast execution | Manual updates |
| uvx | uvx mcp-server-name | Python servers | Clean isolation | Python required |
| Docker | docker run mcp/server | Enterprise, CI/CD | Fully isolated | More setup |
Method 1: npx (Recommended for Most Users)
The easiest way - runs the latest version without installation:
# Runs server without installing
npx -y @modelcontextprotocol/server-filesystem /path/to/allow
The -y flag auto-confirms the install prompt.
In your config file:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/projects"]
}
}
}
Method 2: Global npm Install
Faster execution for servers you use frequently:
# Install globally once
npm install -g @modelcontextprotocol/server-filesystem
# Now use directly
mcp-server-filesystem /path/to/allow
In your config file:
{
"mcpServers": {
"filesystem": {
"command": "mcp-server-filesystem",
"args": ["/path/to/projects"]
}
}
}
Method 3: uvx for Python Servers
For Python-based MCP servers:
# Install uvx first
pip install uvx
# Run Python MCP server
uvx mcp-server-sqlite --db-path /path/to/database.db
In your config file:
{
"mcpServers": {
"sqlite": {
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "/path/to/database.db"]
}
}
}
Method 4: Docker
For isolated, reproducible environments:
docker run -i --rm \
-v /local/path:/data \
ghcr.io/modelcontextprotocol/server-filesystem /data
In your config file:
{
"mcpServers": {
"filesystem": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "/local/path:/data",
"ghcr.io/modelcontextprotocol/server-filesystem",
"/data"
]
}
}
}
Claude Desktop Configuration
Claude Desktop is Anthropic’s official client with native MCP support since November 2024.
💡 Note: As of December 2025, ChatGPT, Microsoft Copilot, and Google Gemini also support MCP. See their dedicated sections below.
Step 1: Locate the Config File
| Operating System | Config File Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Quick access commands:
# macOS - Open in Finder
open ~/Library/Application\ Support/Claude/
# macOS - Open in VS Code
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Windows PowerShell
notepad $env:APPDATA\Claude\claude_desktop_config.json
# Linux
nano ~/.config/Claude/claude_desktop_config.json
💡 Tip: If the file doesn’t exist, create it! Make sure you create valid JSON.
Step 2: Basic Configuration Structure
Here’s the basic structure of the config file:
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "@package/name", "arg1", "arg2"],
"env": {
"API_KEY": "your-key-here"
}
}
}
}
Anatomy of a server config:
| Field | Required | Description |
|---|---|---|
server-name | Yes | Unique identifier (you choose this) |
command | Yes | Executable to run (npx, node, python, docker) |
args | Yes | Array of command arguments |
env | No | Environment variables for the server |
Step 3: Example Configurations
Filesystem Server (Read Your Files)
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/yourname/projects",
"/Users/yourname/documents"
]
}
}
}
GitHub Server (Manage Repos)
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxx"
}
}
}
}
PostgreSQL Server (Query Databases)
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://user:password@localhost:5432/mydb"
]
}
}
}
Multiple Servers (Complete Setup)
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxx"
}
},
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
},
"fetch": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-fetch"]
}
}
}
Step 4: Restart Claude Desktop
Important: You must completely restart Claude Desktop after changing the config.
macOS:
- Click Claude in menu bar → Quit Claude
- Reopen from Applications
Windows:
- Right-click Claude in system tray → Exit
- Reopen from Start Menu
Linux:
- Close Claude window
- Reopen from applications menu
Step 5: Verify MCP is Working
After restart, you should see the MCP indicator in Claude’s interface:
- Look for the 🔌 icon or “MCP” indicator in the chat interface
- Test with a simple prompt:
You: What MCP servers are connected?
Claude: I have access to the following MCP servers:
- filesystem: Read and write files in /Users/me/projects
- github: Manage GitHub repositories
...
Or test a specific server:
You: List the files in my projects folder
Claude: Here are the files in /Users/me/projects:
- project-a/
- project-b/
- notes.md
...
Cursor Configuration
Cursor is an AI-powered IDE that supports MCP natively. For a comparison of AI coding tools, see the AI-Powered IDEs Comparison guide.
Step 1: Open Cursor Settings
- Open Cursor
- Press
Cmd+,(macOS) orCtrl+,(Windows/Linux) - Search for “MCP” or navigate to Features → MCP Servers
Step 2: Configure via Settings UI
Cursor has a visual interface for adding MCP servers:
- Click “Add Server”
- Enter server name
- Enter command and arguments
- Add environment variables if needed
- Save
Step 3: Configure via JSON (Alternative)
You can also edit the config directly:
Location: .cursor/mcp.json in your project root (project-level) or global settings
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxx"
}
}
}
}
Project-Level vs Global Config
| Scope | Location | Best For |
|---|---|---|
| Project | .cursor/mcp.json in project root | Project-specific tools |
| Global | Cursor settings | Tools you use everywhere |
Step 4: Using MCP in Cursor
Once configured, use MCP in Cursor’s AI chat:
- Press
Cmd+L(macOS) orCtrl+L(Windows) to open AI chat - Ask questions that leverage MCP:
You: Read the README.md and suggest improvements
You: Create a new file called utils.ts with helper functions
You: Search for all TODO comments in this project
VS Code + Continue Configuration
VS Code doesn’t have native MCP support, but the Continue extension adds it.
Step 1: Install Continue Extension
- Open VS Code Extensions (
Cmd+Shift+X) - Search for “Continue”
- Install the Continue extension
- Reload VS Code
Step 2: Configure Continue for MCP
Open Continue settings:
- Click the Continue icon in the sidebar
- Click the gear icon ⚙️
- Select “Open config.json”
Add MCP configuration:
{
"models": [...],
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "${workspaceFolder}"]
}
}
}
💡 Tip: Use
${workspaceFolder}to automatically use the current workspace path.
Step 3: Using MCP in Continue
- Open Continue chat panel
- Use
@to reference files or MCP tools - Ask questions that use MCP capabilities
You: @filesystem Read all TypeScript files and find potential bugs
You: @github Create an issue for the bug we discussed
Windsurf Configuration
Windsurf (by Codeium) is another AI IDE with MCP support. For more on AI coding assistants, see the AI Assistant Comparison guide.
Step 1: Open Windsurf Settings
- Open Windsurf
- Press
Cmd+,(macOS) orCtrl+,(Windows) - Navigate to Cascade → MCP Servers
Step 2: Add MCP Configuration
Windsurf uses similar JSON structure:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/projects"]
}
}
}
Step 3: Using MCP in Windsurf
Use Cascade (Windsurf’s AI) with MCP:
- Open Cascade chat
- Ask file-related questions:
You: Analyze the codebase and suggest architecture improvements
You: Find all files that import lodash
ChatGPT Configuration (New in 2025)
OpenAI added native MCP support to ChatGPT in early 2025, making it part of the MCP ecosystem.
Step 1: Enable Developer Mode
- Open ChatGPT settings
- Navigate to Advanced Settings
- Enable Developer Mode (rolling out for paid accounts)
Step 2: Add MCP Connector
- Go to Settings → Connectors → Create
- Enter your MCP server details:
- Name: Descriptive name for the server
- Server URL: URL of your remote MCP server
- Authentication: OAuth (required - API keys not supported)
Step 3: Configure Remote MCP Server
Unlike Claude Desktop which runs local servers, ChatGPT requires remote MCP servers:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ ChatGPT │───────▶│ Remote MCP │───────▶│ Your Data/ │
│ (Browser) │ HTTPS │ Server │ │ Services │
└─────────────────┘ └─────────────────┘ └─────────────────┘
⚠️ Important: ChatGPT’s MCP integration uses OAuth authentication only. You’ll need to deploy your MCP server to a publicly accessible URL with OAuth support.
Step 4: Test the Connection
- Open Deep Research mode or Use Connectors tool
- Ask a question that requires your MCP server
- Verify the server responds correctly
Microsoft Copilot Configuration (New in 2025)
Microsoft added MCP support to Copilot as part of their collaboration with the Agentic AI Foundation.
Copilot in VS Code
Copilot’s MCP support in VS Code works through extensions:
- Ensure you have GitHub Copilot extension installed
- Install MCP-compatible extensions
- Configure via the extension settings
Copilot for Enterprise
For Microsoft 365 Copilot in enterprise environments:
- Contact your IT administrator for MCP configuration
- MCP servers are typically configured at the organization level
- Uses Azure AD for authentication
📌 Note: Microsoft Copilot’s MCP implementation is designed for enterprise scenarios with proper governance.
Google Gemini Configuration (New in December 2025)
Google announced fully managed remote MCP servers in December 2025.
Google Cloud MCP Servers
Google provides hosted MCP servers for their services:
- Enable MCP in Google AI Studio or Gemini settings
- Connect to Google services directly:
- Google Drive
- Google Docs
- BigQuery
- Cloud Storage
- And more…
Configuration Example
In Gemini settings:
1. Navigate to Integrations → MCP Servers
2. Select from available Google Cloud MCP services
3. Authorize access via Google OAuth
4. Start using in conversations
Benefits of Google’s Approach
| Feature | Description |
|---|---|
| No local setup | Servers run on Google Cloud |
| Unified auth | Uses your Google account |
| Managed scaling | Automatic resource management |
| Enterprise-ready | Integrates with Workspace |
Managing Multiple MCP Servers
How Many Servers Can You Run?
There’s no hard limit, but consider:
| Usage Level | Recommendation |
|---|---|
| Personal | 3-5 active servers |
| Professional | 5-10 servers |
| Enterprise | Use Docker/container management |
Resource Considerations
Each MCP server is a separate process:
┌─────────────────────────────────────────┐
│ Your Machine │
├─────────────────────────────────────────┤
│ Claude Desktop │
│ ├── Filesystem Server (Node.js) │ ~50MB RAM
│ ├── GitHub Server (Node.js) │ ~50MB RAM
│ ├── Postgres Server (Node.js) │ ~50MB RAM
│ └── Memory Server (Node.js) │ ~60MB RAM
└─────────────────────────────────────────┘
Total: ~210MB RAM
Naming Conventions
Use descriptive, consistent names:
{
"mcpServers": {
"files-projects": { ... }, // Filesystem for projects
"files-notes": { ... }, // Filesystem for notes
"db-production": { ... }, // Prod database (read-only!)
"db-development": { ... }, // Dev database
"github-work": { ... }, // Work GitHub account
"github-personal": { ... } // Personal GitHub account
}
}
Environment Variables & Secrets
Passing API Keys
Many MCP servers need API keys. Use the env block:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxx"
}
},
"notion": {
"command": "npx",
"args": ["-y", "@notionhq/mcp"],
"env": {
"NOTION_API_KEY": "secret_xxxxxxxxxxxx"
}
}
}
}
Security Best Practices
| ✅ Do | ❌ Don’t |
|---|---|
| Store config locally only | Commit config to git with keys |
| Use minimal permission scopes | Use admin/full-access tokens |
| Rotate keys regularly | Share keys between tools |
| Use read-only tokens when possible | Use write tokens for read operations |
For more on AI security best practices, see the Understanding AI Safety, Ethics, and Limitations guide.
Using System Environment Variables
Some setups support referencing system environment variables:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
⚠️ Note: Environment variable expansion support varies by MCP client. Claude Desktop supports it; check your client’s documentation.
Creating API Tokens
Here’s where to get tokens for popular servers:
| Server | Token Location | Required Scopes |
|---|---|---|
| GitHub | Settings → Developer → Personal Access Tokens | repo, read:org |
| Notion | My Integrations | Read/write content |
| Slack | Create App → OAuth | channels:read, chat:write |
| Firecrawl | firecrawl.dev | N/A (account key) |
Troubleshooting Common Issues
Issue 1: Server Not Appearing
Symptoms: MCP icon doesn’t show, servers not listed
Causes & Solutions:
| Cause | Solution |
|---|---|
| JSON syntax error | Validate with jsonlint.com |
| Didn’t restart app | Completely quit and reopen |
| Wrong config path | Double-check file location |
| File permissions | Ensure file is readable |
Debug Steps:
# Validate JSON syntax
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | python -m json.tool
# Check if file exists
ls -la ~/Library/Application\ Support/Claude/
Issue 2: “Command Not Found”
Symptoms: Server fails to start, “npx not found” error
Causes & Solutions:
| Cause | Solution |
|---|---|
| Node.js not installed | Install Node.js v18+ |
| PATH not set correctly | Add Node to PATH |
| Using wrong shell | Make sure shell can find commands |
Debug Steps:
# Check Node is accessible
which node
which npx
# Test manually
npx -y @modelcontextprotocol/server-filesystem --help
Issue 3: Connection Timeout
Symptoms: Server starts but AI can’t connect
Causes & Solutions:
| Cause | Solution |
|---|---|
| Server crashed | Check logs for errors |
| Wrong arguments | Review server documentation |
| Port conflict | Close conflicting apps |
Issue 4: Permission Denied
Symptoms: Server runs but operations fail
Causes & Solutions:
| Cause | Solution |
|---|---|
| Path not allowed | Add path to server args |
| File permissions | Check OS-level permissions |
| Token permissions | Add required scopes |
Issue 5: Rate Limiting
Symptoms: Operations work then fail
Causes & Solutions:
| Cause | Solution |
|---|---|
| API limits hit | Add delays between operations |
| Too many requests | Reduce active servers |
| Token limits | Upgrade API plan |
Using MCP Inspector
For deep debugging, use the official MCP Inspector:
# Install and run inspector
npx @modelcontextprotocol/inspector
# Connect to your server
# The inspector provides a UI to test tools and view logs
Quick Reference Cheat Sheet
Config File Locations
| Platform | Claude Desktop | Cursor |
|---|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json | .cursor/mcp.json |
| Windows | %APPDATA%/Claude/claude_desktop_config.json | .cursor/mcp.json |
| Linux | ~/.config/Claude/claude_desktop_config.json | .cursor/mcp.json |
Common Server Commands
# Filesystem - Read/write files
npx -y @modelcontextprotocol/server-filesystem /path/to/allow
# GitHub - Manage repos
npx -y @modelcontextprotocol/server-github
# PostgreSQL - Query database
npx -y @modelcontextprotocol/server-postgres postgresql://user:pass@host/db
# Memory - Knowledge graph
npx -y @modelcontextprotocol/server-memory
# Fetch - Web content
npx -y @modelcontextprotocol/server-fetch
# Git - Version control
npx -y @modelcontextprotocol/server-git --repository /path/to/repo
# Playwright - Browser automation
npx -y @playwright/mcp
Complete Example Config
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem",
"/Users/me/projects", "/Users/me/documents"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxx"
}
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres",
"postgresql://localhost:5432/mydb"]
},
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}
Troubleshooting Commands
# Validate JSON
python -m json.tool < config.json
# Check Node.js
node --version && npm --version && npx --version
# Test server manually
npx -y @modelcontextprotocol/server-filesystem --help
# Run MCP Inspector
npx @modelcontextprotocol/inspector
Next Steps
You’ve learned how to install and configure MCP servers. Here’s what to explore next:
➡️ Related Articles
| Article | What You’ll Learn |
|---|---|
| Building Your First MCP Server | Create custom servers |
| GitHub MCP Guide | Master GitHub integration |
| Filesystem MCP Guide | Deep dive into file access |
| PostgreSQL MCP Guide | Query databases with AI |
🎯 Recommended Next Setups
If you’re a developer:
{
"mcpServers": {
"filesystem": { ... },
"github": { ... },
"git": { ... }
}
}
If you’re a data analyst:
{
"mcpServers": {
"postgres": { ... },
"filesystem": { ... },
"fetch": { ... }
}
}
If you’re a productivity user:
{
"mcpServers": {
"notion": { ... },
"slack": { ... },
"memory": { ... }
}
}
Summary
In this guide, you learned:
- ✅ Prerequisites: Node.js v18+, Python 3.10+ (optional), Docker (optional)
- ✅ Installation methods: npx (recommended), npm global, uvx, Docker
- ✅ Configuration: JSON format for Claude Desktop, Cursor, VS Code, Windsurf
- ✅ New in 2025: ChatGPT, Microsoft Copilot, and Google Gemini MCP support
- ✅ Remote servers: Cloud-hosted MCP for ChatGPT and Gemini
- ✅ Environment variables: Passing API keys securely
- ✅ Troubleshooting: Common issues and solutions
The key takeaway: MCP is now the industry standard supported by all major AI platforms. Whether you use Claude, ChatGPT, Copilot, or Gemini, MCP provides a consistent way to connect your AI to external tools and data.
Next: Learn how to Build Your First MCP Server →
Having trouble? Check out the MCP Discord community or file an issue on GitHub.