Issues with `python-weather` MCP Server Template quickstart
Overview
I came across three issues that made it difficult to get through the README tutorial. Repro below:
Repro
- Start by selecting the
python-weatherMCP Server Template. Start following the README.
- Set up the environment using
uv - Attempt to "Debug in Agent Builder"
First issue:
- From Output: Error when calling MCP Server local-server-test_weather: SSE error: TypeError: fetch failed: connect ECONNREFUSED 127.0.0.1:3001, connect ECONNREFUSED ::1:3001
- From Terminal: Executing task: python -m debugpy --listen 127.0.0.1:5678 src/init.py sse source /Users/szhang/mcpServers/test-123/test-weat/bin/bash: python: command not found
The command is not being run from my venv, so I modified the tasks.json:7 to reference the interpreter's python path:
"command": "${command:python.interpreterPath} -m debugpy --listen 127.0.0.1:5678 src/__init__.py sse",
Running "Debug in Agent Builder" now works:
- Attempt to run the hyperlinked prompt.
Second issue:
- The MCP tool entry is removed, so the agent is no longer calling the local MCP tool...
- Attempt to run "Debug in Agent Builder" again:
Third issue:
- Run doesn't go through because an instance of the local MCP server is still running. The command that pops up isn't helpful:
To resolve, I run the command: "Tasks: Run Task > Terminate all tasks" --> press "Cancel" for all popups.
Actually, every time I "Debug in Agent Builder" and then run the prompt, I get back into the second issue state.
- After terminating all tasks, attempt to run the hyperlinked prompt and then "Debug in Agent Builder"
This results in the E2E working! However, the Instructions get wiped... :/
Additionally, slight nit, can we mention in the README that you have to run "Tasks: Run Task > Terminate all tasks" if you want to switch to "Debug in Inspector..."? Without doing so, you are blocked and you have to input "Select instance to terminate", which isn't helpful.
Another thing: if I open this experience from the "Create New MCP Server" option, I would expect the newly created local MCP server to show up in my AI Toolkit extension. Without that there today, I'm lost with how to add the server to my AI Toolkit environment. I guess I would add an entry to Users/{me}/.ait/mcp.json and ensure that the server is running locally.
@im-samz thanks for the detailed info, yep I can repro the issues and will fix.
BTW, the created local MCP server is added to AI Toolkit via the ${workspace}/.aitk/mcp.json
- use
${command:python.interpreterPath}instead ofpythonfor better vsc integration - fix the deeplink in README.md
- better support task termination
- add entrypoint to manage (connect/stop/refresh) workspace's mcp server