The MCP server was showing 4 incorrect tools (add, subtract, multiply, divide) instead of the 2 correct tools (oauth, query_library) when discovered by VS Code.
The issue was in .vscode/mcp.json configuration:
"args": ["mcp-server"] // ← AMBIGUOUS: uvx treats this as PyPI package nameWhen uvx encounters a bare package name without --from, it defaults to searching PyPI for a package with that name. There is likely a public "mcp-server" package on PyPI that implements math tools, which was being loaded instead of the local yoto-smart-stream MCP server implementation.
Fixed the .vscode/mcp.json to explicitly reference the local package:
"args": [
"--from",
"/Users/earchibald/work/yoto-smart-stream/mcp-server",
"mcp-server"
]This tells uvx to look for the mcp-server entry point in the local directory, not PyPI.
- Fixed
.vscode/mcp.json- Updated to use--fromflag with absolute path to local mcp-server package - Fixed
mcp-server/server.py- Corrected syntax error (missing closing parenthesis inapp.run()call) - Added
test_mcp_tools.py- Verification test to ensure server has correct tools
The MCP server now has:
- ✅
oauthtool - for activating/deactivating Yoto OAuth - ✅
query_librarytool - for natural language queries of the library - ✅ No math tools (add, subtract, multiply, divide)
The mcp-server entry point is correctly defined in pyproject.toml:
[project.scripts]
mcp-server = "server:main"This maps the command to the async def main() function in server.py, which properly initializes the MCP server with stdio transport.
# Verify the MCP server code has correct tools
python test_mcp_tools.py
# Should output:
# ✅ All checks passed! MCP server code has correct tools.- Restart VS Code to reload the MCP configuration
- The "Yoto Library" MCP server should now discover the correct 2 tools
- Test the oauth and query_library tools in VS Code's Claude Chat
0c0e775- Fix MCP server: correct syntax error and update mcp.json to use local package7e08f9f- Add MCP server tools verification test