BestMCPServers

How to Install MCP Servers in Cursor

A complete step-by-step guide to configuring MCP servers in Cursor IDE. Covers the config file location, format differences from Claude Desktop, and working examples you can copy.

Does Cursor Support MCP?

Yes. Cursor added MCP support in version 0.45+. However, there are two important caveats: (1) MCP tools only work in Agent mode, not in regular Chat mode. (2) The configuration format is slightly different from Claude Desktop. This guide covers both.

Where to Add MCP Server Configuration in Cursor

Cursor reads MCP configuration from a JSON file. The location depends on your operating system:

macOS / Linux

~/.cursor/mcp.json

Windows

%USERPROFILE%\.cursor\mcp.json

Some Cursor versions also support a project-level config at .cursor/mcp.json inside your project root. To verify which config is active, open Cursor Settings → MCP.

Step-by-Step Installation

Step 1 — Open Cursor Settings

Open Cursor and navigate to Settings. You can use the keyboard shortcut Cmd + , (macOS) or Ctrl + , (Windows/Linux). In the Settings panel, look for the MCP section to confirm your version supports it.

Step 2 — Add MCP Server Config

Create or edit the mcp.json file. The format is similar to Claude Desktop but uses a top-level mcpServers key. Here is a working example with the Filesystem server:

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

Important difference from Claude Desktop: Cursor's mcp.json does not support the env key at the server level in all versions. If you need environment variables (e.g., for GitHub or Brave Search), set them in your shell profile or use a wrapper script.

Step 3 — Restart Cursor / Reload Agent

After saving the config file, reload the Cursor window with Cmd + R (macOS) or Ctrl + R (Windows/Linux). Then open Agent mode with Cmd + I or Ctrl + I.

Step 4 — Verify the Server Is Active

In Agent mode, ask Cursor to list available tools. A simple prompt like "What tools do you have access to?" should return the tools exposed by your configured MCP servers. If the server does not appear, check the Output panel → MCP for error messages.

Example: Installing the Filesystem MCP Server

The Filesystem server is the best starting point because it requires no API keys. Add this to your mcp.json:

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

Replace /Users/you/projects with the actual directory you want Cursor to access. You can add multiple directories by including more entries in the args array.

Example: Installing the GitHub MCP Server

The GitHub server requires a personal access token. Because Cursor's mcp.json may not support inline env vars, export the token in your shell before launching Cursor:

# macOS/Linux — add to ~/.zshrc or ~/.bashrc
export GITHUB_PERSONAL_ACCESS_TOKEN="ghp_xxxxxxxx"

# Then restart Cursor from the terminal:
open -a Cursor  # macOS

Then add the server to mcp.json:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"]
    }
  }
}

Cursor-Specific Limitations to Know

Agent mode only

MCP tools are not available in Chat mode. You must use Agent mode (Cmd/Ctrl + I) for the AI to invoke external tools.

Environment variable handling

Not all Cursor versions support the env key inside mcp.json. Export variables in your shell profile as a workaround.

PATH inheritance

On some platforms, Cursor does not inherit your shell's PATH. If npx is not found, use the absolute path (e.g., /usr/local/bin/npx).

Troubleshooting

"Failed to connect to MCP server"

Check the MCP output panel in Cursor for the exact error. Common causes: npx not in PATH, invalid JSON syntax, or the server package is not installed globally.

Tools not showing in Agent mode

Ensure you are actually in Agent mode (the input box should say "Agent"). Also verify the config file is at the correct path and Cursor has reloaded since your last edit.

Frequently Asked Questions

What Cursor version do I need for MCP support?

MCP support was introduced in Cursor 0.45+. Make sure you are on the latest version. MCP tools only work in Agent mode, not in Chat mode.

Where is the MCP config file in Cursor?

Cursor looks for ~/.cursor/mcp.json (macOS/Linux) or %USERPROFILE%.cursormcp.json (Windows). Some versions also support a project-level .cursor/mcp.json file. Check Cursor Settings → MCP to see the active config path.

Why does my MCP server work in Claude but not in Cursor?

The most common reason is path handling differences. Cursor may not inherit your shell's PATH on all platforms. Try using the absolute path to npx or node in the command field. Also verify you are in Agent mode — MCP tools do not run in regular Chat.

Can I use the same MCP servers in Cursor and Claude Desktop?

Yes. The servers themselves are identical — they speak the same Model Context Protocol. Only the configuration location and format differ. Claude uses claude_desktop_config.json; Cursor uses mcp.json.

Do MCP servers work in Cursor's Chat mode or only Agent mode?

MCP servers only work in Agent mode. In Chat mode, Cursor does not invoke external tools. Switch to Agent mode (Cmd/Ctrl + I) to use MCP capabilities.

Ready to add more servers? Browse our full MCP server directory to find browser, database, web, and communication servers compatible with Cursor.