Cursor uses MCP (Model Context Protocol) servers to give its agent tools beyond your code: a database, a browser, your docs, a publishing tool. You describe each server once in an mcp.json file, and the editor and the Cursor CLI both use it.

The short version: add the server to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for every project) under "mcpServers", with a command for a local server or a url for a remote one. Turn it on in Customize in the sidebar, sign in if it uses OAuth, and check the MCP Logs output if it does not start. Everything below is from Cursor's MCP documentation, checked October 22, 2026.

What is an MCP server in Cursor?

An MCP server exposes tools that Cursor's agent can call while it works. Cursor supports three ways to reach one:

  • stdio: a local process Cursor starts from a shell command, for one user.
  • Streamable HTTP: a local or remote server at a URL, with OAuth sign-in.
  • SSE: the older URL-based transport, also local or remote with OAuth.

Cursor supports MCP tools, prompts, resources, roots and elicitation, and tools can return images, which are attached to the chat.

Where is the Cursor MCP config file?

  • Project: .cursor/mcp.json in the project folder, for tools only that project needs. Commit it and your team gets the same servers.
  • Global: ~/.cursor/mcp.json in your home folder, for tools you want everywhere.

How do I add an MCP server to Cursor?

Servers that Cursor lists install with one click: open Customize in the sidebar, choose the server and click Add to Cursor, then sign in. For any other server, add it to mcp.json. A local server takes a command:

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"],
      "env": { "API_KEY": "value" }
    }
  }
}

A remote server takes a URL, plus headers if it uses a fixed token instead of OAuth:

{
  "mcpServers": {
    "skryvo": {
      "url": "https://api.skryvo.ai/mcp"
    }
  }
}

Save the file and the server appears in Customize, where you can switch it on or off. A server that is off does not load and does not show in chat.

How do I keep API keys out of mcp.json?

Cursor fills in variables in command, args, env, url and headers, so the file can name a secret without containing it:

"headers": { "Authorization": "Bearer ${env:MY_SERVICE_TOKEN}" }

The other variables are ${userHome}, ${workspaceFolder}, ${workspaceFolderBasename} and ${pathSeparator} (or ${/}). A local server can also read an envFile such as ".env"; remote servers cannot. This matters most for a project mcp.json you commit: put ${env:...} in the file and the key in each person's environment.

How do I sign in to a remote MCP server in Cursor?

Most remote servers use OAuth and Cursor handles it: when the server asks for sign-in, Cursor opens the service's own consent page. If the provider gives you a fixed client ID or does not support dynamic registration, add an auth object with CLIENT_ID (and CLIENT_SECRET or scopes if needed) to the server's entry. The redirect address to register with the provider is http://localhost:8787/callback for the desktop app and https://www.cursor.com/agents/mcp/oauth/callback for Cursor on the web.

Does Cursor ask before running MCP tools?

Yes, by default. Cursor asks for approval before it calls an MCP tool, and the arrow beside the tool name shows the arguments it is about to send. MCP tools follow the same run modes as terminal commands, so in auto-review mode only tools you allowlisted run without asking. Keep tools that post, send or delete on approval: reading can be automatic, writing should wait for you.

Can I use MCP servers in the Cursor CLI?

Yes. The CLI reads the same mcp.json as the editor, looking in the project, then the global file. From Cursor's CLI documentation:

agent mcp list                  # browse, enable and configure servers
agent mcp list-tools skryvo     # show a server's tools and parameters
agent mcp login skryvo          # sign in to a server from mcp.json
agent mcp disable skryvo        # turn a server off

Why is my MCP server not working in Cursor?

  • Read the logs. Open the Output panel (Cmd+Shift+U on Mac) and choose MCP Logs; it shows startup, each tool call and the errors.
  • Check it is switched on. A server that is off in Customize does not load at all.
  • Check the file. Servers must sit inside "mcpServers", and a missing comma stops the whole file from loading.
  • Update a stuck npm server by removing it in Customize, running npm cache clean --force, and adding it again.

One broken server shows an error in chat; the others keep working.

A worked example: posting from Cursor

Add the skryvo entry above, sign in when Cursor asks, and try "Write a LinkedIn post about the feature I just merged and schedule it for Tuesday at 9am." Cursor drafts it in your brand's voice, shows it, and schedules it only after you approve the tool call; the Cursor setup page has the details. The same server works in Codex (see how to add MCP servers to Codex), in Claude as a connector, and in the other agents on the agents page.

Put shared servers in the project file, personal ones in the global file, and keep every secret behind ${env:...}.

About the author
Photo of Muhammad Shakil

Muhammad ShakilFounder of Skryvo

I wrote this myself. I have built mobile apps and websites for companies in the US and Europe since 2022, and I built Skryvo after one too many AI drafts fell apart the moment someone checked a fact. Everything I publish here is tested on my own work first, and I show the numbers, including the ones that did not go my way.

Let your agent write the next one in your voice

Skryvo drafts each post in your saved voice and publishes it after your go-ahead. Free to start.

Start free