Cursor CLI - Can't interact with local Node.js server MCP

,

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

Here’s my mcp.json. In the IDE, the MCP works normally but in the CLI, I get a quick Error: MCP error -32000: Connection closed whenever I open a new session. When I ask it to list out the MCP servers it can interact with, it only shows the other remote MCP servers that I have.

{
  "mcpServers": {
    "internal-tool": {
      "command": "node",
      "args": ["path/to/server.js"],
      "env": {
        "TOKEN": "XYZ"
      }
    }
  }
}

Steps to Reproduce

Create a local MCP tool with Node.js using @modelcontextprotocol/sdk and define a few tools using server.tool. Then configure your mcp.json as above and try to interact with it through Cursor CLI

Expected Behavior

That it should be able to use the MCP tools normally

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.41 (Universal)
VSCode Version: 1.105.1
Commit: 2ca326e0d1ce10956aea33d54c0e2d8c13c58a30
Date: 2026-01-16T19:14:00.150Z (5 days ago)
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

Composer 1 and GPT 5.2

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey @bao,

Thanks for reporting. Just tried this out and it worked well for me!

Here’s my very simple MCP server using @modelcontextprotocol/sdk:

mcp-test-server.zip (14.4 KB)

mcp.json:

    "test-mcp-server": {
      "command": "node",
      "args": ["/Users/cmueller/mcp-test-server/server.js"]
    }

What version of the Cursor CLI are you using?

cmueller@colins-macbook-pro ~ % agent -v
2026.01.17-d239e66

I did get your exact error message once, but it was fixed by rerunning npm install (I had wiped the node_modules folder while zipping up the directory to share in this thread)

Mine also shows 2026.01.17-d239e66. I tried running npm install again and it also didn’t work. FYI, my company has an internal npm server for security reasons.

Here’s an interaction recently asking it to list MCP resources for the internal remote MCPs

 ┌────────────────────────────────┐
 │ list all mcp resources         │
 └────────────────────────────────┘

  I’m going to query the configured
  MCP servers and list every
  available MCP resource (across all
   servers).

  ⬢ ListMcpResources No resources
    found

  No MCP resources are available
  right now (0 resources found).

 ┌────────────────────────────────┐
 │ list <internal-name> mcps?     │
 └────────────────────────────────┘

  There aren’t any <internal-name> MCP
  resources to list (the MCP
  resource list is empty right now).
  If you meant “which <internal-name>-backed
  tools are available?”, you have
  these <internal-name> tools enabled:
  • functions.<internal-name>-tool1-Ask_
    question
  • functions.<internal-name>-tool2-As
    k_question


 ┌────────────────────────────────┐
 │ ok list all the functions      │
 │ you have                       │
 └────────────────────────────────┘


  Available functions

  • Shell: functions.Shell
  • Glob: functions.Glob
  • Grep: functions.Grep
  • LS: functions.LS
  • Read: functions.Read
  • Delete: functions.Delete
  • EditNotebook:
    functions.EditNotebook
  • TodoWrite: functions.TodoWrite
  • SemanticSearch:
    functions.SemanticSearch
  • WebFetch: functions.WebFetch
  • <internal-name> (Ask question):
    • functions.<internal-name>-tool1-As
      k_question
    • functions.<internal-name>-tool2-
      Ask_question
  • MCP resources:
    • functions.ListMcpResources
    • functions.FetchMcpResource