MediaSage
Tracks movies, books, and TV shows with ratings and preferences, providing intelligent cross-media recommendations. Automatically fetches metadata from OMDB, Google Books, and TMDB to help manage watchlists and analyze viewing patterns.
README
MediaSage
A Model Context Protocol (MCP) server that tracks movies, books, and TV shows, providing intelligent recommendations based on your preferences. Built with Bun, SQLite (via Drizzle ORM), and supports both local (stdio) and remote (HTTP/SSE) connections.
Features
- Multi-Media Tracking: Track movies, books, and TV shows with ratings, status, and notes
- Smart Filtering: List media by type, status, rating, genre, and more
- Cross-Media Recommendations: Get suggestions based on your preferences across all media types
- Rich Metadata: Automatic metadata fetching from OMDB (movies), Google Books (books), and TMDB (TV shows)
- Preference Analysis: Understand your favorite genres, creators, and what you typically enjoy
- Persistent Storage: SQLite database with Drizzle ORM and proper relations
- Remote Access: HTTP server with Server-Sent Events (SSE) support
- Secure: API key authentication for remote connections
Installation
# Clone the repository
git clone <your-repo-url>
cd mediasage
# Install dependencies
bun install
# Set up API keys (required for metadata enrichment)
cp .env.example .env
# Edit .env and add your API keys:
# - OMDB_API_KEY (required for movies): Get from http://www.omdbapi.com/apikey.aspx
# - TMDB_API_KEY (required for TV shows): Get from https://www.themoviedb.org/settings/api
# - GOOGLE_BOOKS_API_KEY (optional for books): Get from Google Cloud Console
# Run migration if you have existing movie data
bun run src/migrate-to-media.ts
Usage
Local Mode (stdio)
For use with Claude Desktop or other MCP clients:
# Development (with file watching)
bun run dev
# Production
bun run start
Remote Mode (HTTP/SSE)
For remote access over HTTP:
# Set environment variables
export API_KEY="your-secure-api-key"
export PORT=3000 # optional, defaults to 3000
# Development (with file watching)
bun run dev:http
# Production
bun run start:http
Available Tools
Movie Tools
search_and_add_movie
Search for a movie and add it with auto-populated metadata from OMDB.
Parameters:
title(required): Movie title to search foryear: Release year (helps accuracy)watched: Whether you've watched it (default: false)rating: Your rating (1-10) if watchednotes: Personal noteslikedAspects: What you liked (comma-separated)dislikedAspects: What you didn't likemood: When/why you watched itrecommendationContext: How this should influence recommendations
Book Tools
search_and_add_book
Search for a book and add it with auto-populated metadata from Google Books.
Parameters:
title(required): Book title to search forauthor: Author name (helps accuracy)read: Whether you've read it (default: false)rating: Your rating (1-10) if readnotes: Personal noteslikedAspects: What you liked (comma-separated)dislikedAspects: What you didn't likemood: When/why you read itrecommendationContext: How this should influence recommendations
TV Show Tools
search_and_add_tv_show
Search for a TV show and add it with auto-populated metadata from TMDB.
Parameters:
title(required): TV show title to search foryear: Year first aired (helps accuracy)watched: Whether you've watched it (default: false)rating: Your rating (1-10) if watchednotes: Personal noteslikedAspects: What you liked (comma-separated)dislikedAspects: What you didn't likemood: When/why you watched itrecommendationContext: How this should influence recommendations
General Tools
list_media
List all media with advanced filtering options.
Parameters:
type: Filter by media type ('movie', 'book', 'tv_show')watched_only: Show only watched/read itemswatchlist_only: Show only unwatched/unread itemsmin_rating: Minimum rating filter (1-10)genre: Filter by genrecreator: Filter by director/author/creatoryear: Filter by year
add_movie_to_watchlist
Add a movie to your watchlist (movies you want to watch).
Parameters:
title(required): Movie titleyear: Release yearnotes: Why you want to watch itrecommendationContext: Why it was recommended
get_smart_recommendations
Get intelligent recommendations based on your preferences across all media types.
Parameters:
mood: Current mood (e.g., 'action-packed', 'thoughtful')genre_preference: Specific genre interestlength_preference: Preferred length (short/medium/long/any)count: Number of recommendations (default: 5)
mark_as_watched
Mark a movie from your watchlist as watched and rate it.
Parameters:
id(required): Movie IDrating: Your rating (1-10)likedAspects: What you likeddislikedAspects: What you didn't likenotes: Your thoughts
analyze_preferences
Analyze your media preferences to understand your taste.
update_movie
Update an existing movie entry.
Parameters:
id(required): Movie IDrating: New rating (1-10)watched: Update watch statusnotes: Update noteslikedAspects: Update liked aspectsdislikedAspects: Update disliked aspectsmood: Update mood context
Configuration
Claude Desktop
Add to your Claude Desktop configuration:
{
"mcpServers": {
"mediasage": {
"command": "bun",
"args": ["run", "/path/to/mediasage/index.ts"]
}
}
}
Remote Client Configuration
Connect to the HTTP endpoint:
Endpoint: http://localhost:3000/mcp
Method: POST
Headers:
- Content-Type: text/event-stream
- Authorization: Bearer YOUR_API_KEY
Environment Variables
PORT: HTTP server port (default: 3000)API_KEY: Authentication key for remote access (required for HTTP mode)OMDB_API_KEY: API key for OMDB movie metadata (get free key at omdbapi.com)
Movie Metadata
The server automatically fetches movie metadata from OMDB API including:
- Directors, cast, genres, plot summaries
- IMDb ratings, Rotten Tomatoes scores
- Release dates, runtime, box office data
- Poster images and more
To enable metadata fetching, get a free API key from omdbapi.com and set:
export OMDB_API_KEY="your-api-key"
Workflow
- Add movies you've watched: Use
search_and_add_moviewithwatched: trueand your rating - Build your watchlist: Use
add_movie_to_watchlistfor movies you want to see - Rate and analyze: Use
mark_as_watchedwhen you watch something from your list - Get recommendations: Use
get_smart_recommendationsfor personalized suggestions - Understand your taste: Use
analyze_preferencesto see your movie patterns
Development
The project structure:
movie-rec-mcp/
├── index.ts # Main stdio server
├── src/
│ ├── http-server.ts # HTTP/SSE server
│ ├── sse-transport.ts # SSE transport implementation
│ └── db/
│ ├── index.ts # Database operations
│ └── schema.ts # Drizzle schema definitions
├── movies.db # SQLite database (auto-created)
└── package.json
Security Notes
- Change the default API key when deploying
- The HTTP server includes CORS headers for development
- Consider using HTTPS in production
- Database file is gitignored for privacy
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。