@atharva-think/tmdb-mcp-server
v1.0.0
Published
A Model Context Protocol server for The Movie Database (TMDB) API
Maintainers
Readme
TMDB MCP Server
A Model Context Protocol (MCP) server that provides access to The Movie Database (TMDB) API. This server enables AI assistants like Cursor to search for movies, TV shows, people, get detailed information, trending content, and recommendations.
Features
🔍 Search Tools
- Search Movies: Find movies by title with optional year filtering
- Search TV Shows: Find TV shows by name with optional year filtering
- Search People: Find actors, directors, and other industry professionals
- Multi Search: Universal search across movies, TV shows, and people
📱 Details Tools
- Movie Details: Get comprehensive movie information including cast, crew, budget, revenue
- TV Show Details: Get detailed TV show information including seasons, episodes, networks
- Person Details: Get detailed person information including biography and filmography
- Movie Credits: Get cast and crew information for movies
- TV Show Credits: Get cast and crew information for TV shows
📈 Discovery Tools
- Trending Content: Get trending movies, TV shows, and people (daily/weekly)
- Popular Content: Get most popular movies, TV shows, and people
- Recommendations: Get movie and TV show recommendations based on specific titles
- Similar Content: Find similar movies and TV shows
Prerequisites
- Node.js 18.x or higher
- TMDB API key (free registration at TMDB)
Setup
Install Dependencies
npm installGet TMDB API Key
- Go to TMDB API
- Register for a free account
- Generate an API key
Configure Environment
- Copy
.envfile and add your API key:
TMDB_API_KEY=your_actual_api_key_here TMDB_BASE_URL=https://api.themoviedb.org/3- Copy
Build the Project
npm run build
Usage
Running the Server Directly
npm startDevelopment Mode
npm run devIntegration with Cursor
Add this configuration to your Cursor MCP settings:
{
"mcpServers": {
"tmdb": {
"command": "node",
"args": ["/home/ttpl-lnvl15-0288/Projects/movie-mcp/dist/server.js"],
"cwd": "/home/ttpl-lnvl15-0288/Projects/movie-mcp"
}
}
}Available Tools
Search Tools
search_movies(query, year?, page?)- Search for moviessearch_tv_shows(query, year?, page?)- Search for TV showssearch_people(query, page?)- Search for peoplesearch_multi(query, page?)- Universal search
Details Tools
get_movie_details(id)- Get detailed movie informationget_tv_show_details(id)- Get detailed TV show informationget_person_details(id)- Get detailed person informationget_movie_credits(id)- Get movie cast and crewget_tv_show_credits(id)- Get TV show cast and crew
Discovery Tools
get_trending_movies(timeWindow?, page?)- Get trending moviesget_trending_tv_shows(timeWindow?, page?)- Get trending TV showsget_trending_people(timeWindow?, page?)- Get trending peopleget_popular_movies(page?)- Get popular moviesget_popular_tv_shows(page?)- Get popular TV showsget_popular_people(page?)- Get popular peopleget_movie_recommendations(id, page?)- Get movie recommendationsget_tv_show_recommendations(id, page?)- Get TV show recommendationsget_similar_movies(id, page?)- Get similar moviesget_similar_tv_shows(id, page?)- Get similar TV shows
Example Usage
Once connected through Cursor, you can ask questions like:
- "Search for movies about space exploration"
- "Get details about the movie Inception"
- "What are the trending movies this week?"
- "Find movies similar to The Matrix"
- "Who are the most popular actors right now?"
- "Get the cast and crew for Breaking Bad"
Rate Limiting
The server implements TMDB's rate limiting (40 requests per 10 seconds) automatically with proper queuing and retry logic.
Error Handling
- Comprehensive error handling for API failures
- Input validation using Zod schemas
- Graceful handling of network errors and rate limits
Future Expansions
This architecture can be easily adapted for other APIs such as:
- Athena Health: Patient data, appointment scheduling, clinical workflows
- Cerner: EHR integration, clinical decision support, reporting
- Epic MyChart: Patient portal integration, health records access
Development
Project Structure
src/
├── server.ts # Main MCP server
├── tmdb-client.ts # TMDB API wrapper
├── types/
│ └── tmdb.ts # TypeScript type definitions
└── tools/
├── search.ts # Search tools
├── details.ts # Details tools
└── discovery.ts # Discovery toolsScripts
npm run build- Build TypeScript to JavaScriptnpm run dev- Run in development mode with ts-nodenpm start- Start the built servernpm run clean- Clean build directory
License
MIT License - see LICENSE file for details.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Support
For issues and questions:
- Check the TMDB API documentation
- Verify your API key is valid
- Check server logs for error messages
- Ensure Node.js version compatibility
