-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Bug Report
Describe the bug
When trying to add a custom, locally-runnable MCP server (like n8n-mcp) using the "Command" field in the MCP Servers configuration, the application fails to start the server and displays a generic error starting the server message.
This occurs despite the necessary command-line tools (Node.js/npx, Docker) being correctly installed on the host system and available in the standard system PATH. The failure seems to be within the application's environment for executing external commands.
To Reproduce
Steps to reproduce the behavior:
Install Node.js (LTS) on a Windows machine and verify that npx works in a standard Command Prompt.
Open the Tome/Smithery application.
Navigate to the "MCP Servers" configuration screen.
Click the "+" icon to add a new server.
In the "Command" field, enter a valid command to run an MCP server, for example: npx n8n-mcp
Add the necessary environment variables as specified by the server's documentation (e.g., N8N_API_URL, N8N_API_KEY).
Click "SAVE".
Observe the red error starting the server message that appears next to the save button.
Expected behavior
The application should successfully execute the command provided (e.g., npx n8n-mcp) as a background process, start the MCP server, and establish a stable connection. The server's tools should then become available within the application.
Actual behavior
An error starting the server message appears in the UI. A deep analysis of the application's debug logs reveals that the command is executed, but the connection to the subprocess fails immediately. The logs show rmcp::transport::io][ERROR] Error reading from stream: serde error EOF while parsing a value... or ...expected value..., which indicates the subprocess is crashing or exiting instantly before any valid MCP communication can be established.
Desktop Environment:
OS: [e.g., Windows 11]
App Version: 0.12.4 (as seen in logs)
Additional Context
The issue is not with the MCP server package itself. The command (npx n8n-mcp) runs successfully when executed directly in a standard Windows Command Prompt.
The same failure occurs when trying to use a docker run ... command in the "Command" field. This suggests the issue is with the command execution feature in general, not specific to npx.
The application logs show that it attempts to execute its own bundled npx.cmd from its local AppData directory. The failure might be related to permissions, PATH inheritance, or sandboxing within the application's process runner.
This issue seems specific to running custom/local servers, as the built-in servers like exa-search-server appear to function correctly.