-
Notifications
You must be signed in to change notification settings - Fork 111
Closed
Description
On Linux, npx tries to run the main script as executable file, but it is missing #!/usr/bin/env node on the first line, so shell tries to implement the executable file as a shell script rather than running it in node.
Therefore, you get this output:
/root/.npm/_npx/dbf1ae1819fe4520/node_modules/.bin/mcp-server-elasticsearch: 1: /app: Permission denied
/root/.npm/_npx/dbf1ae1819fe4520/node_modules/.bin/mcp-server-elasticsearch: 2: README.md: not found
/root/.npm/_npx/dbf1ae1819fe4520/node_modules/.bin/mcp-server-elasticsearch: 3: README.md: not found
/root/.npm/_npx/dbf1ae1819fe4520/node_modules/.bin/mcp-server-elasticsearch: 4: incident_agent/: Permission denied
/root/.npm/_npx/dbf1ae1819fe4520/node_modules/.bin/mcp-server-elasticsearch: 5: import: not found
...
This makes it problematic not just on Linux workstations, but also when running the MCP server from MCP client in a docker container.
Metadata
Metadata
Assignees
Labels
No labels