How to Add an MCP Server to Cursor, VS Code and Windsurf

Add an MCP server to Cursor, VS Code and Windsurf: exact mcp.json paths, servers vs mcpServers, keeping the API key out of git, fixes for missing tools.

By Scrape Everything team · · 11 min read

Last updated: November 27, 2026

TL;DR: To add an MCP server to Cursor, put an mcpServers entry in ~/.cursor/mcp.json (every project) or .cursor/mcp.json (one repo), then enable it from Cursor's MCP panel. VS Code reads .vscode/mcp.json, but its root key is servers. Windsurf, now Devin Desktop, uses mcp_config.json with mcpServers.

The worked example below is our own server, @scrapeeverything/mcp, but every config works for any stdio MCP server you start with npx. Swap the package name and the env variable and you're done.

How do I add an MCP server to Cursor?

The Model Context Protocol (MCP) is an open protocol, started by Anthropic, that lets an AI client call tools exposed by a separate program called an MCP server. The spec lives at modelcontextprotocol.io. In practice, adding a server to an editor means editing one JSON file.

Cursor gives you two ways in. Current Cursor docs say to install and manage MCP servers from the Customize page in the sidebar (older builds kept this under Cursor Settings), and servers from the Cursor Marketplace have an "Add to Cursor" button. For anything else, you edit the file directly:

  • ~/.cursor/mcp.json applies to every project. On Windows that's C:\Users\<you>\.cursor\mcp.json.
  • .cursor/mcp.json at the repo root applies to that project only.

We keep our own key in the global file and never in the project one. The project file tends to get committed, and a key in git history has to be revoked, not just deleted.

Local (stdio) server

Paste this into ~/.cursor/mcp.json. The ${env:...} reference pulls the key from your environment, so the file never holds it:

json
{
  "mcpServers": {
    "scrapeeverything": {
      "command": "npx",
      "args": ["-y", "@scrapeeverything/mcp"],
      "env": { "SCRAPEEVERYTHING_API_KEY": "${env:SCRAPEEVERYTHING_API_KEY}" }
    }
  }
}

You need Node.js 18 or newer (node -v) and an API key starting with ssk_live_. A literal key in place of the ${env:...} reference also works, as on our MCP integration page, as long as it stays in your home folder.

Remote server by URL

Cursor also connects to servers over the network. Per its docs, it supports the stdio, SSE and Streamable HTTP transports, and OAuth for servers that need it. A remote entry swaps command for url, with optional headers. Our package has a self-hosted Streamable HTTP mode that binds to 127.0.0.1:3333 by default:

bash
SCRAPEEVERYTHING_API_KEY=ssk_live_... npx -y @scrapeeverything/mcp --http
# MCP endpoint: http://127.0.0.1:3333/mcp
json
{
  "mcpServers": {
    "scrapeeverything-http": {
      "url": "http://127.0.0.1:3333/mcp",
      "headers": { "Authorization": "Bearer ${env:SCRAPEEVERYTHING_API_KEY}" }
    }
  }
}

On loopback, the server takes the key from Authorization: Bearer or x-api-key, and falls back to the key it was started with, so the headers line is optional here. For a public URL, the pillar post on our MCP server covers the auth token and TLS setup. Most people should stay on stdio. It's one less process to keep running.

Did it work?

Open the MCP panel and check that the server is enabled and its tools are listed. Cursor asks for approval before it runs an MCP tool by default. If you allowlist tools so they run without asking, remember that a scraper tool spends credits on every call.

Where does each editor keep its MCP config?

An MCP config file is a JSON file that tells the editor which programs to start as MCP servers, or which URLs to connect to, along with their arguments and environment variables. Each editor reads its own file. Nothing is shared between them.

CursorVS Code (GitHub Copilot)Windsurf / Devin Desktop
Global file~/.cursor/mcp.jsonuser mcp.json (run MCP: Open User Configuration)~/.config/devin/mcp_config.json; Windows %APPDATA%\devin\mcp_config.json (see note below)
Project file.cursor/mcp.json.vscode/mcp.jsonnone documented
Root keymcpServersservers (plus optional inputs)mcpServers
Remote serverurl + headers"type": "http" + url + headersserverUrl or url + headers
Secret options${env:NAME}, envFile (stdio only)inputs with "password": true, envFile${env:VAR}, ${file:/path}
Reloadtoggle the server, or restart CursorMCP: List Servers, then restarttoggle in the MCP panel, or restart
Tool limitnone stated in docsnone stated in docs100 tools in total

Sources: Cursor MCP docs, VS Code MCP configuration reference, Devin Desktop MCP docs, all checked October 2026. Editors move these files around, so trust the docs over this table if they disagree.

Where is the Windsurf mcp_config.json now?

This is the messiest of the three. The Devin Desktop FAQ on docs.devin.ai says Windsurf became Devin Desktop on June 2, 2026, delivered as a regular over-the-air update (Cognition owns both). That same FAQ says the ~/.codeium/ folder isn't changing and lists the MCP config as ~/.codeium/mcp_config.json. The MCP docs page lists ~/.config/devin/mcp_config.json (or $XDG_CONFIG_HOME/devin/mcp_config.json) instead. Older guides say ~/.codeium/windsurf/mcp_config.json.

Three documented paths for one file. Don't guess. Open the raw config from the MCP settings in Cascade, Devin Desktop's agent panel, and the editor opens the file it actually loads.

Why does VS Code use "servers" and the others "mcpServers"?

The mcpServers shape comes from Claude Desktop's claude_desktop_config.json, and many clients copied it so snippets paste across. Cursor and Windsurf did. VS Code wrote its own schema: servers sits next to inputs (prompted variables) and sandbox (file system and network access rules), and each server has an explicit type.

So a README snippet with mcpServers at the top is the wrong shape for .vscode/mcp.json. Rename the key to servers and add "type": "stdio". VS Code also reads a portable .mcp.json at the workspace root, which uses mcpServers. Pick one file per server, or you'll load it twice.

How do I add an MCP server to VS Code?

Save this as .vscode/mcp.json. It's the config from our README, and the one we'd commit for a team:

json
{
  "inputs": [
    { "type": "promptString", "id": "scrapeeverything-key", "description": "Scrape Everything API key", "password": true }
  ],
  "servers": {
    "scrapeeverything": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@scrapeeverything/mcp"],
      "env": { "SCRAPEEVERYTHING_API_KEY": "${input:scrapeeverything-key}" }
    }
  }
}

VS Code prompts for the key the first time the server starts and stores it, masked. The id in inputs has to match the ${input:...} reference character for character. One typo and the prompt never shows up.

For the remote server from the Cursor section, the entry is "type": "http" with "url": "http://127.0.0.1:3333/mcp".

There's also a terminal route, code --add-mcp, which writes to your user config:

bash
code --add-mcp '{"name":"scrapeeverything","command":"npx","args":["-y","@scrapeeverything/mcp"],"env":{"SCRAPEEVERYTHING_API_KEY":"ssk_live_..."}}'

We'd skip that on any machine that isn't yours. The literal key ends up in the config file and in your shell history. VS Code also has an MCP server gallery: search @mcp in the Extensions view.

How do I add an MCP server to Windsurf (Devin Desktop)?

Same mcpServers block as Cursor, in mcp_config.json:

json
{
  "mcpServers": {
    "scrapeeverything": {
      "command": "npx",
      "args": ["-y", "@scrapeeverything/mcp"],
      "env": { "SCRAPEEVERYTHING_API_KEY": "${env:SCRAPEEVERYTHING_API_KEY}" }
    }
  }
}

Watch the 100-tool cap. Our server registers 42 tools (40 endpoints plus get_account and list_scrapers, as of October 2026), so two other large servers can push you over. List tool names in the server's disabledTools array to trim the set. The pillar post's section "Will 42 tools crowd my client's context?" goes into which ones to keep.

Using Claude Code or Claude Desktop too? The one-liners are in the MCP and CLI quickstart.

How do I keep the MCP env API key out of the repo?

A key pasted into a server's env block is fine in a file in your home folder. In a project file, it's one git add . away from a public commit. Here's how we'd pick:

Your situationFileHow the key gets inSafe to commit?
Solo, Cursor, every project~/.cursor/mcp.json${env:...} or a literal keynot in a repo
Team repo, everyone on VS Code.vscode/mcp.jsoninputs with "password": trueyes
Team repo, mixed Cursor and VS Codecommit .vscode/mcp.json; Cursor users add a global entryinputs in VS Code, ${env:...} in Cursorthe VS Code file, yes
Windsurf / Devin Desktopthe file the MCP panel opens${env:...} or ${file:...}not in a repo
Remote serverthe editor's global fileheaders with ${env:...}, or OAuthonly without literal secrets

For a stdio server you can also point envFile at a .env file, for example "${workspaceFolder}/.env". Cursor and VS Code both accept it. Put .env in .gitignore before you create it.

The ${env:...} route has one catch. The editor passes its own process environment, not your shell's. On macOS, an app launched from the Dock doesn't read the exports in ~/.zshrc. Devin's docs say an unset variable resolves to an empty string. Our server sees an empty key, and every tool call fails with AUTH_REQUIRED (HTTP 401) plus a hint to set SCRAPEEVERYTHING_API_KEY. Launch the editor from a terminal that has the variable, or use envFile.

Whatever you choose, the key goes in a header or an environment variable, never a URL. Our API rejects keys sent as query parameters with 400 API_KEY_IN_URL; the authentication docs explain why.

Why is my MCP server not showing up in Cursor or VS Code?

Work down this list in order. The first three cover most cases.

  1. The editor wasn't reloaded. In Cursor and Devin Desktop, toggle the server off and on, and if that does nothing, quit the editor completely and reopen it. In VS Code, run MCP: List Servers and restart the server from there.
  2. Invalid JSON. A trailing comma or a missing brace breaks the whole file. Check it from a terminal:
    bash
    node -e "JSON.parse(require('fs').readFileSync(process.argv[1], 'utf8')); console.log('ok')" ~/.cursor/mcp.json
    This is strict JSON, so it also flags comments. Read the message before assuming the editor rejects the file too.
  3. Wrong root key. mcpServers in .vscode/mcp.json, or servers in Cursor's file.
  4. Node is too old. @scrapeeverything/mcp requires Node 18 or newer. If you use nvm or a similar version manager, the editor may see an older system Node than your terminal does. A full path to npx in command fixes that.
  5. npx not found on Windows. npx is a .cmd shim there, and some clients start the command without a shell, so nothing runs. Wrap it in cmd:
    json
    {
      "mcpServers": {
        "scrapeeverything": {
          "command": "cmd",
          "args": ["/c", "npx", "-y", "@scrapeeverything/mcp"],
          "env": { "SCRAPEEVERYTHING_API_KEY": "${env:SCRAPEEVERYTHING_API_KEY}" }
        }
      }
    }
    Restart the editor after installing Node, too. A running app keeps its old PATH.
  6. Stale tool list. If the server starts but shows old tools, run MCP: Reset Cached Tools in VS Code.
  7. Read the logs. In Cursor, open the Output panel and pick MCP Logs. In VS Code, MCP: List Servers, then show output. A bad key shows up there as AUTH_REQUIRED or INVALID_API_KEY, not as a missing server.

Still stuck? Take the editor out of the picture and run the server under the MCP Inspector, the protocol's official debugging tool:

bash
npx @modelcontextprotocol/inspector -e SCRAPEEVERYTHING_API_KEY=ssk_live_... -- npx -y @scrapeeverything/mcp

If the tools list there, the server is fine and the problem is your editor config.

How do I check the tools actually loaded?

Ask the assistant: "How many credits do I have left?" The model calls get_account, which costs 0 credits and returns your email, plan, balance and rate limits. If you get a number back, the whole chain works.

To check the key outside any editor, call the same account endpoint the tool uses:

bash
curl https://api.scrapeeverything.com/v1/account \
  -H "Authorization: Bearer $SCRAPEEVERYTHING_API_KEY"
json
{
  "email": "you@example.com",
  "plan": "free",
  "credits": 100,
  "limits": { "rate_limit_per_minute": 60, "concurrency": 5 }
}

Then try one real call. "Get the TikTok profile of @example_user" makes the model call tiktok_profile for 1 credit. When an answer looks wrong, run the same request yourself. It tells you whether the data or the model is at fault:

bash
curl -X POST https://api.scrapeeverything.com/v1/tiktok/profile \
  -H "Authorization: Bearer $SCRAPEEVERYTHING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "example_user"}'
js
// check.mjs, run with: node check.mjs  (Node 18+, built-in fetch)
const res = await fetch("https://api.scrapeeverything.com/v1/tiktok/profile", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SCRAPEEVERYTHING_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ username: "example_user" }),
});
if (!(res.headers.get("content-type") || "").includes("application/json")) {
  throw new Error(`HTTP ${res.status}`); // 502/504 can be an HTML page
}
const body = await res.json();
if (!body.success) throw new Error(JSON.stringify(body));
console.log(body.data.follower_count, body.data.video_count, body.meta.credits_charged);

Trimmed response. Values are placeholders; field names come from the TikTok profile endpoint:

json
{
  "success": true,
  "data": {
    "username": "example_user",
    "full_name": "Example User",
    "is_verified": false,
    "follower_count": 48213,
    "following_count": 185,
    "like_count": 1290000,
    "video_count": 312,
    "region": null
  },
  "meta": { "cached": false, "credits_charged": 1, "credits_remaining": 99 }
}

Other good first prompts: "Compare the Instagram follower counts of @example_brand and @example_rival" (instagram_profile, 1 credit each), or "Summarize the transcript of this YouTube video" with a link (youtube_transcript, 1 credit; see the YouTube transcript endpoint). Calls that fail on our side (platform blocks, timeouts, server errors) are refunded automatically. The AI agents use case shows a full research loop built on these tools.

New accounts get 100 free credits with no payment details needed, which is enough to run the get_account check in all three editors and still have most of the balance left. Get 100 free credits, sign in with Google or GitHub, and create a key on the dashboard's API keys page.

FAQ

Can I use the same mcp.json for Cursor and VS Code?

Not as-is. Cursor expects mcpServers at the root. VS Code's .vscode/mcp.json expects servers, with a type on each server. Keep two files, or use VS Code's portable .mcp.json at the workspace root, which uses mcpServers.

Does Cursor support remote MCP servers?

Yes. Use a url entry, optionally with headers, in place of command and args. Cursor's docs list stdio, SSE and Streamable HTTP as supported transports, plus OAuth for servers that need it. You can reference ${env:NAME} inside url and headers to keep tokens out of the file.

Why does my MCP server show up but every tool call fails?

The server started, so the config is fine. The key isn't. An ${env:...} reference to a variable the editor can't see resolves to an empty value, and the server answers AUTH_REQUIRED. A revoked or mistyped key returns INVALID_API_KEY. Fix the environment or the input value, then restart the server.

Why is my server connected but the agent never calls it?

Check that its tools are enabled in the MCP panel and that you're asking in an agent session, not plain chat. Then name the tool or the server in the prompt, for example "use scrapeeverything to get the TikTok profile of @example_user". In Cursor, a tool waiting for your approval looks like a stalled answer, so watch for the prompt.

How do I add an MCP server to Cursor on Windows?

The file is C:\Users\<you>\.cursor\mcp.json. If the server never starts, wrap the command as "command": "cmd" with "args": ["/c", "npx", "-y", "<package>"], because npx is a .cmd shim that some clients can't launch without a shell. Restart Cursor after installing Node so it picks up the new PATH.

How many credits does setting up the MCP server cost?

None. Installing the server, listing tools and get_account are free. Only scraper tool calls spend credits. Most cost 1 credit; a few feed and search endpoints cost 2 or 3, such as instagram_reels_search at 3. When the setup works, the MCP server for social media data post lists every tool and what it costs, and pricing covers the one-time credit packs once the free 100 run out.

More from the blog

Start with 100 free credits.

Continue with Google, create an API key and send your first request in under a minute.

Get 100 free credits