Back to Blog
Getting StartedJan 12, 2026Updated Nov 298 min read

Cursor MCP Setup (2026): mcp.json, OAuth, Permissions & 20+ Examples

NT

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

  1. Open Cursor Settings β†’ Tools & MCP
  2. Click "Add new MCP server"
  3. Fill in: Name, Type, URL (or command), and Headers
  4. 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:

πŸ—„οΈ Database Access Query external databases and APIs
πŸ“ File Management Read/write files beyond workspace
πŸ”— Service Integrations GitHub, Notion, Slack, and more
🎭 Browser Automation Playwright for testing & scraping

Prerequisites

⚑
Cursor IDE v1.0 or later
🟒
Node.js 18+ For npm servers
🐍
Python 3.10+ For Python servers

Method 1: Add via Cursor Settings UI

Step 1: Open MCP Settings

🍎 macOS
Cmd + , β†’ Tools & MCP
πŸͺŸ Windows
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.json on localhost, 127.0.0.1 or [::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:

πŸ™ GitHub Integration Repos, Issues, PRs

UI Form Values

  • Name: github
  • Type: streamableHttp
  • URL: https://api.githubcopilot.com/mcp/
  • Headers: Authorization: Bearer ghp_your_token

GitHub's official MCP server is now hosted remotely β€” the old @modelcontextprotocol/server-github npm package is no longer maintained.

JSON Config (.cursor/mcp.json)

"github": {
 "url": "https://api.githubcopilot.com/mcp/",
 "headers": { "Authorization": "Bearer ghp_your_token" }
}
⚑ Supabase Database Database, Auth, Storage

UI Form Values

  • Name: supabase
  • Type: command
  • Command: npx -y @supabase/mcp-server-supabase@latest
  • Env: SUPABASE_URL=https://xxx.supabase.co

JSON Config (.cursor/mcp.json)

"supabase": {
 "command": "npx",
 "args": ["-y", "@supabase/mcp-server-supabase@latest"],
 "env": { 
 "SUPABASE_URL": "https://xxx.supabase.co", 
 "SUPABASE_SERVICE_ROLE_KEY": "xxx" 
 }
}
🎭 Playwright Browser Automation

UI Form Values

  • Name: playwright
  • Type: command
  • Command: npx -y @playwright/mcp@latest

JSON Config (.cursor/mcp.json)

"playwright": {
 "command": "npx",
 "args": ["-y", "@playwright/mcp@latest"]
}

HTTP-based MCP Server Example

For servers that use HTTP/SSE transport (like many cloud-hosted MCP servers):

🌐 HTTP Server Example streamableHttp type

UI Form Values

  • Name: my-cloud-server
  • Type: streamableHttp
  • URL: https://api.example.com/mcp
  • Headers: Authorization: Api-Key your_api_key

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:

  1. Open the Cursor chat (Cmd+L on Mac, Ctrl+L on Windows)
  2. Ask Claude: "What MCP tools do you have available?"
  3. 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 stores MCP configuration in ~/.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? +
Mostly. Both use an 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? +
There is no fixed limit on servers. Each stdio server runs as its own process, and every tool definition costs context. Models accept a limited number of tools, and Cloud Agents cap the tools they send, so expose only what you use.
Do MCP servers work with all Cursor features? +
MCP tools are used by Cursor’s agent in chat, whichever model you pick, and the agent calls them when they are relevant. Tools listed in permissions.json run without asking. They are not used by Tab autocomplete.
NT

Written by Nikhil Tiwari

15+ years in product development. AI enthusiast building developer tools that make complex technologies accessible to everyone.

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.

Try for Free β†’