Skip to main content
Glama
wizzy-mcp-tmdb

wizzy-mcp-tmdb

by drakonkat

wizzy-mcp-tmdb

Build Status

Coverage

Project Overview and Purpose

The wizzy-mcp-tmdb project is an MCP (Model Context Protocol) server implemented in JavaScript that provides tools to search and retrieve information from The Movie Database (TMDB). It allows AI clients to access movie, TV show, and person data through a standardized protocol.

Related MCP server: moviefinder-mcp

Key Features

  • Search Movies: Perform multi-search across movies, TV shows, and people using the search_tmdb tool.

  • Get Details: Fetch detailed information for specific items using the get_tmdb_details tool.

  • Trending Content: Retrieve trending content across all media types with the trending_all tool.

Installation

Prerequisites

  • Node.js version 18 or higher (required for global fetch support)

  • A TMDB API key (Bearer token) from your admin, used with the TNL TMDB proxy (production-api.tnl.one)

Setup

  1. Clone the repository and navigate to the project directory.

  2. Install dependencies:

    npm install
  3. Set up your TMDB API key as an environment variable:

    • On Windows PowerShell:

      $env:TMDB_AUTH_TOKEN="YOUR_TNL_PROXY_BEARER_TOKEN"
    • On macOS/Linux:

      export TMDB_AUTH_TOKEN="YOUR_TNL_PROXY_BEARER_TOKEN"

Usage

Starting the MCP Server

To start the server:

npm start

The server communicates over stdio and should be configured in your MCP-compatible client (e.g., IDE or chat client) with the command node mcp-tmdb-server.js and the TMDB_AUTH_TOKEN environment variable.

MCP Integration Examples

Here are code snippets showing how to integrate with the MCP tools:

Search for Movies

// Example MCP tool call for searching
{
  "method": "tools/call",
  "params": {
    "name": "search_tmdb",
    "arguments": {
      "query": "dune",
      "page": 1,
      "language": "en-US",
      "include_adult": false
    }
  }
}

Get Movie Details

// Example MCP tool call for getting details
{
  "method": "tools/call",
  "params": {
    "name": "get_tmdb_details",
    "arguments": {
      "type": "movie",
      "id": 438631,
      "append": "credits,images"
    }
  }
}
// Example MCP tool call for trending content
{
  "method": "tools/call",
  "params": {
    "name": "trending_all",
    "arguments": {
      "time_window": "day",
      "page": 1,
      "language": "en-US"
    }
  }
}

MCP Client Integration

Per integrare questo MCP server nel tuo client MCP (come un IDE o un client di chat compatibile), segui questi passi:

  1. Installa il pacchetto npm se necessario:

    npm install -g wizzy-mcp-tmdb
  2. Crea o aggiorna il file mcp.json nel tuo client MCP con la seguente configurazione:

    {
      "mcpServers": {
        "tmdb": {
          "command": "npx",
          "args": ["wizzy-mcp-tmdb"],
          "env": {
            "TMDB_AUTH_TOKEN": "YOUR_TNL_PROXY_BEARER_TOKEN"
          },
          "alwaysAllow": [
            "get_watch_providers",
            "discover_tv",
            "discover_by_provider"
          ]
        }
      }
    }

    Nota: Il TMDB_AUTH_TOKEN può essere impostato a un valore casuale per ora, poiché le chiamate API TMDB sono gratuite e non richiedono autenticazione obbligatoria.

Testing Strategy

The project uses Jest for comprehensive testing, including:

  • Unit Tests: Validate individual handler functions, input validation, and response formatting (see tests/unit/handlers.test.js).

  • Integration Tests: Test API interactions with mocked responses, error handling, and network failures (see tests/integration/api.test.js).

  • Protocol Tests: Ensure MCP protocol compliance, including tool listing and calling (see tests/protocol/mcp.test.js).

Run the test suite with:

npm test

For watch mode:

npm run test:watch

Project Structure

wizzy-mcp-tmdb/
├── mcp-tmdb-server.js          # Main MCP server implementation
├── package.json                # Project configuration and dependencies
├── MCP_GUIDE.md                # Detailed MCP integration guide
├── babel.config.cjs            # Babel configuration for Jest
├── tests/
│   ├── unit/
│   │   └── handlers.test.js    # Unit tests for handlers
│   ├── integration/
│   │   └── api.test.js         # Integration tests for API calls
│   └── protocol/
│       └── mcp.test.js         # MCP protocol compliance tests
└── tests/fixtures/             # Mock data for tests
    ├── movieDetails.json
    ├── searchMultiResponse.json
    └── trendingAllResponse.json

Contributing

We welcome contributions! Please follow these guidelines:

  1. Fork the repository.

  2. Create a feature branch.

  3. Make your changes and add tests.

  4. Ensure all tests pass.

  5. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Thanks to The Movie Database (TMDB) for providing the API.

  • Built using the Model Context Protocol SDK.

Contact

For questions or support, please open an issue on GitHub.

Available Tools

23 tools
discover_by_providerA

Discovers movies or TV shows available on specific streaming providers in a region. Input: type (optional: tv|movie, default tv), with_watch_providers (required comma-separated provider IDs), watch_region (required ISO 3166-1), language (optional ISO 639-1, default en), page (optional), sort_by (optional). Output: JSON with paginated results. Purpose: Personalized content discovery based on streaming availability for AI agents.

Inputs: watch_region (required), with_watch_providers (required), language, page, +2 more.

discover_moviesC

Performs advanced discovery of movies with extensive filtering options. Input: Optional parameters including language (ISO 639-1), region (ISO 3166-1), sort_by, certifications, release dates, genres, keywords, watch providers, vote counts, etc. Output: JSON with paginated results. Purpose: Enable complex, criteria-based movie discovery for AI-driven content curation.

Inputs: certification, certification.gte, certification.lte, certification_country, +36 more.

discover_tvA

Performs advanced discovery of TV shows with extensive filtering options. Input: Optional parameters including language (ISO 639-1), sort_by, air dates, genres, networks, keywords, watch providers, vote counts, etc. Output: JSON with paginated results. Purpose: Enable complex, criteria-based TV show discovery for AI-driven content curation.

Inputs: air_date.gte, air_date.lte, first_air_date.gte, first_air_date.lte, +27 more.

get_tmdb_detailsA

Fetches detailed information for a movie, TV show, or person by type and ID. Input: type (required: movie|tv|person), id (required TMDB ID), language (optional ISO 639-1), append (optional comma-separated fields like credits,images). Output: JSON with full item details. Purpose: Obtain in-depth metadata for targeted content analysis by AI agents.

Inputs: id (required), type (required), append, language.

get_watch_providersB

Retrieves watch providers (streaming services) for movies or TV in a specific region. Input: type (required: movie|tv), language (optional ISO 639-1, default en), watch_region (required ISO 3166-1 code). Output: JSON with provider list. Purpose: Discover streaming availability for content recommendations by AI agents.

Inputs: type (required), watch_region (required), language.

movie_creditsA

Fetches cast and crew credits for a movie. Input: movie_id (required TMDB ID), language (optional ISO 639-1 code). Output: JSON with cast and crew details. Purpose: Retrieve detailed personnel information for movie analysis and recommendations by AI agents.

Inputs: movie_id (required), language.

movie_imagesB

Fetches images (posters, backdrops, logos) for a movie. Input: movie_id (required TMDB ID), language (optional ISO 639-1 code), include_image_language (optional comma-separated languages). Output: JSON with image arrays. Purpose: Obtain visual media assets for a movie to support AI-driven image processing or content enrichment.

Inputs: movie_id (required), include_image_language, language.

movie_listsA

Retrieves lists and collections that include a specific movie. Input: movie_id (required TMDB ID), language (optional ISO 639-1 code), page (optional page number). Output: JSON with paginated results of lists containing the movie. Purpose: Discover curated collections and lists featuring a movie for content curation by AI agents.

Inputs: movie_id (required), language, page.

movie_reviewsB

Retrieves user reviews and ratings for a movie. Input: movie_id (required TMDB ID), language (optional ISO 639-1 code), page (optional), region (optional ISO 3166-1 code). Output: JSON with paginated review results. Purpose: Access public opinions and critiques for sentiment analysis by AI agents.

Inputs: movie_id (required), language, page, region.

person_detailsA

Retrieves detailed information about a person (actor, director, etc.) from TMDB. Input: person_id (required TMDB ID), language (optional ISO 639-1 code), append (optional comma-separated fields like images,combined_credits,external_ids). Output: JSON with biography, birth/death info, and appended data. Purpose: Get comprehensive person profiles for AI-driven content analysis or recommendations.

Inputs: person_id (required), append, language.

search_keywordsB

Searches for TMDB keywords (tags) by text query. Input: query (required search string), page (optional page number). Output: JSON with paginated keyword results. Purpose: Discover keywords for content categorization and search optimization by AI agents.

Inputs: query (required), page.

search_tmdbA

Performs a multi-type search across TMDB for movies, TV shows, and people. Input: query (required search string), page (optional 1-1000), language (optional ISO 639-1), include_adult (optional boolean), region (optional ISO 3166-1). Output: JSON with paginated normalized results (id, media_type, title, date, etc.). Purpose: Enable comprehensive content discovery for AI-driven queries.

Inputs: query (required), include_adult, language, page, +1 more.

search_tmdb_moviesA

Searches specifically for movies in TMDB. Input: query (required search string), year (optional release year filter), page (optional), language (optional ISO 639-1), include_adult (optional boolean), region (optional ISO 3166-1). Output: JSON with paginated normalized results. Purpose: Targeted movie discovery for AI-driven content queries.

Inputs: query (required), include_adult, language, page, +2 more.

search_tmdb_personA

Searches for people (actors, directors, etc.) in TMDB. Input: query (required search string), page (optional), language (optional ISO 639-1), include_adult (optional boolean), region (optional ISO 3166-1). Output: JSON with paginated person results. Purpose: Discover individuals for cast/crew analysis by AI agents.

Inputs: query (required), include_adult, language, page, +1 more.

search_tmdb_tvA

Searches specifically for TV shows in TMDB. Input: query (required search string), page (optional), language (optional ISO 639-1), first_air_date_year (optional year filter), include_adult (optional boolean). Output: JSON with paginated normalized results. Purpose: Targeted TV show discovery for AI-driven content queries.

Inputs: query (required), first_air_date_year, include_adult, language, +1 more.

tv_airing_todayA

Retrieves TV series airing today. Input: page (optional), language (optional ISO 639-1), timezone (optional). Output: JSON with paginated results. Purpose: Discover TV shows currently airing for timely recommendations by AI agents.

Inputs: language, page, timezone.

tv_creditsB

Fetches cast and crew credits for a TV show. Input: tv_id (required TMDB ID), language (optional ISO 639-1). Output: JSON with cast and crew details. Purpose: Retrieve detailed personnel information for TV show analysis and recommendations by AI agents.

Inputs: tv_id (required), language.

tv_top_ratedA

Retrieves top-rated TV series. Input: page (optional), language (optional ISO 639-1), region (optional ISO 3166-1). Output: JSON with paginated results. Purpose: Access highly rated TV shows for quality content recommendations by AI agents.

Inputs: language, page, region.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 23 tools

    Disambiguation4/5

    Most tools have distinct purposes, such as discover_movies vs. search_tmdb_movies, but some overlap exists, like discover_by_provider and get_watch_providers, which could cause confusion. However, descriptions help clarify their specific focuses, and the majority are well-differentiated by resource type (e.g., movies, TV, people) and action.

    Naming Consistency5/5

    Tool names follow a highly consistent snake_case pattern with clear verb_noun structures, such as discover_movies, get_tmdb_details, and search_tmdb. All tools adhere to this convention, making them predictable and easy to understand across the set.

    Tool Count3/5

    With 23 tools, the count is borderline high for a TMDB API server, as it includes many specialized tools like multiple trending and search variants. While comprehensive, it may feel heavy and could be streamlined without losing core functionality, such as by merging similar tools like trending_all and individual trending types.

    Completeness5/5

    The tool set provides extensive coverage for the TMDB domain, including discovery, search, details, credits, images, reviews, and trending across movies, TV shows, and people. It supports full CRUD-like operations where applicable (e.g., get details, search) and offers advanced filtering, leaving no obvious gaps for AI-driven content analysis and recommendations.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      An MCP server that wraps The Movie Database (TMDB) API, enabling search for movies and TV shows, retrieval of movie details, recommendations, similar movies, trending content, streaming providers, and movie discovery.
      8
      -
    • F
      license
      A
      quality
      D
      maintenance
      An MCP server that wraps the TMDB API, enabling search of movies and TV shows, retrieval of details, trending titles, recommendations, and streaming provider information.
      8
      -
    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server that allows LLMs to search for movies and TV shows using the The Movie Database (TMDB) API.
      7
      30 npm
      1
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      A robust MCP server that wraps The Movie Database API, enabling LLMs to search movies, get details, popular movies, and recommendations.
      -