Skip to main content
RapidDev - Software Development Agency
mcp-tutorial

How to use MCP with AI coding assistants

MCP works with all major AI coding assistants: Cursor (.cursor/mcp.json, mcpServers key), VS Code + Copilot (.vscode/mcp.json, servers key), Windsurf (~/.codeium/windsurf/mcp_config.json, mcpServers key), Claude Code (claude mcp add command), and Cline (cline_mcp_settings.json). The same MCP servers work across all tools — only the configuration format differs. This guide shows the setup for each tool side by side, so you can use the same servers everywhere.

What you'll learn

  • How to configure MCP in each major AI coding assistant
  • The configuration differences between Cursor, VS Code, Windsurf, Claude Code, and Cline
  • How to maintain consistent MCP setups across multiple tools
  • Which AI coding assistants have the best MCP support
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner7 min read12 min readCursor, VS Code, Windsurf, Claude Code, ClineMarch 2026RapidDev Engineering Team
TL;DR

MCP works with all major AI coding assistants: Cursor (.cursor/mcp.json, mcpServers key), VS Code + Copilot (.vscode/mcp.json, servers key), Windsurf (~/.codeium/windsurf/mcp_config.json, mcpServers key), Claude Code (claude mcp add command), and Cline (cline_mcp_settings.json). The same MCP servers work across all tools — only the configuration format differs. This guide shows the setup for each tool side by side, so you can use the same servers everywhere.

One Protocol, Many AI Coding Tools

MCP's greatest strength is portability: build one server, use it everywhere. But 'everywhere' means different configuration files and formats for each AI coding assistant. This overview guide shows you the MCP setup for every major AI coding tool in one place, making it easy to maintain consistent configurations across your toolchain. Whether you use Cursor for daily coding, VS Code for team projects, and Claude Desktop for research, the same MCP servers power all of them.

Prerequisites

  • At least one AI coding assistant installed (Cursor, VS Code, Windsurf, or Claude Code)
  • An MCP server to configure (e.g., Filesystem server for testing)
  • Basic familiarity with JSON configuration files

Step-by-step guide

1

Set up MCP in Cursor

Cursor uses .cursor/mcp.json in your project root for project-level config, or ~/.cursor/mcp.json for global config. The top-level key is mcpServers. Cursor has the most mature MCP support among IDE-based tools, with real-time connection monitoring in the Settings > MCP tab. Tools are available in both Chat (Cmd+L) and Composer (Cmd+I) agent mode.

typescript
1// .cursor/mcp.json
2{
3 "mcpServers": {
4 "filesystem": {
5 "command": "npx",
6 "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
7 },
8 "github": {
9 "command": "docker",
10 "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"],
11 "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_token" }
12 }
13 }
14}

Expected result: MCP tools are available in Cursor's Chat and Composer modes.

2

Set up MCP in VS Code with GitHub Copilot

VS Code uses .vscode/mcp.json in your project root. The critical difference: VS Code uses 'servers' as the top-level key, NOT 'mcpServers'. Each entry also includes a 'type' field (usually 'stdio'). MCP tools are available in Copilot's agent mode. You can also configure via .vscode/settings.json under the 'mcp' key.

typescript
1// .vscode/mcp.json — note: 'servers' NOT 'mcpServers'
2{
3 "servers": {
4 "filesystem": {
5 "type": "stdio",
6 "command": "npx",
7 "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
8 },
9 "github": {
10 "type": "stdio",
11 "command": "docker",
12 "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"],
13 "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_token" }
14 }
15 }
16}

Expected result: MCP tools are available in Copilot's agent mode within VS Code.

3

Set up MCP in Windsurf

Windsurf uses a global config file at ~/.codeium/windsurf/mcp_config.json. The key is mcpServers (like Cursor). Windsurf does NOT support project-level MCP config — all servers are global. The most important limitation: Windsurf enforces a hard 100-tool limit across all connected servers.

typescript
1// ~/.codeium/windsurf/mcp_config.json
2{
3 "mcpServers": {
4 "filesystem": {
5 "command": "npx",
6 "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
7 },
8 "github": {
9 "command": "docker",
10 "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"],
11 "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_token" }
12 }
13 }
14}

Expected result: MCP tools are available in Windsurf's Cascade AI assistant.

4

Set up MCP in Claude Code CLI

Claude Code uses CLI commands for MCP management. Use claude mcp add to register servers, claude mcp list to see them, and claude mcp remove to disconnect. Config is stored in .mcp.json (project scope) or globally (user scope with -s user). Claude Code can also edit .mcp.json directly.

typescript
1# Add servers via CLI
2claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /Users/you/projects
3claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_token -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
4
5# List configured servers
6claude mcp list
7
8# Resulting .mcp.json:
9# {
10# "mcpServers": {
11# "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"] },
12# "github": { "command": "docker", "args": [...], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_token" } }
13# }
14# }

Expected result: MCP tools are available during Claude Code coding sessions.

5

Set up MCP in Cline (VS Code extension)

Cline is a popular VS Code extension for autonomous AI coding. It has its own MCP configuration separate from VS Code's native MCP support. Cline stores MCP config in cline_mcp_settings.json, accessible from Cline's settings panel. The format uses mcpServers like Cursor.

typescript
1// Cline MCP settings (via Cline settings panel)
2{
3 "mcpServers": {
4 "filesystem": {
5 "command": "npx",
6 "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
7 },
8 "github": {
9 "command": "docker",
10 "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"],
11 "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_token" }
12 }
13 }
14}

Expected result: MCP tools are available in Cline's autonomous coding workflow.

6

Create a reference cheat sheet for all tools

Keep this reference handy for configuring MCP across all your AI coding assistants. The server definitions are identical — only the file location and top-level key change. For organizations using multiple AI tools, RapidDev helps standardize MCP configurations and build shared server infrastructure.

typescript
1// MCP Configuration Quick Reference:
2//
3// Tool | Config File | Key | Project-level?
4// --------------|------------------------------------------------|---------------|---------------
5// Cursor | .cursor/mcp.json | mcpServers | Yes
6// VS Code | .vscode/mcp.json | servers | Yes
7// Windsurf | ~/.codeium/windsurf/mcp_config.json | mcpServers | No (global only)
8// Claude Desktop| ~/Library/Application Support/Claude/claude_desktop_config.json | mcpServers | N/A
9// Claude Code | .mcp.json (or claude mcp add) | mcpServers | Yes
10// Cline | cline_mcp_settings.json (via settings) | mcpServers | Yes

Expected result: You have a quick reference for MCP configuration across all AI coding tools.

Complete working example

mcp-config-all-tools.md
1# MCP Configuration for All AI Coding Assistants
2# Same filesystem + GitHub servers configured for each tool
3
4## Cursor (.cursor/mcp.json)
5```json
6{
7 "mcpServers": {
8 "filesystem": {
9 "command": "npx",
10 "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
11 },
12 "github": {
13 "command": "docker",
14 "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"],
15 "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_token" }
16 }
17 }
18}
19```
20
21## VS Code (.vscode/mcp.json)
22```json
23{
24 "servers": {
25 "filesystem": {
26 "type": "stdio",
27 "command": "npx",
28 "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
29 },
30 "github": {
31 "type": "stdio",
32 "command": "docker",
33 "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"],
34 "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_token" }
35 }
36 }
37}
38```
39
40## Windsurf (~/.codeium/windsurf/mcp_config.json)
41```json
42{
43 "mcpServers": {
44 "filesystem": {
45 "command": "npx",
46 "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
47 },
48 "github": {
49 "command": "docker",
50 "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"],
51 "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_token" }
52 }
53 }
54}
55```
56
57## Claude Code (CLI commands)
58```bash
59claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /Users/you/projects
60claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_token -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
61```

Common mistakes when using MCP with AI coding assistants

Why it's a problem: Using the same config key for all tools

How to avoid: VS Code uses 'servers' while Cursor, Windsurf, Claude Desktop, Claude Code, and Cline all use 'mcpServers'. Always check which key your specific tool expects.

Why it's a problem: Expecting project-level config in Windsurf

How to avoid: Windsurf only reads the global config at ~/.codeium/windsurf/mcp_config.json. It does not support project-level .windsurf/mcp.json or similar.

Why it's a problem: Not restarting the tool after config changes

How to avoid: All AI coding assistants cache MCP config at startup. After editing any config file, restart the tool or reload the window. Cursor and VS Code support Developer: Reload Window.

Why it's a problem: Committing API keys to git in project-level config files

How to avoid: Project-level configs (.cursor/mcp.json, .vscode/mcp.json, .mcp.json) may be committed to git. Keep secrets in global configs or use environment variable references instead of hardcoded values.

Best practices

  • Keep a reference of which config key each tool uses (servers vs mcpServers)
  • Use project-level configs for project-specific servers (shared via git)
  • Use global configs for personal utility servers (filesystem, search, memory)
  • Store API keys in global configs only — never in project-level configs committed to git
  • Test servers with MCP Inspector before configuring in any AI tool
  • Always include -y in npx commands across all tool configurations
  • Restart the AI tool after every config change to pick up new servers
  • For Windsurf, plan around the 100-tool limit when adding servers

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

Show me how to configure the same MCP servers (filesystem and GitHub) in Cursor, VS Code, Windsurf, and Claude Code. For each tool, show the exact config file location, the JSON format with the correct top-level key, and how to verify the connection.

MCP Prompt

I use Cursor and VS Code on different projects. Help me set up the same MCP servers in both. Show the config files side by side and highlight the differences (mcpServers vs servers key). Include filesystem and Brave Search servers.

Frequently asked questions

Which AI coding assistant has the best MCP support?

As of March 2026, Cursor has the most mature MCP support with real-time connection monitoring, project-level and global configs, and seamless tool integration in both Chat and Composer modes. Claude Desktop (not an IDE but a general AI host) was the first MCP host and remains the reference implementation.

Can I share MCP config across Cursor and VS Code?

Not directly — they use different config files and key names. But the server entries themselves are nearly identical. You can maintain a template and generate tool-specific configs. Some teams use scripts to sync configs across tools.

Does GitHub Copilot in VS Code support all MCP features?

Copilot supports MCP tools in agent mode. Resource and prompt support may be more limited compared to Claude Desktop or Cursor. Check the latest VS Code release notes for current MCP feature coverage.

Which tool should I use if I only want one?

For daily coding with MCP, Cursor offers the best balance of AI capabilities and MCP integration. For non-coding AI tasks, Claude Desktop provides the broadest MCP feature support including resources and prompts.

Can RapidDev help standardize MCP across our team's tools?

Yes. RapidDev helps teams create consistent MCP configurations across Cursor, VS Code, Windsurf, and Claude Desktop, including custom servers for internal tools, secure credential management, and onboarding documentation.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.