-
Notifications
You must be signed in to change notification settings - Fork 331
Description
Describe the bug
When I build just this simple project and than I configure this mcp to Claude Desktop it has a problem with syntax and its not possible to run this MCP. I had this problem with my more complex MCP, but it doesnt work with this simple as well.
To Reproduce
Steps to reproduce the behavior:
- Run npm i
- npm build
- setup configuration in claude desktop config file
"weather-server-typescript": {
"command": "node",
"args": [
"path/quickstart-resources-main/weather-server-typescript/build/index.js"
]
}
And its not running and creating errors.
Logs
`2025-03-14T10:27:30.615Z [weather-server-typescript] [info] Initializing server...
2025-03-14T10:27:30.659Z [weather-server-typescript] [info] Server started and connected successfully
2025-03-14T10:27:30.661Z [weather-server-typescript] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
2025-03-14T10:27:31.365Z [weather-server-typescript] [info] Initializing server...
2025-03-14T10:27:31.376Z [weather-server-typescript] [info] Server started and connected successfully
2025-03-14T10:27:31.393Z [weather-server-typescript] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
file:///Users/pavelsoukup/Documents/DEV/quickstart-resources-main/weather-server-typescript/build/index.js:101
const forecastUrl = pointsData.properties?.forecast;
^
SyntaxError: Unexpected token '.'
at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
at async link (internal/modules/esm/module_job.js:42:21)
file:///Users/pavelsoukup/Documents/DEV/quickstart-resources-main/weather-server-typescript/build/index.js:101
const forecastUrl = pointsData.properties?.forecast;
^
SyntaxError: Unexpected token '.'
at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
at async link (internal/modules/esm/module_job.js:42:21)
2025-03-14T10:27:31.756Z [weather-server-typescript] [info] Server transport closed
2025-03-14T10:27:31.757Z [weather-server-typescript] [info] Server transport closed
2025-03-14T10:27:31.756Z [weather-server-typescript] [info] Client transport closed
2025-03-14T10:27:31.757Z [weather-server-typescript] [info] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. console.error('...')
in JavaScript, print('...', file=sys.stderr)
in python) and it will appear in this log.
2025-03-14T10:27:31.757Z [weather-server-typescript] [error] Server disconnected. For troubleshooting guidance, please visit our debugging documentation {"context":"connection"}
2025-03-14T10:27:31.757Z [weather-server-typescript] [info] Client transport closed
2025-03-14T10:27:31.757Z [weather-server-typescript] [info] Client transport closed
2025-03-14T10:27:31.757Z [weather-server-typescript] [info] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. console.error('...')
in JavaScript, print('...', file=sys.stderr)
in python) and it will appear in this log.
2025-03-14T10:27:31.757Z [weather-server-typescript] [error] Server disconnected. For troubleshooting guidance, please visit our debugging documentation {"context":"connection"}
2025-03-14T10:27:31.757Z [weather-server-typescript] [info] Client transport closed
2025-03-14T10:34:34.070Z [weather-server-typescript] [info] Initializing server...
2025-03-14T10:34:34.095Z [weather-server-typescript] [info] Server started and connected successfully
2025-03-14T10:34:34.096Z [weather-server-typescript] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
2025-03-14T10:34:34.800Z [weather-server-typescript] [info] Initializing server...
file:///Users/pavelsoukup/Documents/DEV/quickstart-resources-main/weather-server-typescript/build/index.js:101
const forecastUrl = pointsData.properties?.forecast;
^
SyntaxError: Unexpected token '.'
at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
at async link (internal/modules/esm/module_job.js:42:21)
2025-03-14T10:34:34.816Z [weather-server-typescript] [info] Server started and connected successfully
2025-03-14T10:34:34.823Z [weather-server-typescript] [info] Server transport closed
2025-03-14T10:34:34.823Z [weather-server-typescript] [info] Client transport closed
2025-03-14T10:34:34.823Z [weather-server-typescript] [info] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. console.error('...')
in JavaScript, print('...', file=sys.stderr)
in python) and it will appear in this log.
2025-03-14T10:34:34.823Z [weather-server-typescript] [error] Server disconnected. For troubleshooting guidance, please visit our debugging documentation {"context":"connection"}
2025-03-14T10:34:34.824Z [weather-server-typescript] [info] Client transport closed
2025-03-14T10:34:34.830Z [weather-server-typescript] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
file:///Users/pavelsoukup/Documents/DEV/quickstart-resources-main/weather-server-typescript/build/index.js:101
const forecastUrl = pointsData.properties?.forecast;
^
SyntaxError: Unexpected token '.'
at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
at async link (internal/modules/esm/module_job.js:42:21)
2025-03-14T10:34:35.078Z [weather-server-typescript] [info] Server transport closed
2025-03-14T10:34:35.079Z [weather-server-typescript] [info] Client transport closed
2025-03-14T10:34:35.079Z [weather-server-typescript] [info] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. console.error('...')
in JavaScript, print('...', file=sys.stderr)
in python) and it will appear in this log.
2025-03-14T10:34:35.079Z [weather-server-typescript] [error] Server disconnected. For troubleshooting guidance, please visit our debugging documentation {"context":"connection"}
2025-03-14T10:34:35.079Z [weather-server-typescript] [info] Client transport closed
`