MCP HubMCP Hub
Laksh-star

mcp-server-tmdb

by: Laksh-star

MCP Server with TMDB

25created 10/12/2024
Visit
TMDB

📌Overview

Purpose: To provide a seamless integration with The Movie Database (TMDB) API for accessing movie information, search functionalities, and personalized recommendations.

Overview: The TMDB MCP Server offers a powerful backend service that leverages the TMDB API, allowing users to retrieve comprehensive movie data, search capabilities, and trending movie insights. Designed for ease of use, the server supports various functionalities that enhance the movie discovery experience.

Key Features:

  • search_movies: Allows users to search for movies using titles or keywords, returning a list of relevant movies with essential details like titles, release years, and ratings.

  • get_recommendations: Provides tailored movie recommendations based on a specific movie ID, helping users discover similar content.

  • get_trending: Fetches the top trending movies for a specified time frame (daily or weekly), keeping users updated on popular trends.

  • Movies Resource: Accesses detailed information about movies including title, release date, rating, overview, genres, cast, and more, all returned in a convenient JSON format.


TMDB MCP Server

This MCP server integrates with The Movie Database (TMDB) API to provide movie information, search capabilities, and recommendations.

Prerequisites

Required Software

  • Node.js: Version 18.0.0 or higher
  • npm: Version 8.0.0 or higher (included with Node.js)
  • TypeScript: Installed as a project dependency

Required Accounts & API Keys

  • TMDB Account: Free account with an API key
  • Claude Desktop Application: Latest version installed

System Requirements

  • Operating Systems: macOS (10.15 or later), Linux (modern distributions)
  • Hardware: Minimum 4GB RAM, 1GB free disk space, stable internet connection

Development Environment

Recommended tools for development:

  • Code editor with TypeScript support (e.g., VS Code)
  • Terminal access
  • Git for version control

Features

Tools

  • search_movies

    • Search for movies by title or keywords
    • Returns a list of movies with details
  • get_recommendations

    • Get movie recommendations based on a movie ID
    • Returns top 5 recommended movies
  • get_trending

    • Get trending movies for a specified time window
    • Returns top 10 trending movies

Getting Started

  1. Get a TMDB API key by signing up at TMDB and requesting it from your account settings.
  2. Clone and set up the project:
    git clone [repository-url]
    cd mcp-server-tmdb
    npm install
    
  3. Build the server:
    npm run build
    
  4. Set your environment variable:
    export TMDB_API_KEY=your_api_key_here
    

Usage with Claude Desktop

To integrate with Claude Desktop, update the app's server configuration file:

{
  "mcpServers": {
    "tmdb": {
      "command": "/full/path/to/dist/index.js",
      "env": {
        "TMDB_API_KEY": "your_api_key_here"
      }
    }
  }
}

Installing via Smithery

To install TMDB Server for Claude Desktop automatically:

npx -y @smithery/cli install @Laksh-star/mcp-server-tmdb --client claude

Example Usage

Once the server is running, use commands like:

  1. Search for movies:

    "Search for movies about artificial intelligence"
    
  2. Get trending movies:

    "What are the trending movies today?"
    
  3. Get movie recommendations:

    "Get movie recommendations based on movie ID 550"
    

Error Handling

The server includes error handling for invalid API keys, network errors, and malformed requests with user-friendly error messages.

Development

To watch for changes during development:

npm run watch

License

This MCP server is licensed under the MIT License.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.