Successfully implemented a Model Context Protocol (MCP) server for the yoto-smart-stream project that enables natural language queries of the Yoto library.
- Imported
mcp-builderskill from anthropic/skills repository - Includes comprehensive guides for MCP server development
- Located at
.github/skills/mcp-builder/
- Location:
mcp-server/directory - Language: Python 3.10+
- Protocol: MCP over stdio
- Deployment: Runs locally, connects to Railway-deployed yoto-smart-stream service
- Find cards by title (e.g., "find all cards with 'princess' in the title")
- List all metadata keys used across the library
- Explore author fields and unique authors
- List all playlists with item counts
- Count total cards and playlists
- List all cards with pagination
- Environment variables:
YOTO_SERVICE_URL,ADMIN_USERNAME,ADMIN_PASSWORD - Command-line arguments:
--url,--username,--password - Secure authentication with the yoto-smart-stream service
- VS Code MCP configuration examples (
.vscode/mcp.json) - Claude Desktop configuration examples
- Multiple installation methods (uvx, pip, direct Python)
mcp-server/README.md: Complete setup and usage guide- Installation instructions
- VS Code configuration examples (5 different options)
- Claude Desktop configuration
- Example queries
- Troubleshooting guide
- Development instructions
.github/skills/yoto-smart-stream/SKILL.md: Added Part 3: MCP Server Integration- Quick start guide
- Configuration examples
- Example queries
- Links to complete documentation
mcp-server/
├── server.py # Main MCP server implementation
├── pyproject.toml # Package configuration for uvx
└── README.md # Complete documentation
.github/skills/mcp-builder/
├── SKILL.md
├── LICENSE.txt
└── reference/
├── evaluation.md
├── mcp_best_practices.md
├── node_mcp_server.md
└── python_mcp_server.md
{
"mcpServers": {
"yoto-library": {
"command": "uvx",
"args": ["--from", "/path/to/yoto-smart-stream/mcp-server", "mcp-server"],
"env": {
"YOTO_SERVICE_URL": "https://your-deployment.railway.app",
"ADMIN_USERNAME": "admin",
"ADMIN_PASSWORD": "your-password"
}
}
}
}- Protocol: MCP (Model Context Protocol) over stdio
- Transport: Standard input/output streams
- Authentication: HTTP Basic Auth to yoto-smart-stream service
- Data Source: REST API calls to
/api/libraryendpoint
mcp>=0.9.0- Model Context Protocol SDKhttpx>=0.25.0- Async HTTP clientpydantic>=2.4.0- Data validation
- query_library: Natural language queries of the Yoto library
- Input: Query string
- Output: Formatted text results
- yoto://library: Direct JSON access to library data
- ✅ Python syntax validation
- ✅ Module import test
- ✅ Type checking with mypy
- ✅ Code formatting with black
- ✅ Linting with ruff
# Install and run
uvx --from /path/to/yoto-smart-stream/mcp-server mcp-server
# Or with arguments
python mcp-server/server.py \
--url https://your-app.railway.app \
--username admin \
--password secretUsers can now:
- Configure the MCP server in their VS Code or Claude Desktop
- Query their Yoto library using natural language
- Explore card metadata, authors, and playlists
- Find specific content quickly
- Credentials can be passed via environment variables (recommended) or CLI arguments
- Environment variables are more secure than CLI arguments
- Authentication is required to access the yoto-smart-stream service
- MCP server runs locally, no Railway deployment needed
- MCP Server Documentation:
mcp-server/README.md - Yoto Smart Stream Skill:
.github/skills/yoto-smart-stream/SKILL.md - MCP Builder Skill:
.github/skills/mcp-builder/SKILL.md - Model Context Protocol: https://modelcontextprotocol.io/