title: "How to Install and Use MCPs in Cursor IDE" description: "Step-by-step guide to connect and run MCP servers from Cursor IDE with troubleshooting tips." slug: "cursor-setup" category: "ide" updatedAt: "2025-09-21T00:00:00.000Z" ogImage: "/og/docs-cursor.png" faqs:
- q: "Does Cursor support multiple MCP servers at once?" a: "Yes. You can register multiple servers; ensure ports/paths do not conflict."
- q: "Why can't Cursor see my local MCP server?" a: "Check that the server process is running, firewall allows local ports, and the config path matches."
How to Install and Use MCPs in Cursor IDE
Overview
Cursor IDE provides excellent support for Model Context Protocol servers, allowing you to extend your AI coding experience with custom tools and integrations. This guide walks you through the complete setup process.
Requirements
Before setting up MCPs in Cursor, ensure you have:
- Cursor IDE installed (latest version recommended)
- Node.js 18+ or Python 3.8+ (depending on your MCP server)
- Claude Desktop or MCP Inspector (optional, for testing)
- Basic familiarity with JSON configuration files
Installation
Step 1: Install MCP Server
First, install your desired MCP server. For this example, we'll use the filesystem MCP:
# Using npm
npm install -g @modelcontextprotocol/server-filesystem
# Using uvx (Python)
uvx install mcp-server-filesystem
Step 2: Configure Cursor
Create or edit your Cursor configuration file:
macOS/Linux:
~/.cursor/mcp_servers.json
Windows:
%APPDATA%\Cursor\mcp_servers.json
Add your MCP server configuration:
{
"mcpServers": {
"filesystem": {
"command": "node",
"args": ["/path/to/mcp-server-filesystem/dist/index.js"],
"env": {
"MCP_SERVER_NAME": "filesystem"
}
}
}
}
Step 3: Restart Cursor
After saving the configuration, restart Cursor IDE to load the new MCP server.
Configuration
Advanced Configuration
For more complex setups, you can configure multiple servers:
{
"mcpServers": {
"filesystem": {
"command": "node",
"args": ["/path/to/mcp-server-filesystem/dist/index.js"],
"env": {
"MCP_SERVER_NAME": "filesystem"
}
},
"github": {
"command": "uvx",
"args": ["mcp-server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_token_here"
}
}
}
}
Environment Variables
Set up environment variables for secure configuration:
# Add to your shell profile (.bashrc, .zshrc, etc.)
export GITHUB_PERSONAL_ACCESS_TOKEN="your_token_here"
export OPENAI_API_KEY="your_openai_key"
Connect to Claude Desktop
To test your MCP setup with Claude Desktop:
- Open Claude Desktop
- Go to Settings → Developer
- Add the same MCP server configuration
- Restart Claude Desktop
- Test MCP functionality in a conversation
Common Tasks
List Available Tools
Once configured, you can ask Cursor's AI to show available MCP tools:
Show me what MCP tools are available
File Operations
Use the filesystem MCP to perform file operations:
Create a new file called "example.txt" with sample content
GitHub Integration
With the GitHub MCP configured:
Show me the latest issues in my repository
Troubleshooting
Connection Refused
If you see "connection refused" errors:
- Check server process: Ensure the MCP server is running
- Verify paths: Confirm all file paths in configuration are correct
- Check permissions: Ensure Cursor has permission to execute the server
- Port conflicts: Make sure no other process is using the same port
Server Not Found
If Cursor can't find your MCP server:
- Verify installation: Check that the MCP server is properly installed
- Check PATH: Ensure the server executable is in your system PATH
- Absolute paths: Use absolute paths in your configuration
- Node.js version: Ensure you're using a compatible Node.js version
Permission Denied
For permission-related issues:
- File permissions: Check that configuration files are readable
- Execution permissions: Ensure MCP server files are executable
- Directory access: Verify Cursor can access the configuration directory
Configuration Not Loading
If your configuration isn't being loaded:
- JSON syntax: Validate your JSON configuration file
- File location: Ensure the config file is in the correct location
- Restart required: Always restart Cursor after configuration changes
- Case sensitivity: Check for case-sensitive path issues on Linux/macOS
Related Guides
- MCPs in VSCode - Complete Setup Guide
- Running MCPs in Windsurf IDE
- Connecting MCPs in Claude Desktop (Mac & Windows)
- 10 Most Common MCP Setup Errors (and Fixes)
FAQ
Does Cursor support multiple MCP servers at once?
Yes. You can register multiple servers in your configuration file. Just ensure that ports and paths don't conflict between different servers.
Why can't Cursor see my local MCP server?
This usually happens when:
- The server process isn't running
- Firewall is blocking local connections
- Configuration path doesn't match the actual server location
- Environment variables aren't properly set
How do I update an MCP server?
To update an MCP server:
- Stop Cursor IDE
- Update the server using your package manager (npm, uvx, etc.)
- Update configuration if needed
- Restart Cursor IDE
Can I use custom MCP servers?
Absolutely! You can use any MCP server that follows the Model Context Protocol specification. Just point to the correct executable in your configuration.
Was this guide helpful?
Last updated: September 21, 2025
Edit this page: cursor-setup/page.mdx