TMDB Movie Data MCP server

Integrate TMDB movie data for search, trending, and recommendation capabilities for films.
Back to servers
Provider
Laksh
Release date
Dec 10, 2024
Language
TypeScript
Stats
28 stars

This MCP server integrates with The Movie Database (TMDB) API to provide movie information, search capabilities, and recommendations. It allows you to search for movies, get trending titles, and receive personalized movie recommendations through Claude Desktop.

Prerequisites

Required Software

  • Node.js

  • npm (Node Package Manager)

    • Version 8.0.0 or higher (comes with Node.js)
    • Verify installation: npm --version

Required Accounts & API Keys

  • TMDB Account

    • Free account at TMDB
    • API key from TMDB dashboard
    • API access must be approved by TMDB
  • Claude Desktop Application

    • Latest version installed
    • Access to modify configuration files

Features

Available Tools

  • search_movies: Search for movies by title or keywords
  • get_recommendations: Get movie recommendations based on a movie ID
  • get_trending: Get trending movies for a specified time window (day or week)

Resource Access

The server provides access to TMDB movie information via tmdb:///movie/<movie_id> with details including:

  • Title and release date
  • Rating and overview
  • Genres
  • Poster URL
  • Cast information (top 5 actors)
  • Director
  • Selected reviews

Installation

Getting Started

  1. Get a TMDB API key:

    • Sign up at TMDB
    • Go to your account settings
    • Navigate to the API section
    • Request an API key for developer use
  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 up your environment variable:

    export TMDB_API_KEY=your_api_key_here
    

Installing via Smithery

For automatic installation with Claude Desktop:

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

Integration with Claude Desktop

Add the following to your app's server configuration file (located at ~/Library/Application Support/Claude/config.json):

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

Replace /full/path/to with the actual path to your project directory.

Usage Examples

Once configured and running with Claude Desktop, you can use these commands:

Searching for Movies

"Search for movies about artificial intelligence"

Getting Trending Movies

"What are the trending movies today?"
"Show me this week's trending movies"

Getting Movie Recommendations

"Get movie recommendations based on movie ID 550"

Retrieving Movie Details

"Tell me about the movie with ID 550"

Error Handling

The server includes error handling for:

  • Invalid API keys
  • Network errors
  • Invalid movie IDs
  • Malformed requests

Error messages are displayed in a user-friendly format through Claude Desktop.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later