TMDB MCP Server Movie Search & Recommendations
Discover movie details, search titles, and get personalized recommendations via the TMDB-integrated MCP server.
npx -y @Laksh-star/mcp-server-tmdbOverview
This MCP (Model Context Protocol) server connects to The Movie Database (TMDB) to provide searchable movie metadata and recommendation results in a format useful for model-context retrieval and downstream applications. It acts as a lightweight microservice that converts TMDB responses into MCP-compliant tools and endpoints, so LLMs or other models can query movie data, retrieve details, and obtain context-aware recommendations.
The server is useful when you need a consistent, programmatic interface for movie search and content enrichment — for example, powering a conversational agent that answers movie questions, seeding a recommender pipeline with TMDB metadata, or serving as a catalog lookup microservice for an app. It abstracts TMDB API calls, handles API keys and basic caching, and exposes endpoints suitable for direct use or integration into an MCP-enabled agent.
Features
- Search movies and TV titles using TMDB search endpoints
- Fetch detailed movie metadata (overview, cast, crew, release dates)
- Generate recommendations or related-title suggestions from TMDB
- MCP-friendly endpoints that return compact, context-oriented payloads
- Simple configuration via environment variables
- Example usage with curl and integration-friendly JSON responses
Installation / Configuration
Prerequisites:
- Node.js (LTS recommended) or the runtime indicated in the repository README
- A TMDB API key (register at https://www.themoviedb.org/)
Clone and install:
Create a .env file in the project root (example):
TMDB_API_KEY=your_tmdb_api_key_here
PORT=3000
CACHE_TTL=3600 # optional: cache time-to-live in seconds
LOG_LEVEL=info # optional
Start the server:
# production/start
# development with live reload (if a script exists)
By default the server will bind to the configured PORT (3000 above). If the repository provides additional start scripts (like docker-compose or a Dockerfile), refer to those for containerized deployment.
Available Tools / Resources
- GitHub repository: https://github.com/Laksh-star/mcp-server-tmdb
- TMDB API docs: https://developers.themoviedb.org/3
- Postman / HTTP clients for testing
- (Optional) MCP specification or client library used by your model/agent — adapt the responses to the MCP fields your agent expects
Typical environment variables and configuration options:
| Variable | Purpose | Example |
|---|---|---|
| TMDB_API_KEY | Required TMDB API key | TMDB_API_KEY=abc123 |
| PORT | HTTP server port | PORT=3000 |
| CACHE_TTL | Cache duration in seconds (optional) | CACHE_TTL=3600 |
Typical Endpoints
Note: Exact paths may vary based on the repository’s implementation — these are representative examples.
| Endpoint | Method | Description | Key params |
|---|---|---|---|
| /search | GET | Search movies/TV by query | q (query), page |
| /movie/:id | GET | Get detailed metadata for a movie | id (TMDB movie id) |
| /recommendations/:id | GET | Get recommended/related titles | id, page |
| /health | GET | Health/status check | — |
Example curl requests:
Search:
Get details:
Recommendations:
Use Cases
- Chatbot knowledge enrichment: Use the search endpoint to resolve user queries like “who directed Inception?” and provide model-friendly context blocks containing cast and crew.
- Recommendation microservice: Call the recommendations endpoint to fetch related titles for UI displays (e.g., “Users who liked X also liked…”) or to provide candidate prompts for a personalized content feed.
- Catalog augmentation: Enrich an internal catalog’s items with TMDB metadata (overview, genres, poster paths) by querying movie details and merging the results into your database.
- Specialized retrieval for LLMs: Serve compact, MCP-formatted context windows to a language model that needs concise facts (release year, runtime, top-billed cast) without the full TMDB payload.
Tips & Considerations
- Respect TMDB rate limits and caching guidelines; set CACHE_TTL to reduce duplicate requests.
- Keep your TMDB API key secure (do not commit .env to version control).
- Validate incoming query params and sanitize IDs to avoid unnecessary TMDB calls.
- If you plan high throughput, consider adding a persistent cache (Redis) and paginated indexing for large result sets.
For implementation details, endpoint signatures, and any advanced configuration, consult the repository: https://github.com/Laksh-star/mcp-server-tmdb.