Supports configuration through environment variables stored in a .env file, used for managing API keys for the movie data services.
Provides movie search and detailed information through the OMDb API, allowing users to search movies by title and year, and get complete information including synopsis, director, and actors.
Serves as the runtime environment for the MCP server, requiring version 18+ for proper functionality.
Used for development with static typing, providing type safety for the movie search and information retrieval functionality.
Handles parameter validation for movie search queries and other requests to ensure proper data formatting and error handling.
🎬 Movie Search MCP Server
A complete MCP (Model Context Protocol) server for searching and obtaining detailed movie information using OMDb (IMDB) and TMDb APIs.
🚀 Features
- ✅ Search movies by title and year
- ✅ Detailed movie information (synopsis, director, actors, etc.)
- ✅ Genre-based recommendations
- ✅ Popular/trending movies
- ✅ Support for multiple APIs (OMDb + TMDb)
- ✅ English responses
- ✅ Robust error handling
📋 Requirements
- Node.js 18+
- TypeScript
- API keys (see configuration)
🛠️ Installation
- Clone or create the project:
- Install dependencies:
- Build the project:
🔐 API Configuration
OMDb API (Free)
- Go to: https://www.omdbapi.com/apikey.aspx
- Register to get your free API key
- Add the environment variable:
OMDB_API_KEY=your_api_key
TMDb API (Free)
- Go to: https://www.themoviedb.org/settings/api
- Register and request an API key
- Add the environment variable:
TMDB_API_KEY=your_api_key
Environment Variables
Create a .env
file in the project root:
🎯 Available Tools
1. search_movies
Search movies by title and optionally by year.
Parameters:
title
(string, required): Movie titleyear
(string, optional): Movie year
Example:
2. get_movie_details
Get complete information for a specific movie.
Parameters:
id
(string, required): Movie ID (IMDB ID or TMDb ID)source
(string, optional): 'omdb' or 'tmdb' (default: 'omdb')
Example:
3. recommend_movies
Get movie recommendations by genre.
Parameters:
genre
(string, optional): Specific genre
Available genres:
- action, adventure, animation, comedy, crime
- documentary, drama, family, fantasy, history
- horror, music, mystery, romance, science fiction
- thriller, war, western
Example:
4. popular_movies
Get the most popular movies of the week.
Parameters: None
Example:
5. movie_help
Show help information about all available tools.
🔧 Cursor Configuration
To use this MCP server in Cursor, add the following configuration to your .cursor/mcp.json
file:
🎮 Usage in Cursor
Once configured, you can use the tools directly in Cursor:
🧪 Testing
To test the server locally:
📝 Available Scripts
npm run build
: Compile TypeScript to JavaScriptnpm run dev
: Build in watch modenpm start
: Run the compiled servernpm test
: Run the server (start alias)
🔍 Project Structure
🌟 Technical Features
- MCP Protocol: Implements the Model Context Protocol standard
- Multiple APIs: Combines OMDb and TMDb for better results
- Validation: Uses Zod for parameter validation
- TypeScript: Fully typed code
- Error handling: Informative responses in case of error
- Internationalization: English responses
🤝 Contributing
- Fork the project
- Create a feature branch (
git checkout -b feature/new-feature
) - Commit your changes (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin feature/new-feature
) - Open a Pull Request
📄 License
MIT License - see the LICENSE file for more details.
🆘 Troubleshooting
Error: "Module not found"
- Make sure to run
npm install
- Verify that Node.js is installed (version 18+)
Error: "API key invalid"
- Verify that environment variables are configured correctly
- Confirm that API keys are valid
Error: "No results found"
- Check your internet connection
- Confirm that movie names are spelled correctly
Server not responding
- Verify that the file is compiled (
npm run build
) - Check the configuration in
.cursor/mcp.json
- Confirm that the path to the file is correct
This server cannot be installed
An MCP server that allows users to search for movies, get detailed information, receive genre-based recommendations, and discover popular/trending films using OMDb and TMDb APIs.
Related MCP Servers
- -securityFlicense-qualityAn MCP server that enables LLMs to search YouTube, retrieve video information, and access video transcripts through standardized tools.Last updated -TypeScript
- -securityAlicense-qualityA comprehensive MCP server providing detailed IMDb data including movies, TV shows, and upcoming releases.Last updated -3PythonMIT License
- AsecurityFlicenseAqualityA Python-based MCP server that integrates with Plex Media Server API to search for movies and manage playlists in your Plex media library.Last updated -91Python
- -securityFlicense-qualityA Model Context Protocol server that enables searching and retrieving detailed information about movies and TV shows using The Movie Database (TMDB) API.Last updated -Python