How to Use MCP Servers with Cursor
Cursor added native MCP support, making it one of the most powerful AI-assisted code editors available. With MCP servers running inside Cursor, the AI composer can read your files, query your database, open pull requests on GitHub, and run tests — all without leaving your editor. This guide walks you through the complete setup in under 10 minutes.
Before you start
- Cursor version 0.43 or later (check via Cursor → About Cursor)
- Node.js 18+ installed (run
node --versionto check) - At least one MCP server to install — this guide uses the filesystem server as an example
Step-by-step setup
Open Cursor Settings
In Cursor, open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and search for "Cursor Settings", or navigate to File → Preferences → Cursor Settings. Look for the "MCP" section in the left-hand sidebar.
Add an MCP server
Click "Add new MCP server". Cursor uses a JSON config format similar to Claude Desktop. Paste in the server name, command, and any arguments or environment variables. For example, to add the filesystem server, set command to "npx" and args to ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"].
Save and verify
Save the settings. Cursor will attempt to start the server immediately. A green dot next to the server name means it connected successfully. If you see a red dot, check that Node.js is installed and the command is correct.
Use tools in Cursor Composer
Open Cursor Composer (Cmd+I / Ctrl+I) and start a new conversation. Cursor automatically makes the MCP server's tools available. You can ask the AI to use a specific tool, or just describe what you want — Cursor will decide which tools to call.
Example Cursor MCP config
Cursor stores MCP config in ~/.cursor/mcp.json (Mac/Linux) or %USERPROFILE%\.cursor\mcp.json (Windows). You can also edit this file directly:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/projects"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
}
}
}
}Cursor vs Claude Desktop: key differences
Looking for the right MCP servers to add?
Browse 1,000+ servers organised by category and install them in minutes.
Browse All MCP Servers