Cursor provides both a JSON config file (.cursor/mcp.json) and a Settings UI for MCP server management. The JSON file is where you add, edit, and remove servers. The Settings UI (Cursor Settings > MCP tab) shows connection status, tool counts, and error details. This tutorial covers advanced configuration including environment variables, server-specific arguments, transport options, and troubleshooting using the Settings UI indicators.
Master MCP Configuration in Cursor
While basic MCP setup in Cursor requires just a few lines of JSON, there is more to effective configuration. Cursor's Settings UI provides real-time connection monitoring, tool discovery, and error reporting. Understanding the full configuration surface — including global vs project settings, environment variable management, and transport options — helps you build a reliable MCP setup that works across projects and team members.
Prerequisites
- Cursor installed (version 0.45 or later)
- At least one MCP server configured (see 'How to Connect MCP to Cursor')
- Familiarity with JSON configuration files
Step-by-step guide
Open the MCP Settings tab in Cursor
Open the MCP Settings tab in Cursor
Open Cursor Settings with Cmd+, (macOS) or Ctrl+, (Windows/Linux). Navigate to the MCP tab in the settings sidebar. This tab shows all configured MCP servers with their connection status (green for connected, red for disconnected/error), the number of tools each server exposes, and any error messages. This is your primary dashboard for MCP monitoring.
Expected result: The MCP Settings tab shows your configured servers with connection status indicators.
Understand the connection status indicators
Understand the connection status indicators
Each server in the MCP tab has a status indicator. Green means the server is running and the MCP handshake completed successfully. Yellow may indicate the server is starting up. Red means the server failed to start or the connection was lost. Click on a server to expand its details, which shows the number of tools discovered, the server version, and any error messages.
Expected result: You can interpret the connection status of each server and identify problematic ones.
Configure project-level servers with .cursor/mcp.json
Configure project-level servers with .cursor/mcp.json
The primary configuration file for project-specific MCP servers is .cursor/mcp.json in your project root. This file is loaded when Cursor opens the project. You can commit it to git to share the MCP setup with your team. The full configuration supports command, args, env, and cwd fields.
1// .cursor/mcp.json — full configuration options2{3 "mcpServers": {4 "my-server": {5 "command": "npx",6 "args": ["-y", "tsx", "src/index.ts"],7 "env": {8 "API_KEY": "your-api-key",9 "DEBUG": "true"10 },11 "cwd": "/absolute/path/to/server/directory"12 }13 }14}Expected result: Project-level MCP configuration with all available fields.
Configure global servers with ~/.cursor/mcp.json
Configure global servers with ~/.cursor/mcp.json
For servers you want available in every project, create ~/.cursor/mcp.json in your home directory. Global servers are merged with project-level servers. If both define the same server name, the project-level config takes priority. Use global config for personal utility servers like filesystem, search, or memory.
1// ~/.cursor/mcp.json — global config2{3 "mcpServers": {4 "filesystem": {5 "command": "npx",6 "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you"]7 },8 "memory": {9 "command": "npx",10 "args": ["-y", "@modelcontextprotocol/server-memory"]11 },12 "brave-search": {13 "command": "npx",14 "args": ["-y", "@modelcontextprotocol/server-brave-search"],15 "env": {16 "BRAVE_API_KEY": "your-key"17 }18 }19 }20}Expected result: Global servers are available across all Cursor projects.
Connect to remote HTTP servers
Connect to remote HTTP servers
For remote MCP servers using Streamable HTTP transport, use the url field instead of command and args. This connects to servers running on another machine or in the cloud. You can also add headers for authentication.
1{2 "mcpServers": {3 "remote-server": {4 "url": "https://mcp.your-company.com/api"5 },6 "authenticated-remote": {7 "url": "https://mcp.example.com/api",8 "headers": {9 "Authorization": "Bearer your-token"10 }11 }12 }13}Expected result: Remote MCP servers are configured and Cursor connects via HTTP.
Troubleshoot connection issues using the Settings UI
Troubleshoot connection issues using the Settings UI
When a server shows red/disconnected status in the MCP tab, click on it to see the error details. Common issues and their solutions: 'Command not found' means the command path is wrong or not in PATH. 'Connection refused' means the server crashed on startup. 'Timeout' means the server took too long to respond to the initialization handshake. For persistent issues, test the server command in your terminal first, then test with MCP Inspector.
1# Test the server command directly in terminal2npx -y @modelcontextprotocol/server-filesystem /Users/you/projects3# If this fails, the command is wrong45# Test with MCP Inspector for detailed protocol debugging6npx -y @modelcontextprotocol/inspector npx -y @modelcontextprotocol/server-filesystem /Users/you/projectsExpected result: You can identify and fix connection issues using the Settings UI indicators and terminal testing.
Complete working example
1{2 "mcpServers": {3 "filesystem": {4 "command": "npx",5 "args": [6 "-y",7 "@modelcontextprotocol/server-filesystem",8 "/Users/you/projects"9 ]10 },11 "github": {12 "command": "docker",13 "args": [14 "run", "-i", "--rm",15 "-e", "GITHUB_PERSONAL_ACCESS_TOKEN",16 "ghcr.io/github/github-mcp-server"17 ],18 "env": {19 "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token"20 }21 },22 "postgres": {23 "command": "npx",24 "args": ["-y", "@modelcontextprotocol/server-postgres"],25 "env": {26 "POSTGRES_CONNECTION_STRING": "postgresql://user:pass@localhost:5432/mydb"27 }28 },29 "custom-server": {30 "command": "npx",31 "args": ["-y", "tsx", "src/index.ts"],32 "cwd": "/Users/you/projects/my-mcp-server",33 "env": {34 "API_KEY": "your-key",35 "NODE_ENV": "development"36 }37 },38 "remote-api": {39 "url": "https://mcp.example.com/api"40 }41 }42}Common mistakes when configuring MCP servers in Cursor settings
Why it's a problem: Editing config without restarting Cursor
How to avoid: Cursor reads MCP config at startup. After any changes to .cursor/mcp.json, use Cmd+Shift+P > Developer: Reload Window or fully restart Cursor.
Why it's a problem: Putting secrets in project-level config committed to git
How to avoid: If your team shares .cursor/mcp.json via git, do not include API keys directly. Use environment variable references, or add secrets only to the global ~/.cursor/mcp.json which is never committed.
Why it's a problem: Not checking the MCP Settings tab for errors
How to avoid: When servers are not working, the MCP tab in Settings shows specific error messages. This is faster than guessing — always check the Settings UI first.
Why it's a problem: Using relative paths in the cwd field
How to avoid: The cwd field must be an absolute path. Relative paths resolve unpredictably based on how Cursor was launched. Always use /absolute/path/to/directory.
Best practices
- Check Cursor Settings > MCP tab after every config change to verify connections
- Use project-level .cursor/mcp.json for project-specific servers committed to git
- Use global ~/.cursor/mcp.json for personal utility servers
- Keep secrets out of git-committed config files — use global config or environment variables
- Use the cwd field when servers need a specific working directory for relative path resolution
- Test server commands in your terminal before adding them to Cursor config
- Use MCP Inspector for protocol-level debugging when the Settings UI error is not sufficient
- Restart Cursor after config changes — the Developer: Reload Window command is the fastest way
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
Explain all the MCP configuration options available in Cursor, including .cursor/mcp.json fields (command, args, env, cwd, url), the global config at ~/.cursor/mcp.json, and how to use the Settings UI MCP tab for monitoring and debugging.
Help me configure MCP in Cursor with advanced options. I have a custom server that needs a specific working directory and environment variables, a remote HTTP server, and shared global servers. Show the complete configuration files for both project and global levels.
Frequently asked questions
Can I edit MCP configuration from Cursor's Settings UI?
The Settings UI MCP tab is primarily for monitoring (viewing connection status, tool counts, errors). Configuration is done by editing the JSON file directly. The tab may provide a link to open the config file in the editor.
What is the priority order for MCP configurations?
Project-level .cursor/mcp.json takes priority over global ~/.cursor/mcp.json. If both define a server with the same name, the project-level config wins.
Can I disable a server without removing it from the config?
There is no built-in 'disabled' flag. To temporarily disable a server, you can rename it (e.g., add a '_disabled' suffix) or comment it out if using a JSON-with-comments parser. The cleanest approach is to remove the entry and re-add it later.
Does Cursor have a tool limit like Windsurf?
Cursor does not have the same hard 100-tool limit as Windsurf. However, having too many tools can slow down the AI's tool selection process. Keep your server list focused on what you actually need.
Can RapidDev help configure Cursor MCP for our team?
Yes. RapidDev helps teams create standardized .cursor/mcp.json configurations, build custom MCP servers for internal tools, and set up secure credential management that works across the team.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation