SpecMatter field notes

Cursor / MCP configuration field notes

Cursor MCP: configure, scope, inspect, and debug a server

Short answer: put team-visible servers in .cursor/mcp.json and personal servers in ~/.cursor/mcp.json. Use command plus args for a local stdio server, or url for a remote HTTP or SSE server. Then inspect the server in Customize > MCPs, or run agent mcp list and agent mcp list-tools IDENTIFIER. If project and global files use the same server name, the project definition takes priority.

Our Windows lab completed a real MCP initialize, tool discovery, and tool call against a purpose-built stdio fixture. It also checked four configuration shapes and simulated the documented project-over-global name collision. Cursor itself did not load the fixture because neither cursor nor agent was available on this machine's PATH. That boundary is deliberate: the protocol passed; Cursor runtime discovery remains Untested.

Cursor MCP flow from project or global mcp.json through stdio or HTTP to agent mcp checks and status outcomes
Configuration location, transport, discovery, and approval are separate checkpoints.

Local lab: Windows 11, Node v24.19.0, 2026-09-30. Zero credentials, zero remote servers, zero model calls.

Choose project or global scope before writing JSON

LocationAudienceUse it whenName collision
.cursor/mcp.jsonOne project and its collaboratorsThe repository should carry the reviewed server definitionProject definition wins over a global definition with the same name
~/.cursor/mcp.jsonOne user across projectsThe server is a personal utility, not repository policyUsed only when the project does not override that name
Customize > MCPsInteractive editor managementYou want to browse, enable, disable, or authenticate a serverThe UI shows the resolved server and tool state
Extension APIExtension-managed runtime registrationAn extension must register or remove a server without editing JSONThe extension owns its registration lifecycle
Do not hide secrets in a shared file. Cursor supports interpolation such as ${env:NAME}, ${userHome}, and ${workspaceFolder}. Reference an environment variable instead of committing a token.

Use one server shape at a time

Local stdio server

{
  "mcpServers": {
    "local-tools": {
      "type": "stdio",
      "command": "node",
      "args": ["${workspaceFolder}/tools/server.mjs"],
      "envFile": "${workspaceFolder}/.env"
    }
  }
}

Remote server

{
  "mcpServers": {
    "remote-tools": {
      "url": "https://mcp.example.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:MCP_TOKEN}"
      }
    }
  }
}
FieldStdioRemoteFailure to avoid
commandRequiredNot usedA stdio entry with no command cannot start
argsOptional arrayNot usedKeep each argument as a separate array item
urlNot usedRequiredDo not combine a remote URL and local command in one definition
envFileSupportedNot supportedRemote servers must use environment interpolation instead
headersNot used for process startupOptionalDo not paste a long-lived token directly into committed JSON

Verify discovery before asking the agent to use a tool

agent mcp list
agent mcp list-tools IDENTIFIER
agent mcp enable IDENTIFIER
agent mcp disable IDENTIFIER
  1. Confirm the server appears and note whether its source is project or global.
  2. Confirm the transport shown is the one you intended.
  3. List tools and read names, descriptions, and argument schemas before enabling automatic use.
  4. For editor-side failures, open the Output panel and select MCP Logs.
  5. Call one low-risk tool with controlled input before giving the server broader access.

Cursor asks for approval before MCP tool use by default. Approval policy and server discovery are separate: a server can be configured and discoverable without every tool being allowed to run automatically.

Local field test: what passed, failed, and stayed untested

The lab used a 48-line Node stdio fixture with one tool named echo_probe. A separate client sent initialize, tools/list, and tools/call. The same run checked documented config constraints without touching ~/.cursor or a real project file.

CaseObserved resultWhat it provesBoundary
MCP initializespecmatter-cursor-echo 1.0.0The fixture completed the protocol handshakeDirect client-to-server test, not Cursor
Tool discoveryecho_probeThe server returned a tool schemaCursor's tool panel was not observed
Controlled tool callcursor-echo:scope-checkThe tool returned the expected deterministic textNo model selected or called the tool
Project stdio shapeValidRequired command and stdio-only envFile rules passed the lab validatorValidator follows the cited docs; it is not Cursor's parser
Global HTTP shapeValidURL plus environment-interpolated header passedNo network request or OAuth flow ran
Stdio without commandRejectedThe lab caught a missing startup commandNo Cursor diagnostic was captured
Remote URL with envFileRejectedThe lab enforced the documented stdio-only envFile ruleNo Cursor diagnostic was captured
Cursor runtime loadUntestedwhere cursor and where agent both exited 1No executable was available on PATH

Download the observation matrix (CSV) Download the minimal stdio fixture

Claim boundary: the local result proves the fixture's protocol behavior and a transparent documentation-derived config audit. It does not prove Cursor loaded the file, showed a connected badge, requested approval, authenticated a remote server, or let a model invoke the tool.

Failure matrix

SymptomLikely checkpointNext evidence to collect
Server does not appearWrong file location or invalid JSONConfirm exact project root, file name, JSON parse, and MCP Logs
Server appears but is disconnectedProcess or endpoint startupCheck executable path, argument array, URL, and server stderr
Global server changes inside one projectProject name collisionSearch both files for the same key; project takes priority
Token is empty after restartEnvironment inheritanceConfirm Cursor inherited the variable, then restart after shell-profile changes
Remote server ignores envFileUnsupported fieldMove the secret to an environment variable and interpolate it in headers
Tool exists but does not runApproval or enablementInspect tool state, arguments, approval mode, and MCP Logs

FAQ

Should Cursor MCP config be committed?

Commit a reviewed project .cursor/mcp.json when teammates need the same server definition. Keep personal utilities in the global file. Never commit a credential.

Why does the project definition override the global one?

Cursor merges both files and gives the project-level definition priority when the same server name appears in both.

Can a remote server use envFile?

No. Cursor documents envFile for stdio servers only. Remote definitions should reference environment variables in fields such as headers.

Did this test show Cursor calling the tool?

No. The MCP fixture and direct client passed, but no Cursor executable was available on PATH. Cursor loading and model-driven tool use remain untested.

Sources and related field notes

Official documentation checked 2026-09-30. Local observations used Node v24.19.0. SpecMatter is not affiliated with Cursor or Anysphere.