MCP Library updated 21 min read

How to Install and Configure MCP Servers: Setup Guide

Step-by-step guide to installing MCP servers for Claude Desktop, Cursor, and VS Code. Includes troubleshooting and examples.

Rajesh Praharaj

· Updated

Contents 17 sections
  1. TL;DR - MCP Installation Quick Start
  2. Prerequisites
  3. Installation Methods Comparison
  4. Claude Desktop Configuration
  5. Cursor Configuration
  6. VS Code + Continue Configuration
  7. Windsurf Configuration
  8. ChatGPT Configuration (New in 2025)
  9. Microsoft Copilot Configuration (New in 2025)
  10. Google Gemini Configuration (New in December 2025)
  11. Managing Multiple MCP Servers
  12. Environment Variables & Secrets
  13. Troubleshooting Common Issues
  14. Quick Reference Cheat Sheet
  15. Next Steps
  16. Summary
  17. Frequently Asked Questions

TL;DR - MCP Installation Quick Start

Want to get Model Context Protocol (MCP) servers running in under 5 minutes? Whether you are connecting Claude Opus 4.6, GPT-5.4, or Gemini 3.1 Pro (compare tool-calling speeds on our LLM Benchmarks hub) to local tools or remote enterprise endpoints, follow this verified setup workflow. For a foundational architectural overview, see our MCP Introduction guide.

Key Takeaways

  • Runtime & Memory Footprint: Most local stdio MCP servers require Node.js v18+ (npx) or Python 3.10+ (uvx), consuming 45MB to 65MB RAM per active process and 2ms to 8ms local IPC latency.
  • Context Window Budgeting: Each active MCP server injects 1,200 to 2,500 tokens of JSON Schema tool definitions into your model’s system prompt; keep active desktop servers between 3 and 5 instances to avoid consuming 15,000+ tokens (12%+ of a 128K context window) on unused tools.
  • Local stdio vs. Remote Streamable HTTP: Desktop clients (Claude Desktop, Cursor, VS Code, Windsurf) spawn local stdio processes or connect to remote endpoints, whereas browser-hosted platforms (ChatGPT Connectors, Gemini Cloud MCP) require remote Streamable HTTP (2025-11-25 spec) secured with OAuth 2.1 + PKCE (S256) (modelcontextprotocol.io).
  • Zero-Syntax-Error Configs: Always validate your claude_desktop_config.json or .cursor/mcp.json file in our JSON Formatter & Validator before restarting your IDE, and design tool-routing prompts with our AI Prompt Generator.
Pre-Flight Checklist Before Editing Config Files (Click to Expand)
  1. Verify node --version returns v18.0.0+ (or v20 LTS / v22 LTS) in your default system shell (zsh, bash, or PowerShell).
  2. Use absolute paths (/Users/yourname/projects, never ~/projects or ./projects) inside claude_desktop_config.json.
  3. Completely quit (Cmd+Q on macOS or System Tray → Exit on Windows) and relaunch Claude Desktop after saving changes.

Prerequisites:

# Check Node.js (v18+ required)
node --version

# If not installed, get it from nodejs.org

Claude Desktop Setup:

  1. Create/edit config file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
  2. Add this config:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/your/projects"]
    }
  }
}
  1. Restart Claude Desktop completely (quit and reopen)

  2. 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:

PlatformInstallation Method
macOSbrew install node or download from nodejs.org
WindowsDownload installer from nodejs.org
Linuxsudo 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:

MethodCommandBest ForProsCons
npxnpx -y @pkg/serverQuick start, testingAlways latest, no installSlower first run
npm globalnpm i -g @pkg/serverFrequent useFast executionManual updates
uvxuvx mcp-server-namePython serversClean isolationPython required
Dockerdocker run mcp/serverEnterprise, CI/CDFully isolatedMore setup

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 SystemConfig 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:

FieldRequiredDescription
server-nameYesUnique identifier (you choose this)
commandYesExecutable to run (npx, node, python, docker)
argsYesArray of command arguments
envNoEnvironment 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:

  1. Click Claude in menu bar → Quit Claude
  2. Reopen from Applications

Windows:

  1. Right-click Claude in system tray → Exit
  2. Reopen from Start Menu

Linux:

  1. Close Claude window
  2. Reopen from applications menu

Step 5: Verify MCP is Working

After restart, you should see the MCP indicator in Claude’s interface:

  1. Look for the icon or “MCP” indicator in the chat interface
  2. 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

  1. Open Cursor
  2. Press Cmd+, (macOS) or Ctrl+, (Windows/Linux)
  3. Search for “MCP” or navigate to Features → MCP Servers

Step 2: Configure via Settings UI

Cursor has a visual interface for adding MCP servers:

  1. Click “Add Server”
  2. Enter server name
  3. Enter command and arguments
  4. Add environment variables if needed
  5. 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

ScopeLocationBest For
Project.cursor/mcp.json in project rootProject-specific tools
GlobalCursor settingsTools you use everywhere

Step 4: Using MCP in Cursor

Once configured, use MCP in Cursor’s AI chat:

  1. Press Cmd+L (macOS) or Ctrl+L (Windows) to open AI chat
  2. 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

  1. Open VS Code Extensions (Cmd+Shift+X)
  2. Search for “Continue”
  3. Install the Continue extension
  4. Reload VS Code

Step 2: Configure Continue for MCP

Open Continue settings:

  1. Click the Continue icon in the sidebar
  2. Click the gear icon
  3. 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

  1. Open Continue chat panel
  2. Use @ to reference files or MCP tools
  3. 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 an agentic AI IDE whose Cascade execution engine natively orchestrates Model Context Protocol (stdio and Streamable HTTP) servers alongside built-in codebase indexing. Because Cascade maintains a live abstract syntax tree (AST) index of your open workspace, adding external MCP servers—such as PostgreSQL, GitHub, Sentry, or Notion—lets Cascade correlate runtime production telemetry and database schemas directly with your local source files during multi-file refactoring sessions. For a comprehensive architectural comparison of AI coding assistants, see our AI Assistant Comparison guide.

Step 1: Open Windsurf Settings

  1. Open Windsurf and launch the Cascade sidebar (Cmd+L on macOS or Ctrl+L on Windows/Linux).
  2. Click the Configure MCP (Hammer/Plug icon) in the top-right corner of the Cascade panel, or press Cmd+, (Ctrl+, on Windows) and navigate to Cascade → MCP Servers.
  3. Click “View raw config” to edit ~/.codeium/windsurf/mcp_config.json directly with full syntax highlighting.

Step 2: Add MCP Configuration

Windsurf uses the exact same mcpServers JSON schema as Claude Desktop and Cursor, making it effortless to port your server definitions across IDEs:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/projects"]
    }
  }
}

Step 3: Using MCP in Windsurf

Once saved, click the Refresh button inside the Cascade MCP toolbar so Windsurf spawns the server process and registers its JSON Schema tools (typically within 1.5 to 3 seconds). You can then invoke tools directly in Cascade chat:

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

  1. Open ChatGPT settings
  2. Navigate to Advanced Settings
  3. Enable Developer Mode (rolling out for paid accounts)

Step 2: Add MCP Connector

  1. Go to Settings → Connectors → Create
  2. 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 over HTTPS using the Streamable HTTP transport:

Connection HopProtocol & Security RequirementOperational Role
1. ChatGPT Browser / Desktop ClientOutbound HTTPS (TLS 1.3) + OAuth 2.1 Authorization Code with PKCE (S256)Sends JSON-RPC 2.0 tools/call requests from OpenAI’s orchestration runtime
2. Remote MCP Server EndpointStreamable HTTP (POST /mcp & GET /mcp) + RFC 9728 /.well-known/oauth-protected-resourceValidates OAuth bearer tokens, enforces rate limits, and executes tool handlers
3. Backend Data & Enterprise ServicesPrivate VPC peering, IAM role assumption, or scoped service tokensQueries internal PostgreSQL/MongoDB databases, SaaS APIs, or cloud infrastructure

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

  1. Open Deep Research mode or Use Connectors tool
  2. Ask a question that requires your MCP server
  3. Verify the server responds correctly

Microsoft Copilot Configuration (New in 2025)

Microsoft integrated native Model Context Protocol support across both GitHub Copilot in VS Code (Agent Mode) and Microsoft Copilot Studio / Microsoft 365 Copilot as a founding member of the Linux Foundation’s Agentic AI Foundation. This dual-tier architecture allows individual software engineers to run local stdio or workspace-scoped MCP servers inside VS Code (.vscode/mcp.json) while allowing enterprise IT administrators to publish governed, Entra ID (formerly Azure AD) authenticated remote MCP connectors across thousands of Microsoft 365 seats.

Copilot in VS Code

GitHub Copilot Agent Mode in VS Code (v1.99+) reads MCP server definitions directly from your workspace .vscode/mcp.json or user settings.json without requiring third-party wrapper extensions:

  1. Ensure you have the latest GitHub Copilot and GitHub Copilot Chat extensions installed in VS Code.
  2. Create a .vscode/mcp.json file in your repository root (or run MCP: Add Server from the Command Palette Cmd+Shift+P).
  3. Switch the Copilot Chat mode dropdown to Agent so Copilot can autonomously discover and invoke your configured MCP tools with per-call confirmation prompts.

Copilot for Enterprise

For Microsoft 365 Copilot and Copilot Studio in enterprise environments, governance and identity federation are managed centrally:

  1. IT administrators register remote Streamable HTTP MCP servers as custom connectors inside Microsoft Copilot Studio or the Microsoft 365 Admin Center.
  2. Authentication is enforced through Microsoft Entra ID OAuth 2.1 with single sign-on (SSO) and conditional access policies, ensuring AI agents only access data permitted by the signed-in user’s RBAC role.
  3. Every tool invocation is logged in Microsoft Purview for compliance auditing and data loss prevention (DLP).

Note: Microsoft Copilot’s MCP implementation is designed for enterprise scenarios with proper governance.


Google Gemini Configuration (New in December 2025)

Google joined the Agentic AI Foundation in December 2025 and launched both local MCP support in the Gemini CLI / IDX / Android Studio developer tools and fully managed remote MCP servers across Google Cloud and Vertex AI Agent Builder. Rather than forcing users to manage local Node.js processes or raw OAuth client credentials on their laptops, Google Cloud exposes managed Streamable HTTP MCP endpoints backed directly by Google Cloud IAM and Workspace OAuth 2.1 scopes.

Google Cloud MCP Servers

Google provides hosted MCP servers and native Vertex AI Agent Builder integrations for their core cloud and productivity services:

  1. Enable MCP in Google AI Studio, Vertex AI Agent Builder, or Gemini Enterprise settings.
  2. Connect to Google services directly via pre-built managed endpoints:
    • Google Drive & Google Docs: Search, summarize, and draft workspace documents with zero local file syncing.
    • BigQuery: Execute natural-language-to-SQL analytical queries with automatic dry-run byte-scanned cost estimation.
    • Cloud Storage & Cloud Run: Inspect bucket objects, deployment logs, and service health metrics.

Configuration Example

In Gemini / Google AI Studio settings:
1. Navigate to Integrations → MCP Servers
2. Select from available Google Cloud MCP services (or paste a custom Streamable HTTP MCP URL)
3. Authorize access via Google OAuth 2.1 with least-privilege IAM scopes
4. Start invoking tools directly in Gemini conversations

Benefits of Google’s Approach

FeatureDescription
No local setupServers run on Google Cloud with sub-50ms regional latency
Unified authUses your Google Workspace / Cloud IAM identity with OAuth 2.1
Managed scalingAutomatic serverless resource management and rate-limit protection
Enterprise-readyIntegrates with Google Workspace DLP and Cloud Audit Logs

Managing Multiple MCP Servers

How Many Servers Can You Run?

There’s no hard limit, but consider:

Usage LevelRecommendation
Personal3-5 active servers
Professional5-10 servers
EnterpriseUse Docker/container management

Resource Considerations

Each local stdio MCP server runs as an isolated OS child process spawned by your AI host:

Active Process in Host TreeRuntime EngineTypical Idle / Active MemoryContext Window Overhead
Filesystem Server (@modelcontextprotocol/server-filesystem)Node.js stdio child process~45MB – 55MB RAM~1,450 tokens (14 tools)
GitHub Server (@modelcontextprotocol/server-github)Node.js / Go stdio child process~50MB – 65MB RAM~2,800 tokens (20+ tools)
PostgreSQL Server (@modelcontextprotocol/server-postgres)Node.js stdio child process~45MB – 55MB RAM~450 tokens (query + schema resources)
Memory Server (@modelcontextprotocol/server-memory)Node.js stdio child process~55MB – 70MB RAM~1,100 tokens (9 knowledge graph tools)
Combined 4-Server Developer Stack4 independent child processes~210MB total RAM~5,800 tokens per conversation

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 onlyCommit config to git with keys
Use minimal permission scopesUse admin/full-access tokens
Rotate keys regularlyShare keys between tools
Use read-only tokens when possibleUse 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:

ServerToken LocationRequired Scopes
GitHubSettings → Developer → Personal Access Tokensrepo, read:org
NotionMy IntegrationsRead/write content
SlackCreate App → OAuthchannels:read, chat:write
Firecrawlfirecrawl.devN/A (account key)

Troubleshooting Common Issues

Issue 1: Server Not Appearing

Symptoms: MCP icon doesn’t show, servers not listed

Causes & Solutions:

CauseSolution
JSON syntax errorValidate with jsonlint.com
Didn’t restart appCompletely quit and reopen
Wrong config pathDouble-check file location
File permissionsEnsure 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:

CauseSolution
Node.js not installedInstall Node.js v18+
PATH not set correctlyAdd Node to PATH
Using wrong shellMake 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:

CauseSolution
Server crashedCheck logs for errors
Wrong argumentsReview server documentation
Port conflictClose conflicting apps

Issue 4: Permission Denied

Symptoms: Server runs but operations fail

Causes & Solutions:

CauseSolution
Path not allowedAdd path to server args
File permissionsCheck OS-level permissions
Token permissionsAdd required scopes

Issue 5: Rate Limiting

Symptoms: Operations work then fail

Causes & Solutions:

CauseSolution
API limits hitAdd delays between operations
Too many requestsReduce active servers
Token limitsUpgrade 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

PlatformClaude DesktopCursor
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:

ArticleWhat You’ll Learn
Building Your First MCP ServerCreate custom servers
GitHub MCP GuideMaster GitHub integration
Filesystem MCP GuideDeep dive into file access
PostgreSQL MCP GuideQuery databases with AI

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.

Frequently Asked Questions

Where is the Claude Desktop MCP config file located?

On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows: %APPDATA%/Claude/claude_desktop_config.json. On Linux: ~/.config/Claude/claude_desktop_config.json. Create the file if it doesn't exist.

Can I run multiple MCP servers at once?

Yes! You can configure as many MCP servers as you need. Each server runs as a separate process. For best performance, stick to 3-5 active servers for personal use.

How do I update MCP servers?

If using npx, servers auto-update on restart. For globally installed servers, run 'npm update -g @package-name'. For uvx Python servers, run 'uvx --upgrade package-name'.

Why isn't my MCP server showing up?

Common causes: 1) JSON syntax error in config, 2) Didn't restart the AI app, 3) Server command not found (Node.js not installed), 4) Path issues. Check the troubleshooting section for detailed solutions.

Are MCP servers secure?

Yes, MCP servers run locally on your machine with sandboxed permissions. You control exactly what each server can access. Always review server permissions and use official or verified servers.

Can I use MCP with ChatGPT?

Yes! As of 2025, OpenAI added native MCP support to ChatGPT. Enable Developer Mode in ChatGPT settings, then configure your MCP servers via Settings → Connectors. OAuth authentication is required.

Do I need Node.js to run MCP servers?

For local servers, most require Node.js (v18+) or Python 3.10+. In 2025, remote/hosted MCP servers are also available from providers like Google Cloud, which require no local setup.

How do I pass API keys to MCP servers?

Use the 'env' block in your server configuration to pass environment variables like API keys. Never commit these keys to version control.

Written by Rajesh Praharaj

Product Leader & AI Builder

Product leader and AI builder focused on practical LLM systems, Model Context Protocol (MCP) integrations, agentic workflows, and free browser-based tools for product & engineering teams.

Was this page helpful?

Let us know if you found what you were looking for.