TMDB MCP Server

TMDB MCP Server

A robust MCP server that wraps The Movie Database API, enabling LLMs to search movies, get details, popular movies, and recommendations.

Category
Visit Server

README

TMDB Model Context Protocol (MCP) Server

MCP Server Python 3.10+

A robust Model Context Protocol (MCP) server that seamlessly wraps The Movie Database (TMDB) API. This server enables Large Language Models (LLMs) and MCP-compatible clients (like Claude Desktop) to invoke specialized tools for exploring movie databases, fetching detailed cinematic data, and dynamically retrieving tailored film recommendations.

🌟 Key Features

This server currently exposes four native MCP tools:

  • search_movies: Search for movies by title to retrieve a matching list of films alongside their TMDB IDs, release dates, and overviews.
  • get_movie_details: Fetch comprehensive information about a specific movie, including its cast, runtime, tagline, average rating, and genres.
  • get_popular_movies: Retrieve dynamically paging lists of the current most popular movies globally.
  • get_movie_recommendations: Retrieve five intelligently tailored movie recommendations based on a previously selected movie ID.

🛠 Resilience & Architecture

  • Graceful Rate Limiting: Properly traps HTTP 429 Too Many Requests when TMDB rate limits are exceeded, presenting clean contextual errors back to the caller instead of crashing.
  • Strict STDIO Transport: Ensures no arbitrary stdout pollution occurs so that the standard input/output streams needed for the MCP binary protocol remain pristine.
  • Authentication Protected: Built to enforce API keys implicitly via environment variables, safeguarding your private API credentials from being logged payload contents.
  • Mock Demo Mode: Built-in mock testing so you can evaluate the agent capabilities locally before you register for an official API token.

🚀 Getting Started

Prerequisites

  1. Python 3.10 or higher.
  2. A free TMDB API Read Access Token.

Installation

  1. Clone this repository directly to your machine:
git clone https://github.com/your-username/building-a-custom-mcp.git
cd building-a-custom-mcp
  1. Install the required Python dependencies:
pip install -r requirements.txt

(Note: The environment relies on the official mcp SDK and httpx to facilitate robust asynchronous API requests.)


🎮 Running the Demo Script

We included a programmatic client script (demo.py) that boots up an isolated MCP session natively and runs test calls against all of the created tools.

To run the live demo with your API key:

# macOS/Linux
export TMDB_API_KEY="your_jwt_token_here"
python demo.py

# Windows Command Prompt
set TMDB_API_KEY=your_jwt_token_here
python demo.py

# Windows PowerShell
$env:TMDB_API_KEY="your_jwt_token_here"
python demo.py

Mock Testing

If you don't have a TMDB key on hand but want to see the exact structural output, you can run the application in "Mock Demo Mode":

# Windows
set TMDB_API_KEY=demo
python demo.py

🧩 Integrating with Claude Desktop

To run this server permanently inside Claude Desktop, simply inject this application into your Claude MCP configuration file.

  1. Locate your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add a new server definition to the mcpServers object. Provide the absolute path to your server.py script and your TMDB token:

{
  "mcpServers": {
    "tmdb": {
      "command": "python",
      "args": [
        "C:\\absolute\\path\\to\\building-a-custom-mcp\\server\\server.py"
      ],
      "env": {
        "TMDB_API_KEY": "YOUR_TMDB_READ_ACCESS_TOKEN_HERE"
      }
    }
  }
}

Note: For Windows paths, ensure backward slashes are explicitly escaped (e.g., C:\\Users\\...).


🤝 Contributing

Feel free to open Issues or submit Pull Requests for expansions—such as adding tools for fetching TV shows, actor portfolios, or user reviews!

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured