Successfully implemented and tested the Yoto Smart Stream MCP (Model Context Protocol) server with comprehensive fixes, features, and documentation updates.
Commit: Fix MCP server: correct syntax error and update mcp.json to use local package
- Fixed
.vscode/mcp.jsonto use--fromflag with absolute path - Fixed syntax error in
server.py(missing closing parenthesis) - Properly configured to use local mcp-server package instead of PyPI
Commit: Fix MCP server: use direct Python execution instead of uvx entry point
- Changed MCP execution from uvx to direct Python for better reliability
- Simplified configuration and eliminated entry point resolution issues
Commit: Fix MCP server entry point: use sync_main wrapper for asyncio.run()
- Created
sync_main()wrapper function for proper async entry point handling - Updated
pyproject.tomlentry point to useserver:sync_main
Commit: MCP: Make YOTO_SERVICE_URL optional at startup - lazy initialization
- YOTO_SERVICE_URL no longer required to start the server
- Implements lazy initialization pattern
- Per-tool deployment support via
service_urlparameter - Authentication happens only on first tool call
- Per-host auth cookie caching in memory
Commit: Add comprehensive MCP server testing suite
test_mcp_structure.py: Validates server structure, tools, and configuration (8/8 tests pass)test_api_integration.py: Tests against production API (4/4 tests pass)- All tests verify correct tool exposure and API compatibility
Commits: MCP: Bump version & Release MCP server version 0.1.2
- Version bumped from 0.1.1 to 0.1.2 (patch release)
- Includes build identifier testing phase (+build.1)
- Final stable release version 0.1.2
Commit: Update skills documentation for MCP server v0.1.2
- Removed duplicate MCP sections from skills documentation
- Updated version and feature documentation
- Added lazy initialization feature documentation
- Documented multi-deployment query capabilities
- Added per-host auth caching details
- Clarified environment variable requirements
- Added testing instructions
- Removed outdated uvx configuration examples
MCP Server
├── Entry Point: server.py (direct Python execution)
├── Lazy Initialization: YOTO_SERVICE_URL optional at startup
├── Per-Tool Deployments: service_url parameter in each tool call
├── Auth Caching: Per-host cookie caching in memory (AUTH_CACHE dict)
└── Tools:
├── oauth(service_url, action): Manage Yoto authentication
└── query_library(service_url, query): Natural language library queries
Current .vscode/mcp.json:
{
"servers": {
"yoto-library": {
"command": "python",
"args": ["/path/to/yoto-smart-stream/mcp-server/server.py"],
"env": {
"ADMIN_USERNAME": "admin",
"ADMIN_PASSWORD": "yoto",
"YOTO_USERNAME": "email@example.com",
"YOTO_PASSWORD": "${input:yotoPassword}"
}
}
}
}ADMIN_USERNAME(required): Admin account for server API authenticationADMIN_PASSWORD(required): Admin account passwordYOTO_USERNAME(optional): Yoto account email for OAuth activationYOTO_PASSWORD(optional): Yoto account password for OAuth activationYOTO_SERVICE_URL(optional): Default service URL (can be overridden per tool call)
- MCP Server object exists
- list_tools handler exists
- call_tool handler exists
- Tool definitions in source code (oauth, query_library)
- Authentication caching (AUTH_CACHE)
- Tool argument schemas with service_url
- Lazy YOTO_SERVICE_URL initialization
- Entry point configuration (sync_main)
- API health check
- API authentication
- Library data retrieval (243 cards in production)
- OAuth endpoints available
The MCP server now supports querying different deployments:
# Query production
query_library(
service_url="https://yoto-smart-stream-production.up.railway.app",
query="how many cards?"
)
# Query staging
query_library(
service_url="https://yoto-smart-stream-staging.up.railway.app",
query="how many cards?"
)
# Compare results
0c0e775- Fix MCP server: correct syntax error and update mcp.json1305e3d- Fix MCP server: use direct Python execution2ea91b1- Fix MCP server entry point: use sync_main wrapperc87e393- MCP: Make YOTO_SERVICE_URL optional269c0ee- Add comprehensive MCP server testing suite54ca168- MCP: Bump version to 0.1.2+build.16aa7360- Release MCP server version 0.1.2ba5c605- Update skills documentation
✅ All tests passing ✅ Stable version released (0.1.2) ✅ Documentation updated and pruned ✅ No push required (awaiting approval)
- Review commits on develop branch
- When ready, push to main to trigger Railway deployment
- Test deployed MCP server in VS Code/Claude Desktop