Part of Google Search Console MCP Server: Setup for Claude, Cursor, ChatGPT
How to Set Up MCP Servers in Cursor (Step by Step)
Cursor MCP setup step by step: mcp.json for local and remote servers, headers and env vars, project vs global config, approvals, and an indexing example.
To set up an MCP server in Cursor, add it to an mcp.json file: .cursor/mcp.json in a project, or ~/.cursor/mcp.json in your home directory for every project. Each entry goes under mcpServers, with a command for a local server or a url (plus headers if it needs a key) for a remote one. Servers listed in the Cursor Marketplace install with one click instead. That is the whole Cursor MCP setup, per Cursor's MCP docs as of November 2026.
This guide walks through both config files, local and remote servers, keeping keys out of the file, approvals, and a worked example: asking Cursor which pages Google hasn't indexed after a deploy. For Search Console servers in particular, see the Google Search Console MCP guide.
Two ways to add Cursor MCP servers
- One-click install. Open Customize, click MCPs, find a server and click Add to Cursor, then follow the sign-in prompts (Cursor help: MCP integrations). Marketplace entries authenticate with OAuth.
mcp.json. For any server that isn't in the marketplace, including ones that take an API key in a header. This is the route the rest of this guide covers.
Where Cursor MCP config lives: project vs global
| File | Scope | Use it for |
|---|---|---|
.cursor/mcp.json | One project | Servers the whole team should get; commit it |
~/.cursor/mcp.json | Every project on your machine | Personal servers and your own keys |
Cursor merges the two files, and if the same server name appears in both, the project entry wins (Cursor help). After saving, restart Cursor so it picks up the change. A committed project file is shared with everyone who clones the repo, so it should never contain a key in plain text (see below).
Add a local (stdio) server
A local server is a program Cursor starts and talks to over standard input and output. The command must be on your system path or be a full path. args, env and envFile are optional, and envFile works only for stdio servers:
{
"mcpServers": {
"my-local-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "your-mcp-server-package"],
"env": { "API_KEY": "${env:MY_LOCAL_SERVER_KEY}" },
"envFile": "${workspaceFolder}/.env"
}
}
}Cursor's field table marks type as required with the value "stdio", though its own short examples leave it out.
Add a remote server with url and headers
A remote server is a URL Cursor calls over Streamable HTTP or SSE. There is no command to run: you give it the endpoint and, for key-based servers, the header the server expects. The MCP specification defines stdio and Streamable HTTP as its standard transports, and the remote MCP server guide explains the difference.
{
"mcpServers": {
"indexcyborg": {
"url": "https://indexcyborg.com/api/mcp",
"headers": { "Authorization": "Bearer ${env:INDEXCYBORG_API_KEY}" }
}
}
}Servers that use OAuth need no header. Cursor runs the sign-in itself, with the authorization code flow and PKCE, and renews the access token with the refresh token the server issues. If a provider gives you a fixed client ID instead of supporting dynamic registration, add an auth object with CLIENT_ID, and optionally CLIENT_SECRET and scopes. Then register Cursor's callback URLs with the provider: http://localhost:8787/callback for the desktop app and https://www.cursor.com/agents/mcp/oauth/callback for the web and Cloud Agents.
Keep API keys out of mcp.json
Cursor resolves variables in command, args, env, url and headers. The ones you'll use most:
${env:NAME}: an environment variable, as in the header above.${workspaceFolder}: the folder that contains.cursor/mcp.json.${userHome}: your home folder.
Remote servers can't read an envFile, so set the variable in your shell profile or system environment, then restart Cursor. Cursor's help notes that variables from your shell profile must be available to Cursor itself: if a key works with curl in your terminal but not in the editor, check that first. Everyone on the team can then share the same project file and use their own key.
Check that the server loaded
- Open Customize → MCPs. The server should be listed with its toggle on.
- If it isn't working, open the Output panel (Ctrl+Shift+U on Windows and Linux, Cmd+Shift+U on Mac) and select MCP Logs. It shows server initialization, tool calls and error messages.
- From a terminal, the Cursor CLI uses the same MCP configuration as the editor. Its reference lists
agent mcp listfor server status andagent mcp list-tools indexcyborgfor one server's tools and argument names.
A failing server doesn't take the others down: Cursor marks the tool call as failed and the rest keep working. To update an npm-based server, the docs suggest removing it in Customize, running npm cache clean --force, and adding it again.
Approve tool calls, or allowlist the safe ones
Cursor's MCP docs say it asks for approval before using MCP tools by default, and the arrow next to the tool name shows the arguments. How often it asks depends on the Run Mode, which MCP tools share with terminal commands, set under Cursor Settings → Agents → Approvals & Execution: Auto-review (allowlisted calls run, the rest go to a classifier; the default since Cursor 3.6), Allowlist, and Run Everything. Cursor's docs say plainly that Auto-review isn't a security boundary.
To allow read-only tools without a prompt, list them in permissions.json, in ~/.cursor/ or the project's .cursor/ folder. Entries are server:tool, where the server is your key in mcp.json and * is a wildcard:
{
"mcpAllowlist": [
"indexcyborg:list_websites",
"indexcyborg:get_*",
"indexcyborg:generate_indexing_report"
]
}Once the file defines mcpAllowlist, it replaces the in-app MCP allowlist, and Run Mode controls set by a team admin in the dashboard take precedence over both. The three tools that queue work aren't on the list, so they still go through your Run Mode's review.
Example: ask Cursor which pages Google hasn't indexed after a deploy
One practical use of Cursor for SEO is asking about your own site from the editor that shipped it. With IndexCyborg's server configured as above, a key with the read and notify scopes, a verified domain and a linked Search Console property, you can ask:
“I just deployed the new /docs pages on example.com. Rescan the sitemap, then tell me which pages Google hasn't indexed and the reason it gives for each.”
list_websitesconfirms the site and that Search Console is linked.discover_urlsqueues a sitemap scan, which runs in the background, and returns a job id. Discovery finds URLs; it submits nothing to any search engine.get_unindexed_pageslists the pages Google inspected and reported as not indexed.get_indexing_statuswith a URL returns Google's inspection result for that page, with itscoverageStateword for word, such as Crawled - currently not indexed.
Expect brand-new pages to be missing at first. IndexCyborg inspects never-inspected pages straight away, up to 50 every 5 minutes, within Google's 2,000 inspections per property per day. Until a page is inspected, its status is unknown, not unindexed, so it isn't listed. Once inspected, a page Google hasn't seen yet typically reads URL is unknown to Google, which Google's URL Inspection help says means Google hasn't seen the URL before. Inspection also reports the indexed version, not the live page, so a fix you just shipped won't show until Google crawls the page again.
From there, two follow-ups the agent can queue if you approve them: notify_search_engines queues an IndexNow notification for the new URLs, which lists Bing, Yandex, Seznam.cz, Naver, Yep, Internet Archive and Amazonbot as of October 2026 but not Google (more in IndexNow MCP). request_google_indexing queues pages for Request indexing, covered in requesting Google indexing from an AI agent. Neither makes a page indexed.
To make the check a habit, add a project rule. Cursor reads .mdc files in .cursor/rules, and a rule with a description and alwaysApply: false is pulled in when the agent finds it relevant (Cursor rules):
---
description: Check search indexing after a deploy that adds or changes public pages
alwaysApply: false
---
- After such a deploy, call discover_urls for the site, then get_unindexed_pages.
- Quote Google's coverage state word for word. An uninspected page is unknown, not unindexed.
- Ask before calling notify_search_engines or request_google_indexing.How IndexCyborg works as a Cursor MCP server
IndexCyborg runs a remote, stateless Streamable HTTP server at https://indexcyborg.com/api/mcp, authenticated with the same scoped API keys as its REST API (read, notify, manage, optionally limited to some websites). It has seven read tools and three that queue work, with the same gates as the dashboard: no IndexNow before the domain and key are verified, no inspections without a linked Search Console property, and at most 10 Request indexing clicks per property per rolling 24 hours, made by the Chrome extension in your own Search Console session. The full tool list is in check indexing with MCP, and the same server works in other clients, for example with claude mcp add in Claude Code MCP, or under a servers key in VS Code (VS Code MCP configuration, and our VS Code MCP guide).
It doesn't read Search Analytics, and it can't force Google to crawl or index anything: an accepted notification or a requested URL is a step in the queue, not an index entry. The features page covers the dashboard, and pricing lists the plans.
Frequently asked questions
Does the Cursor CLI use the same MCP servers as the editor?
Yes. Cursor's CLI docs say MCP in the CLI uses the same configuration as the editor, so the servers in your mcp.json are available to the agent command. agent mcp list shows their status and agent mcp list-tools followed by the server name shows a server's tools.
Do MCP servers work with Cursor Cloud Agents?
Yes, but they are configured separately: in the Cloud Agents dashboard, or by a team admin under Dashboard > Plugins & MCPs. Cloud Agents also keep their own MCP sign-ins, separate from your local ones, so signing out on your machine doesn't sign them out.
How do I make Cursor use a specific MCP tool?
Name the tool or the server in your prompt, or describe the task in words that match the tool's description. Cursor's agent picks MCP tools on its own when they look relevant, including in Plan Mode, so naming the tool removes the guesswork.
Can I turn off an MCP server in Cursor without deleting it?
Yes. Open Customize, go to MCPs and use the toggle next to the server. A disabled server doesn't load or appear in chat, which helps when you're troubleshooting or have too many tools loaded.