AI

How Do You Connect MCP to Cursor?

Add an MCP server to Cursor via mcp.json. Learn the remote Server config, transports, tool approval, and how to keep API keys out of your repo.

cursormcpmcp.jsonsetupdeveloper tools

Connecting MCP to Cursor means adding a server to Cursor's mcp.json, after which the agent can call that server's tools while you work. Cursor supports MCP natively and can manage servers from its Customize page or a config file (Cursor).

Which Transport Should You Use?

Cursor supports three transports, and the choice determines where the server runs and how it authenticates:

Transport Runs Users Auth
stdio Locally, Cursor manages it Single user Manual (env vars)
SSE Local or remote Multiple OAuth
Streamable HTTP Local or remote Multiple OAuth / headers

For a shared service that several people or cloud agents use, pick a remote transport. For a personal tool on your machine, stdio is simplest.

The pull toward shared remote servers is structural. Gartner projects that 33% of enterprise software applications will include agentic AI by 2028, up from less than 1% in 2024 (Gartner).

How Do You Configure a Remote Server?

Add an entry under mcpServers in mcp.json:

{
  "mcpServers": {
    "your-server": {
      "url": "https://example.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_KEY" }
    }
  }
}

Cursor accepts config interpolation, so you can reference environment variables instead of hardcoding secrets — for example "Authorization": "Bearer ${env:MY_SERVICE_TOKEN}". Cursor resolves variables in command, args, env, url, and headers.

Should You Use Project or Global Config?

  • Project config — .cursor/mcp.json in the repository. Scoped to that project.
  • Global config — ~/.cursor/mcp.json in your home directory. Available everywhere.

Project configs are convenient and dangerous: they are easy to commit. A live API key in a shared repository is a leak. Prefer the global config for anything with a secret, or use environment-variable interpolation and keep the secret in your shell profile.

Cursor's own security guidance is explicit: verify the source, review permissions, limit API keys to the minimum, and audit the code for critical integrations.

How Does Tool Approval Work?

Cursor asks for approval before using MCP tools by default, and it follows the same run modes as terminal commands. In more permissive modes, allowlisted tools can run without a prompt.

That default is a feature, not friction. Developers are already delegating heavily — 51% of professional developers use AI tools daily, per Stack Overflow's 2025 survey — which is exactly why approval gates matter for actions that change state (Stack Overflow). For a server that can post content, keep approval on until you trust the workflow.

How Do You Debug a Failing Server?

Cursor isolates server failures, so one bad server will not take down the others. To diagnose:

  1. Open the Output panel and select MCP Logs from the dropdown.
  2. Look for connection errors, authentication failures, or crashes.
  3. Toggle the server off and on from Customize to force a reload.

If a server times out on a tool call, the likely cause is a synchronous long-running action. Well-designed servers return an ID and let the agent poll status instead of blocking.

A Note on Remote Servers

Remote MCP servers are what make MCP usable beyond a single developer's machine. Cloudflare frames the shift as moving "from desktop software to web-based software": the same server can serve an IDE, a chat client, and cloud agents, each authenticating separately (Cloudflare).

How Conbersa Works With Cursor

The Conbersa MCP server is a remote Streamable HTTP server, so it slots into Cursor as a remote entry with an Authorization header. Once connected, Cursor can post media across accounts, run engagement, and manage schedules on a fleet of real phones between code tasks. See Connect Cursor to Conbersa.

Neil Ruaro
Founder, Conbersa

We run agentic distribution on a fleet of real phones — and write up what we learn helping founders escape the cold start. Got a topic you want covered? Tell us.

FAQ

Frequently asked questions

Add an entry to Cursor's mcp.json under mcpServers. For a remote server, provide the URL and any headers it needs, such as an Authorization bearer token. Save the file, then enable or verify the server from Cursor's Customize page. Cursor discovers the server's tools automatically once it connects.
Cursor reads a project-level config at .cursor/mcp.json and a global config at ~/.cursor/mcp.json. Project config gives tools scoped to one repository; global config makes them available everywhere. Secrets should live in the global file or in environment variables, never committed to a shared project config.
Cursor supports stdio for local servers, and SSE and Streamable HTTP for remote servers. Remote servers are the right choice when multiple people or cloud agents need to use the same server with shared authentication. Local stdio servers suit single-user tools that must run on your own machine.
The Conbersa Blog

New guides, straight to your inbox.

Tactics on organic distribution and the cold-start problem. What's actually working, no fluff.