# Cursor MCP: How to Add an MCP Server to Cursor

[Muhammad Shakil](https://skryvo.ai/about/) · Founder of Skryvo

October 22, 2026 · 6 min read

**In this guide**

1. [What is an MCP server in Cursor?](https://skryvo.ai/blog/cursor-mcp/#what-is-an-mcp-server-in-cursor)
2. [Where is the Cursor MCP config file?](https://skryvo.ai/blog/cursor-mcp/#where-is-the-cursor-mcp-config-file)
3. [How do I add an MCP server to Cursor?](https://skryvo.ai/blog/cursor-mcp/#how-do-i-add-an-mcp-server-to-cursor)
4. [How do I keep API keys out of mcp.json?](https://skryvo.ai/blog/cursor-mcp/#how-do-i-keep-api-keys-out-of-mcp-json)
5. [How do I sign in to a remote MCP server in Cursor?](https://skryvo.ai/blog/cursor-mcp/#how-do-i-sign-in-to-a-remote-mcp-server-in-cursor)
6. [Does Cursor ask before running MCP tools?](https://skryvo.ai/blog/cursor-mcp/#does-cursor-ask-before-running-mcp-tools)
7. [Can I use MCP servers in the Cursor CLI?](https://skryvo.ai/blog/cursor-mcp/#can-i-use-mcp-servers-in-the-cursor-cli)
8. [Why is my MCP server not working in Cursor?](https://skryvo.ai/blog/cursor-mcp/#why-is-my-mcp-server-not-working-in-cursor)
9. [A worked example: posting from Cursor](https://skryvo.ai/blog/cursor-mcp/#a-worked-example-posting-from-cursor)

Share [X](https://twitter.com/intent/tweet?text=Cursor%20MCP%3A%20How%20to%20Add%20an%20MCP%20Server%20to%20Cursor&url=https%3A%2F%2Fskryvo.ai%2Fblog%2Fcursor-mcp%2F) [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fskryvo.ai%2Fblog%2Fcursor-mcp%2F) [Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fskryvo.ai%2Fblog%2Fcursor-mcp%2F)

Checked against Cursor's docs on October 22, 2026.

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](https://cursor.com/docs/mcp), 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.

Skryvo writes posts and articles in your brand's voice and publishes them for you. [Start for $0](https://skryvo.ai/signup/) 7 days free, no card needed

## 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](https://cursor.com/docs/cli/mcp):

```
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](https://skryvo.ai/agents/cursor/) has the details. The same server works in Codex (see [how to add MCP servers to Codex](https://skryvo.ai/blog/codex-mcp/)), in Claude as a [connector](https://skryvo.ai/blog/claude-connectors/), and in the other agents on [the agents page](https://skryvo.ai/agents/).

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

Other clients: [VS Code MCP](https://skryvo.ai/blog/vscode-mcp/), [Gemini CLI MCP](https://skryvo.ai/blog/gemini-cli-mcp/).

## Do this in Skryvo

- [Cursor MCP server for social media](https://skryvo.ai/agents/cursor/)
- [Add MCP servers to Codex](https://skryvo.ai/blog/codex-mcp/)
- [MCP connectors for every AI agent](https://skryvo.ai/agents/)

About the author

### [Muhammad Shakil](https://skryvo.ai/about/) Founder 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.

[LinkedIn](https://www.linkedin.com/in/flutterdeveloper1/) [X](https://x.com/MShakilAwan3) [Full bio](https://skryvo.ai/about/) [All articles](https://skryvo.ai/blog/)

Read Skryvo often? [Add Skryvo as a preferred source on Google](https://www.google.com/preferences/source?q=skryvo.ai) and our articles are more likely to show up for you.

## Keep reading

[All guides](https://skryvo.ai/blog/)

AI Agents · 7 min read

### [Best Social Media MCP Servers and Connectors (2026)](https://skryvo.ai/blog/best-social-media-mcp-servers/)

Seven social media MCP servers and connectors compared from their own docs: Buffer, Metricool, Postiz, Zernio, Blotato, Ayrshare and Skryvo, by channels, sign-in, price, approval.

AI Agents · 8 min read

### [Perplexity MCP: Official Server, URL, Pricing and Setup](https://skryvo.ai/blog/perplexity-mcp/)

Perplexity MCP both ways: its official server in Claude Code, Cursor, Claude Desktop and Docker, what each tool runs on, and adding MCP connectors to Perplexity.

AI Agents · 7 min read

### [Claude Code MCP: How to Add MCP Servers (claude mcp add)](https://skryvo.ai/blog/claude-code-mcp/)

Add MCP servers to Claude Code with claude mcp add, pick the right scope, share .mcp.json with a team, sign in with /mcp and fix timeouts.

## Turn ideas like these into posts

Skryvo writes posts and articles in your brand's voice and publishes them to your channels, from the app or your AI agent.

[Start for $0](https://skryvo.ai/signup/) [See how it works](https://skryvo.ai/features/)

- 7 days free, no card needed
