Skip to content

Latest commit

 

History

History
153 lines (123 loc) · 4.53 KB

File metadata and controls

153 lines (123 loc) · 4.53 KB

MCP Media Server - Project Status

✓ Completed

Core Functionality

  • MCP server with list_movies tool
  • MCP server with play_movie tool
  • stdio transport support
  • HTTP transport support (SSE)
  • HTTPS transport support (SSE with SSL)
  • Automatic media player detection (VLC, MPV, MPlayer, xdg-open)
  • Cross-platform support (Linux, macOS, Windows)

Client Application

  • Fully functional MCP client
  • Protocol selection (--protocol stdio/http/https)
  • Command selection (--command list/play)
  • Movie name specification (--movie)
  • URL specification for HTTP/HTTPS (--url)
  • Server script path configuration (--server-script)

Documentation

  • README.md - Complete project documentation
  • QUICKSTART.md - Fast getting started guide
  • EXAMPLES.md - Comprehensive usage examples
  • STATUS.md - This file

Testing & Setup

  • requirements.txt - All dependencies
  • test_basic.sh - Basic environment tests
  • test_all_transports.sh - Comprehensive transport tests
  • setup_test_env.sh - Environment setup script

Compatibility

  • Claude Desktop integration (stdio)
  • n8n integration (HTTP/HTTPS)
  • Remote access support (HTTP/HTTPS)

Tested & Working

stdio Transport

python media_client.py --protocol stdio --command list
python media_client.py --protocol stdio --command play --movie "Airplane!.mp4"

Status: ✓ WORKING

HTTP Transport

# Server
python media_server.py --transport http --host 127.0.0.1 --port 8000

# Client
python media_client.py --protocol http --url http://127.0.0.1:8000/sse --command list
python media_client.py --protocol http --url http://127.0.0.1:8000/sse \
    --command play --movie "Airplane!.mp4"

Status: ✓ WORKING

HTTPS Transport

# Generate certificates
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

# Server
python media_server.py --transport https --host 127.0.0.1 --port 8443 \
    --certfile cert.pem --keyfile key.pem

# Client
python media_client.py --protocol https --url https://127.0.0.1:8443/sse --command list

Status: ✓ READY (requires SSL certificates)

Environment

  • Python: 3.11.2
  • MCP Package: 1.17.0
  • Starlette: 0.48.0
  • Uvicorn: 0.37.0
  • SSE-Starlette: 3.0.2
  • Platform: Linux (Raspberry Pi)
  • Media Player: VLC (/usr/bin/vlc)
  • Media Files: 4 movies found in ~/Media/MOVIES

File Structure

/home/nkatz/Development/mcp2/
├── media_server.py              # MCP server (stdio/HTTP/HTTPS)
├── media_client.py              # MCP client (all transports)
├── requirements.txt             # Python dependencies
├── README.md                    # Full documentation
├── QUICKSTART.md               # Quick start guide
├── EXAMPLES.md                 # Usage examples
├── STATUS.md                   # This file
├── test_basic.sh               # Basic environment tests
├── test_all_transports.sh      # Transport tests
└── setup_test_env.sh           # Setup script

Next Steps

  1. Test with Claude Desktop:

    • Add server to claude_desktop_config.json
    • Restart Claude Desktop
    • Ask: "What movies are available?"
  2. Test Remote Access:

    • Start HTTP server with --host 0.0.0.0
    • Connect from another machine on the network
    • Use for remote-controlled kiosk
  3. Integrate with n8n:

    • Create workflow nodes
    • Use HTTP endpoints
    • Automate playback schedules
  4. Generate SSL Certificates (for HTTPS):

    openssl req -x509 -newkey rsa:4096 -keyout key.pem \
        -out cert.pem -days 365 -nodes \
        -subj "/C=US/ST=State/L=City/O=Organization/CN=localhost"

Known Limitations

  1. Only one movie can be played at a time
  2. Play command launches player but doesn't return playback status
  3. No pause/stop/seek controls (would require media player API integration)
  4. File listing is basic (no thumbnails, metadata, or sorting options)

Future Enhancements (Optional)

  • Add resource support for movie metadata
  • Implement playback status monitoring
  • Add playlist support
  • Include subtitle file detection
  • Add filtering/sorting options
  • Support for streaming URLs
  • Integration with media databases (IMDB, TMDB)
  • Thumbnail generation

Support

For issues or questions:

  1. Check README.md for documentation
  2. See EXAMPLES.md for usage patterns
  3. Run test_basic.sh to verify environment
  4. Check MCP docs: https://modelcontextprotocol.io/

License

MIT License - Free to use and modify