Clients & Integrations
Pillar Guide

MCP in Cursor, VS Code & Other IDEs: Complete Setup Guides

Step-by-step setup guides for using MCP servers in Cursor, VS Code, Windsurf, Zed, and other AI-powered IDEs.

24 min read
Updated February 25, 2026
By MCP Server Spot

The Model Context Protocol is not limited to Claude Desktop. MCP servers work with a growing ecosystem of AI-powered IDEs including Cursor, VS Code (via GitHub Copilot), Windsurf, and Zed. This means the same MCP server you build once can provide tools to any AI assistant that supports the protocol.

This guide provides complete, step-by-step setup instructions for each major IDE, a comparison of their MCP capabilities, and best practices for managing configurations across tools and teams.

For Claude Desktop and Claude Code configuration, see our dedicated guide: How to Connect MCP Servers to Claude Desktop & Claude Code.

Cursor: Native MCP Integration

Cursor is a fork of VS Code built specifically for AI-assisted development. It has the most mature MCP integration among code editors, with tools accessible in both Composer (multi-file editing) and Chat modes.

Configuration

Create .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/you/projects/my-app"
      ]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxx"
      }
    },
    "database": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_CONNECTION_STRING": "postgresql://localhost:5432/mydb"
      }
    }
  }
}

Global Configuration

For servers you want available in all projects, configure them in Cursor's global settings:

  1. Open Cursor Settings (Cmd/Ctrl + ,)
  2. Navigate to Features > MCP
  3. Click Add Server
  4. Enter the server configuration

Global servers are stored in Cursor's settings directory and are available regardless of which project is open.

Using MCP Tools in Cursor

Once configured, MCP tools are available in Cursor's AI features:

In Composer mode:

When you ask Cursor's AI to perform a task, it automatically considers available MCP tools. For example, with a GitHub MCP server connected:

"Create a new branch called 'feature/auth-update' and open a draft PR with a description of the authentication changes I've made."

Cursor will use the GitHub server's create_branch and create_pull_request tools.

In Chat mode:

Ask questions that require tool usage:

"What are the open issues labeled 'bug' in our repository?"

Cursor will call the GitHub server's list_issues tool and display the results inline.

Cursor MCP Status

Check server status in Cursor Settings > Features > MCP. Each server shows:

  • Connected (green): Server is running and tools are available
  • Error (red): Server failed to start -- check the error message
  • Starting (yellow): Server is initializing

If a server shows an error, click it to see the error details. Common issues include missing executables, incorrect paths, and dependency errors.

Cursor MCP Best Practices

  1. Use project-level config (.cursor/mcp.json) for project-specific servers
  2. Use global config for universal servers (GitHub, general-purpose tools)
  3. Commit .cursor/mcp.json to version control (excluding secrets)
  4. Use environment variables for API keys:
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

VS Code: GitHub Copilot + MCP

VS Code supports MCP through its GitHub Copilot agent mode. This integration allows Copilot to use MCP tools during chat sessions.

Prerequisites

  • VS Code 1.99+ (or VS Code Insiders)
  • GitHub Copilot extension (latest version)
  • GitHub Copilot Chat extension

Configuration

Create .vscode/mcp.json in your project root:

{
  "servers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "${workspaceFolder}"
      ]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxx"
      }
    }
  }
}

Note: VS Code uses servers as the top-level key (not mcpServers), and supports the ${workspaceFolder} variable for project-relative paths.

Alternative: settings.json Configuration

You can also configure MCP servers in VS Code's settings.json:

{
  "github.copilot.chat.mcp.servers": {
    "weather": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/weather-server",
        "run",
        "server.py"
      ]
    }
  }
}

Enabling MCP in Copilot

  1. Open the Copilot Chat panel
  2. Switch to Agent mode (look for the mode selector at the top of the chat panel)
  3. MCP tools appear alongside Copilot's built-in tools

In Agent mode, Copilot can use MCP tools to:

  • Read and modify files through filesystem servers
  • Query databases through database servers
  • Interact with APIs through custom servers
  • Execute code through sandbox servers

Using Tools in VS Code

In the Copilot Chat panel (Agent mode):

"Query the database for all users created in the last 7 days and summarize the results."

Copilot will use the PostgreSQL MCP server's query tool to fetch the data and provide a summary.

Windsurf (by Codeium): MCP Setup

Windsurf is an AI-first code editor by Codeium that supports MCP through its Cascade AI feature.

Configuration

Windsurf uses a configuration file at ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/you/projects"
      ]
    },
    "custom-server": {
      "command": "python",
      "args": ["/path/to/server.py"],
      "env": {
        "API_KEY": "your-key"
      }
    }
  }
}

Using MCP in Windsurf

Windsurf's Cascade AI feature uses MCP tools during:

  • Flow mode: Multi-step coding tasks where Cascade can call tools to gather context, run tests, and make changes
  • Chat mode: Direct questions that require tool calls
  • Inline editing: Context-aware suggestions that use MCP resources

After adding a server to the configuration, restart Windsurf. You can verify the connection in Windsurf's settings under the MCP section.

Zed: MCP Integration

Zed is a high-performance code editor with built-in AI features. It supports MCP servers through its assistant configuration.

Configuration

Add MCP servers to Zed's settings.json (accessible via Zed > Settings > Open Settings):

{
  "assistant": {
    "version": "2",
    "mcp_servers": {
      "filesystem": {
        "command": "npx",
        "args": [
          "-y",
          "@modelcontextprotocol/server-filesystem",
          "/Users/you/projects"
        ]
      },
      "postgres": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-postgres"],
        "env": {
          "POSTGRES_CONNECTION_STRING": "postgresql://localhost:5432/mydb"
        }
      }
    }
  }
}

Using MCP in Zed

  1. Open Zed's AI Assistant panel
  2. Connected MCP servers and their tools appear automatically
  3. Ask the assistant to perform tasks that use your configured tools

Zed currently supports stdio transport for local servers. Remote SSE server support is in development.

IDE Comparison Table

FeatureCursorVS Code + CopilotWindsurfZed
MCP SupportNative, matureVia Copilot Agent modeVia Cascade AIBuilt-in
Config File.cursor/mcp.json.vscode/mcp.json~/.codeium/windsurf/mcp_config.jsonsettings.json
Config KeymcpServersserversmcpServersassistant.mcp_servers
Stdio TransportYesYesYesYes
SSE TransportYesYesYesIn development
Tool ApprovalYes, per-callYes, per-callYesYes
Global ConfigSettings panelsettings.jsonConfig filesettings.json
Project Config.cursor/mcp.json.vscode/mcp.jsonNot yetNot yet
Multi-File EditingComposer + MCPAgent mode + MCPFlow mode + MCPLimited
Tool VisibilitySettings > MCPOutput panelSettings > MCPAssistant panel
env Variablesenv fieldenv fieldenv fieldenv field
Variable Expansion${var}${workspaceFolder}LimitedLimited

Common Configuration Patterns

Pattern 1: Full-Stack Development Setup

For web application development, configure servers for your entire stack:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_CONNECTION_STRING": "postgresql://localhost:5432/app_dev"
      }
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
      }
    },
    "browser": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-server-playwright"]
    }
  }
}

Pattern 2: Data Science / ML Setup

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "./data", "./notebooks"]
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_CONNECTION_STRING": "${DATABASE_URL}"
      }
    },
    "jupyter": {
      "command": "uv",
      "args": ["--directory", "/path/to/jupyter-server", "run", "server.py"]
    }
  }
}

Pattern 3: DevOps / Infrastructure

{
  "mcpServers": {
    "aws": {
      "command": "npx",
      "args": ["-y", "mcp-server-aws"],
      "env": {
        "AWS_PROFILE": "production",
        "AWS_REGION": "us-east-1"
      }
    },
    "kubernetes": {
      "command": "npx",
      "args": ["-y", "mcp-server-kubernetes"],
      "env": {
        "KUBECONFIG": "${HOME}/.kube/config"
      }
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

Managing Secrets Across IDEs

The challenge with MCP configuration is that it often contains API keys and other secrets. Here are strategies for keeping them secure:

Strategy 1: Environment Variable References

Most IDEs support environment variable expansion in configurations:

{
  "mcpServers": {
    "github": {
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

Set the actual value in your shell profile (~/.zshrc, ~/.bashrc):

export GITHUB_TOKEN="ghp_xxxxxxxxxxxx"

Strategy 2: gitignore with Templates

  1. Create mcp.json.example with placeholder values (committed):
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "REPLACE_WITH_YOUR_TOKEN"
      }
    }
  }
}
  1. Add the actual config to .gitignore:
.cursor/mcp.json
.vscode/mcp.json
  1. Each developer copies the example and fills in their credentials.

Strategy 3: Setup Script

Create a script that generates configurations from environment variables:

#!/bin/bash
# scripts/setup-mcp.sh

cat > .cursor/mcp.json << EOF
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
      }
    },
    "database": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_CONNECTION_STRING": "${DATABASE_URL}"
      }
    }
  }
}
EOF

echo "MCP configuration generated at .cursor/mcp.json"

What to Read Next

Summary

MCP server support is expanding rapidly across the IDE ecosystem. Cursor leads with the most mature integration, VS Code offers MCP through GitHub Copilot's agent mode, and Windsurf and Zed provide growing support. The configuration format is similar across all editors -- a JSON file with server entries specifying commands, arguments, and environment variables.

The key advantage of MCP's standardized protocol is that you build your server once and it works everywhere. Whether your team uses Cursor, VS Code, Windsurf, or a mix of editors, the same MCP servers provide the same tools and resources. Focus on building excellent servers, and let the editors handle the integration.

Frequently Asked Questions

Does Cursor support MCP servers natively?

Yes, Cursor has native MCP support. You configure servers in a .cursor/mcp.json file in your project directory or in Cursor's global settings. Cursor supports both local (stdio) and remote (SSE) MCP servers and exposes their tools to Cursor's AI features including Composer and Chat.

How do I configure MCP in VS Code?

VS Code supports MCP through extensions and the GitHub Copilot agent mode. Create a .vscode/mcp.json file in your project with server configurations. VS Code's Copilot agent can then use tools from connected MCP servers. Make sure you have the latest version of the GitHub Copilot extension installed.

What is the difference between MCP in Cursor vs Claude Desktop?

Cursor integrates MCP into a code editor with features like inline editing, codebase awareness, and multi-file editing. Claude Desktop is a standalone chat interface. Cursor's MCP usage is coding-focused (editing files, running tests, searching code), while Claude Desktop is more general-purpose. Both use the same MCP protocol and can connect to the same servers.

Does Windsurf (Codeium) support MCP?

Yes, Windsurf supports MCP servers through its Cascade AI feature. Configure servers in Windsurf's MCP settings panel or through a configuration file. Windsurf can use MCP tools during AI-assisted coding sessions, including its Flow mode for multi-step coding tasks.

Can I use the same MCP server in multiple IDEs simultaneously?

For local stdio servers, each IDE starts its own server process, so they run independently. For remote SSE servers, multiple clients can connect to the same server URL simultaneously. There are no conflicts because each client maintains its own session.

How do I use MCP in Zed editor?

Zed supports MCP through its AI assistant feature. Configure MCP servers in Zed's settings.json file under the assistant.mcp_servers key. Zed supports stdio transport for local servers. Restart Zed after adding server configurations.

Can I share MCP configurations across my team?

Yes, project-level configuration files (.cursor/mcp.json, .vscode/mcp.json) can be committed to version control. Use environment variable references for secrets so each team member can set their own API keys. This ensures everyone has the same server setup without exposing credentials.

Which IDE has the best MCP support?

As of early 2026, Cursor has the most mature and feature-rich MCP integration, with deep tool usage in Composer mode. Claude Code (terminal) has excellent MCP support for CLI workflows. VS Code is rapidly improving MCP support through GitHub Copilot agents. Windsurf and Zed offer growing but more basic MCP integration.

Can I use MCP servers with JetBrains IDEs (IntelliJ, PyCharm, WebStorm)?

JetBrains IDEs have been adding AI capabilities through their AI Assistant plugin. MCP support is emerging through community plugins and JetBrains' own integrations. Check the JetBrains Marketplace for the latest MCP plugins. The configuration typically mirrors the JSON-based approach used by other IDEs.

How do I debug MCP server issues in my IDE?

Most IDEs provide MCP server status information in their settings or status panels. Check if the server shows as 'connected' or 'error'. For Cursor, check the MCP panel in settings. For VS Code, check the Output panel for MCP-related logs. You can also test servers independently with the MCP Inspector before configuring them in your IDE.

Related Articles

Related Guides