MCP Servers No tools found

TLDR:
1 solution to this problem is to make sure the path where you install the server doesn’t contain spaces.

e.g:
node C:/my projects/mcpserver/build/index.js will fail because of a space in “my projects”
node C:/projects/mcpserver/build/index.js will work as there are no spaces

notes:

  • I’m on windows 11 and I’ve tried forward and backslashes and they both work. I just tried forward slashes first, so copying the path of the index.js file in the build folder also works.

  • I run nvm and I’ve also tried running the server global with spaces in the path and that also didn’t work, with or without full paths to node.exe and the index.js file and with or without quotes around the full paths - Getting rid of spaces in the path was my solution.

  • You don’t need to run the server manually before adding the command - the command will start the server automatically - just in case you weren’t sure. You should, however, first try to start and stop the server manually before adding it to cursor so you know the server starts without errors.

  • This isn’t the only possible cause or solution - I’m sure there are other reasons why it may fail to find tools.

How I found out:

In my case I had:
D:\My Data\Projects.…

When I tried adding (or refreshing) any MCP server that’s installed in a subdirectory in the path above I briefly see a terminal flashing and a node executable being added and removed to the task manager. I wanted to know what is going on and used the free sysinternals ProcessMonitor tool to check what cursor is trying to execute.

I set the command in the add MCP server without quotes around the path and got this when I refreshed the server:

(Still not allowed to upload multiple images in 1 post so had to post a screenshot of the edit screen which makes it hard to read…)

3 Likes

Just posted a reply below in this thread which may work for you if you have any spaces in the full path to the index.js file. I haven’t tried with npx and just use: node full/path/to/build/index.js (no quotes, no full path to node, not using global node or messing with system variables). Both forward and backslashes work.

Thanks, it’s the only method work for me.

All MCP configurations that use npx do not work for me in Cursor on Windows.

2025-02-11 13:21:06.390 [error] [MCP] Failed to connect to stdio server with command 'npx -y @smithery/cli@latest run @smithery-ai/server-sequential-thinking --config "{}"': A system error occurred (spawn npx ENOENT)
2025-02-11 13:21:06.390 [error] [MCP] Error listing tools for stdio server npx -y @smithery/cli@latest run @smithery-ai/server-sequential-thinking --config "{}": A system error occurred (spawn npx ENOENT)

I get the spawn npx ENOENT error for all MCP servers when trying to configure with npx.

I have tried the full path to npx in the command, different types of formatting to the command, etc., and nothing seems to work.

2 Likes

Yes, I have the same. People who wrote their methods above and who worked for them did not work for me the same

thank you, I tried so many things, this fixed it. Especially the last image example.

run install the server, find the path to the index.js of the server, parse it with node command, no quotation marks, forward slashes only.

I am on windows

Another Edit:
For servers with API KEYS: I modified index.js with my hardcoded key. No commands would work otherwise

1 Like

For anyone on windows, I have found that the following directive is super happy_mode:

“Wrap all commands into a .ps1 and execute that”


Cursor is a curmudgeon in that it always falls back to *nix and attempts a && often…

By enforcing that all executions get wrapped into .ps1 for powersshell executution, you get the added benefit that you have a history of ALL agentic actions, and then, I layer that it should always save these to /scripts and that it verbossely comments what its doing… AND then you can tell the agent to make a directory of these tools AND you can tell it to populate a DB table of the various things with descriptiopns and such.

Whereby, one could start a library of tools that come out of the bot.

For example, if in one project you need to slurp a csv and transmogrify and pipe to whatever, save that workflow as an agentic .ps1 regardless of how many .pys its going to call…

Can you give an example of what command you put in the mcp server input box?

hmm…

You have revealed a thing… I complained abt mcp being non programatic…

So let agentify this:


Lets see where this goes

Thanks this finally worked for me. I was also having issues with Brave Search but got that fixed by adding the API key to the Brave Search file.

Sequential Thinking Server Setup

  1. Install the package globally:

Copy

npm install -g @modelcontextprotocol/server-sequential-thinking
  1. In Cursor’s MCP configuration, use this command:

Copy

node C:/Users/[YourUsername]/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-sequential-thinking/dist/index.js

(Replace [YourUsername] with your Windows username)

Brave Search Server Setup

  1. Install the package globally:

Copy

npm install -g @modelcontextprotocol/server-brave-search
  1. You’ll need to modify the server’s index.js file to include your API key:
  • Open this file in a text editor:

Copy

C:/Users/[YourUsername]/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js
  • Add this line before the const BRAVE_API_KEY declaration:

javascript

Copy

process.env.BRAVE_API_KEY = 'YOUR_API_KEY_HERE';
  1. In Cursor’s MCP configuration, use this command:

Copy

node C:/Users/[YourUsername]/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js

Important Notes:

  • Use forward slashes (/) in paths instead of backslashes
  • Don’t use quotes around the paths
  • Avoid spaces in paths
  • If you see flashing terminals, it usually means the server is crashing - check for missing environment variables or incorrect paths

This workaround is particularly useful since Cursor currently has issues handling environment variables through its UI.

6 Likes

You can wrap any config like API keys in a startup script and include it in the build. e.g. you place you API keys in a .env file in your root folder and include the start-server.js script in the build.

#!/usr/bin/env node

// Load environment variables from .env file
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
import { config } from 'dotenv';

// Get the directory where this script is located
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

// Load .env file from the project root (two levels up if in build directory)
const envPath = resolve(__dirname, '..', '.env');
config({ path: envPath });

// Import and run the server
import('./index.js').catch((error) => {
  console.error('Failed to start server:', error);
  process.exit(1);
}); 

in the index.js file you then simply refer to the key in the .env file:

// Load environment variables
const API_KEY = process.env.YOUR_API_KEY ?? "";

This has worked for me.

1 Like

I have the same problem, using an MCP server that works over stdio in Claude Desktop but doesn’t work in Cursor.

  • It’s written in Rust
  • there’s no spaces in the path
  • I’ve ran chmod +x 777 on the binary, the path is /Users/liam/.cargo/bin/binary-name-here.

Can anyone help me out here?

I had the same issue using NVM. The answer here is to switch to your preferred node version, globally install the dependency so npm i -g @modelcontextprotocol/server-sequential-thinking, then set the direct path on the node version and the dependency within that node version.

So: C:/Users/<username>/AppData/Roaming/nvm/v<version>/node.exe C:/Users/<username>/AppData/Roaming/nvm/v<version>/node_modules/@modelcontextprotocol/server-postgres/dist/index.js <your-connection-string>

Let me know if that works for you.

1 Like

i uninstall node and then install node again ,then it works .first you could try run npx -y in your terminal, it may help to find the real error

1 Like

What worked for me was finding the node version I wanted to use inside AppData/roaming/nvm/[version]/node.exe

Then running “npm i -g @modelcontextprotocol/server-postgres”

Then locate the .js file in the server which was inside AppData/roaming/npm/node_modules

What I put into Cursor was

C:\Users[USER]\AppData\Roaming\nvm\v20.12.0\node.exe
C:\Users[USER]\AppData\Roaming\npm\node_modules@modelcontextprotocol\server-postgres\dist\index.js

1 Like

has anyone actually got this working it 5 minutes to setup in cline
i have tried 4 different mcps and all the same No-tool found

Me too - I have an stdio server and every conceivably way I could start it all fails. The IDE spawns the code (3 times in a row) immediately killing it with signal 255 every time.

This looks incredibly useful, but could you perhaps explain a couple extra things? What are you putting into the .ps1 file (do you have any example of something working you can point us all to maybe?) and I assume you put the full path with forward slashes for the “command” prompt, right ?

Hello!

I’m on windows 11 and I’m trying to configure the GitHub MCP but I can’t get it to work.

The only way I can see “something” working is if I use the absolute paths to node and the server script, so it looks like C:\node\node.exe C:\Users\Juan\AppData\Roaming\npm\node_modules\@modelcontextprotocol\server-github\dist\index.js, but there are two problems here:

  1. When cursor executes the command a new Terminal window is opened which is annoying and if I close it, the MCP server stops working.
  2. The second thing is the authentication token it requires, if I do something like set GITHUB_PERSONAL_ACCESS_TOKEN=my_token && C:\node\node.exe C:\Users\Juan\AppData\Roaming\npm\node_modules\@modelcontextprotocol\server-github\dist\index.js it doesn’t work anymore.

Any ideas or suggestions? Thank you!

1 Like

For me, using the absolute path instead of a npx command worked for me.

+1 on the question on how to avoid the annoying terminal windows

1 Like