Cursor MCP Setup (2026): mcp.json, OAuth, Permissions & 20+ Examples
Nikhil Tiwari
MCP Playground
β Quick Answer
Cursor IDE MCP config file location: Cursor reads MCP servers from ~/.cursor/mcp.json for global servers (available in every project) and .cursor/mcp.json inside a project folder for project-scoped servers.
# macOS / Linux (global)
~/.cursor/mcp.json
# Windows (global)
%USERPROFILE%\.cursor\mcp.json
# Per-project (any OS)
<project-root>/.cursor/mcp.json
Want to verify the server works before adding it to Cursor? Use the free MCP tester β paste your URL and check tools/list in seconds.
π TL;DR - Quick Setup
- Open Cursor Settings β Tools & MCP
- Click "Add new MCP server"
- Fill in: Name, Type, URL (or command), and Headers
- Click Install β Restart Cursor
Cursor has built-in support for the Model Context Protocol (MCP), so its agent can call tools from your own servers: databases, GitHub, browsers, internal APIs. This guide shows how to set them up, from the Settings UI or straight in mcp.json.
Updated November 2026. Cursor changed how it loads MCP config this year: project and global files now merge, variables work in more fields, remote servers can use OAuth, and a separate permissions.json controls which tools run without asking. Those changes are in the new section below.
Why Use MCP in Cursor?
With MCP servers, Cursor's AI can:
Prerequisites
Method 1: Add via Cursor Settings UI
Step 1: Open MCP Settings
Cmd + , β Tools & MCP
Ctrl + , β Tools & MCP
Step 2: Fill in Server Details
Click "Add new MCP server" and fill in the form:
| Field | Description | Example |
|---|---|---|
| Name | A unique identifier for your server | github, supabase |
| Type | Connection type for the server | command or streamableHttp |
| Command/URL | The command to run or HTTP endpoint | npx -y @modelcontextprotocol/server-github |
| Headers | Authentication headers (for HTTP type) | Authorization: Api-Key your_key |
Step 3: Click Install & Restart
After filling in the details, click Install. Then restart Cursor completely for changes to take effect.
β
Tip: For HTTP-based servers, use streamableHttp type. For local CLI servers, use command type.
Method 2: Configure via JSON File
For project-specific servers or bulk configuration, create a .cursor/mcp.json file in your project root:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/folder"]
}
}
}
π File Location: <project-root>/.cursor/mcp.json β This method is great for sharing MCP configs with your team via version control.
What Changed in Cursor MCP Config in 2026
If you set Cursor up earlier in the year, these are the behaviours to know about. All of them are in Cursorβs MCP docs.
Project and global configs merge, and the project wins
Cursor reads both ~/.cursor/mcp.json and .cursor/mcp.json and merges them. If the same server name appears in both, the project file takes priority.
That is handy for overriding a global server per repo. It is also a common source of βmy change did nothingβ: check the project file before you edit the global one.
Variables in command, args, env, url and headers
You can use ${env:NAME}, ${userHome} and ${workspaceFolder} instead of hardcoding paths and secrets. That keeps tokens out of a config you commit.
{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": { "Authorization": "Bearer ${env:GITHUB_TOKEN}" }
},
"notes": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "${workspaceFolder}/docs"]
}
}
}
For stdio servers there is also an envFile option, which loads variables from a file. It does not apply to remote URL servers.
OAuth for remote servers
Remote servers that use OAuth can take an auth object with a client ID, an optional client secret and optional scopes. Cursor recommends passing the credentials through environment variables.
If you leave scopes out, Cursor reads scopes_supported from the serverβs /.well-known/oauth-authorization-server metadata. If that metadata is wrong, the login will fail. My MCP OAuth guide covers what the server side has to publish.
permissions.json decides which tools run without asking
A separate permissions.json file lists MCP tools that may run without approval, as server:tool entries with wildcards. When it defines an allowlist, it overrides the allowlist in Cursor Settings.
Keep destructive tools, such as delete or deploy, off that list. See the permissions.json reference for the format.
Cloud Agents work differently
- Hosted Cloud Agents do not read
~/.cursor/mcp.json. Configure servers for them separately. - When servers expose more tools than a model accepts, Cloud Agents cap the tools they send.
- The Cloud Agent allowlist also governs MCP servers loaded from the agent ownerβs settings.
- A self-hosted agent worker now runs URL servers from
~/.cursor/mcp.jsononlocalhost,127.0.0.1or[::1].
Large servers cost context in every client, not just Cloud Agents. MCP context bloat and tool search covers how to trim them.
One-click install links
If you publish an MCP server, Cursor supports install links that add it to a userβs config in one click. Test the server before you share the link.
Check the server before you blame Cursor
Paste your MCP server URL, list its tools and call them. Free, in the browser.
Test any MCP server free βPopular Cursor MCP Configurations
Here are ready-to-use configurations for both UI and JSON methods:
HTTP-based MCP Server Example
For servers that use HTTP/SSE transport (like many cloud-hosted MCP servers):
Restart & Verify
β οΈ Important: You must completely quit and reopen Cursor after installing a server. MCP servers only load at startup.
Verify MCP Connection
To check if your MCP servers are working:
- Open the Cursor chat (
Cmd+Lon Mac,Ctrl+Lon Windows) - Ask Claude: "What MCP tools do you have available?"
- You should see tools from your configured servers listed
β Success: If configured correctly, you'll see the server listed under "Installed MCP Servers" in Settings β Tools & MCP.
Using MCP Tools in Cursor
Once configured, simply ask Claude to use the tools naturally:
Example Prompts
- "Read the README file from my GitHub repo"
- "Query the users table in my Supabase database"
- "Take a screenshot of https://example.com"
Troubleshooting
β MCP server not appearing +
- Verify your JSON syntax is valid (use a JSON validator)
- Make sure you completely restarted Cursor
- Check that Node.js is installed:
node --version
β "Command not found" error +
Use the full path to npx. Find it with:
which npx # macOS/Linux
where npx # Windows
β Tools not working properly +
- Verify API keys/tokens are correct
- Check that the API key has required permissions
- Test the server with MCP Playground first
Ready to test your MCP servers?
Frequently Asked Questions
Where does Cursor store MCP config? +
~/.cursor/mcp.json (global) or .cursor/mcp.json (per project). You can also manage servers from the UI via Settings β Tools & MCP. The format is the same as Claude Desktop's claude_desktop_config.json.
Can I use the same config as Claude Desktop? +
mcpServers object, so stdio servers copy across as they are. Remote servers differ: Cursor takes a url with optional headers or an auth object, while Claude Desktop adds remote servers as connectors.
How many MCP servers can I add? +
Do MCP servers work with all Cursor features? +
permissions.json run without asking. They are not used by Tab autocomplete.
Written by Nikhil Tiwari
15+ years in product development. AI enthusiast building developer tools that make complex technologies accessible to everyone.
Free MCP Tools (no install)
Build, compare & ship MCP agents
Connect any MCP server, run evals on it, compare 90+ models side-by-side, deploy hosted servers, and save reusable agents you can export as an API β all in your browser.