How do you add an MCP server in Cursor?
Add an MCP server to Cursor in one of two ways: install it from the Cursor Marketplace through the Customize page, or write it into an mcp.json file. Use .cursor/mcp.json in a project for servers that belong to that repository, and ~/.cursor/mcp.json for servers you want everywhere. Cursor asks before running MCP tools unless you change its Run Mode.
Cite
CodeLifter Forum, "How do you add an MCP server in Cursor?", https://codelifter.com/forum/posts/how-do-you-add-an-mcp-server-in-cursor/, accessed 2026-11-25.- CodeLifter editorsStaffStaff, CodeLifter ·
Where does Cursor read MCP servers from?
Cursor's MCP documentation names two configuration files and a graphical route:
Route Location Use it for Project configuration .cursor/mcp.jsonin the repositoryServers tied to one project, which you can commit for the team Global configuration ~/.cursor/mcp.jsonin your home folderPersonal servers you want in every project Marketplace Customize page Official plugins with one-click install and OAuth sign-in Teams can also distribute servers centrally: the same page describes Team MCP servers under the dashboard's Plugins and MCPs section, and team marketplaces that make them installable from Customize.
How do you add a local server?
Local servers use the
stdiotransport: Cursor starts the program and talks to it over standard input and output. The docs list the fields:type("stdio"),command("Must be available on your system path or contain its full path"), optionalargs,envandenvFile. A project file might look like this:{ "mcpServers": { "filesystem": { "type": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "${workspaceFolder}"] } } }${workspaceFolder}is one of Cursor's interpolation variables; the docs define it as "project root (the folder that contains.cursor/mcp.json)", and the others are${env:NAME},${userHome},${workspaceFolderBasename}and${pathSeparator}. Interpolation works incommand,args,env,urlandheaders. The docs add thatenvFileis "only available for STDIO servers".The
mcpServersshape is the same one other MCP clients use. The Claude Desktop thread shows the same Filesystem server in that app's config file, so a server's setup instructions written for another client usually carry over.How do you add a remote server?
Remote servers use
urlinstead ofcommand. Cursor supports both the SSE and Streamable HTTP transports for these, and the docs' table marks both as using OAuth for sign-in:{ "mcpServers": { "remote-server": { "url": "https://api.example.com/mcp", "headers": { "Authorization": "Bearer ${env:MY_SERVICE_TOKEN}" } } } }For OAuth, the docs say Cursor uses "the authorization code flow with PKCE" and reads the server's protected resource metadata to find the authorisation server. If a provider gives you a fixed client ID instead of supporting dynamic registration, add an
authobject withCLIENT_ID, optionalCLIENT_SECRETandscopes, again preferably through${env:...}variables rather than literal values.How do you keep secrets out of the committed file?
A project
mcp.jsonis meant to be shared, so treat it as public. The documentation's own advice for sensitive data is: "Use environment variables for secrets, never hardcode them", "Limit API key permissions to minimum required", and "Run sensitive servers locally withstdiotransport." In practice:- Reference keys as
${env:NAME}inenv,headersorauth. - For local servers, point
envFileat a.envfile that is listed in.gitignore. - Use a token scoped to what the server needs, not your full account.
Will Cursor run MCP tools without asking?
By default it asks: "Cursor asks for approval before using MCP tools by default." The docs then say MCP "follows the same Run Modes as terminal commands". Cursor's Run Modes page describes three modes, set under Settings > Agents > Approvals & Execution:
- Auto-review: allowlisted calls run immediately and other MCP calls go to a classifier. The page warns that "Auto-review is not a security boundary" because "the classifier can make mistakes".
- Allowlist: only actions on your allowlist run without approval.
- Run Everything: "Every tool call runs automatically."
The sandbox described on that page applies to shell commands, not MCP tools, so an MCP server runs with whatever access its own process has. That is why the MCP project's guide to local servers warns that a local server "runs with your user account permissions". Read a server's tool list before you allowlist it.
How do you check it worked?
Open Customize in the sidebar: each server appears there with a toggle, and the docs note that "Disabled servers won't load or appear in chat." If one fails, open the Output panel (
Cmd+Shift+Uon macOS) and choose "MCP Logs" from the dropdown; it shows "server initialization, tool calls, and error messages." To update an npm-based server, the docs suggest removing it in Customize, runningnpm cache clean --force, and adding it again.For choosing servers, CodeLifter's MCP server directory lists what each one can read, write and reach. The Cursor thread covers the editor itself.
Checked on 12 November 2026.
Short version
- Project servers go in
.cursor/mcp.json; personal ones in~/.cursor/mcp.json; official plugins install from Customize. - Local servers use
commandandargs; remote servers useurl, with OAuth or headers. - Put secrets in
${env:NAME}or an ignoredenvFile, never in the committed file. - Cursor asks before MCP tool calls by default; Auto-review and Run Everything change that.
- Check status in Customize and errors under "MCP Logs" in the Output panel.
- Reference keys as
Write something first.
Give people something to work with: at least 30 words on what happened and what you tried.
That is too long. Keep it under 6,000 characters.
Write the question as the title, 15 to 140 characters, no links.
Pick a category.
Add a name (2 to 40 characters, no links).
That email address does not look right.
That was quick. Read the thread, then try again.
The form expired. Reload the page and post again.
Something went wrong with the form. Reload and try again.
Please complete the check and post again.
Limit reached for now. Try again later.
This thread is closed to new replies.
This thread no longer accepts replies.
Something went wrong with the form. Reload and try again.
Post a reply or question first (name and email), then this browser can vote, edit and accept answers.
You cannot vote on your own post.
Only the author (within 30 days) or the forum team can do that.
That email already has an account. Use your sign-in link instead.
New accounts are paused for the moment. Try again later.
That was already posted.