Skip to main content

cinelens-mcp

An MCP server for movie and TV discovery, powered by TMDB, TVmaze, and Watchmode.

A standalone FastMCP server, extracted from the CineLens conversational movie agent. Bring your own API keys (BYOK) — nothing is bundled or hardcoded.

Features

Movies

  • search_movie_tool — search TMDB by title
  • discover_recent_movies_tool — browse by real release date ("recent"/"latest"/"new")
  • discover_by_genre_tool — browse by genre, optionally within a recent window
  • search_person_tool — find an actor or director by name
  • get_person_credits_tool — list a person's movie credits, newest first
  • select_movie_tool — switch the active movie to a specific candidate
  • get_movie_details_tool — details for the active movie
  • get_cast_tool — cast for the active movie
  • get_recommendations_tool — recommendations similar to the active movie
  • get_watch_providers_tool — where to stream/rent/buy the active movie

TV Shows

  • search_tv_show_tool — search TVmaze by title (free, no API key required)
  • get_show_details_tool — name, status, genres, rating, network, schedule, summary
  • get_show_streaming_tool — streaming sources grouped by free/subscription/rent/buy

Theatres

  • get_now_playing_tool — up to 10 movies currently playing in theatres
  • get_trending_tool — top 10 trending movies for "day" or "week"

Quickstart (Claude Desktop)

Add this to claude_desktop_config.json:

{
  "mcpServers": {
    "cinelens": {
      "command": "uvx",
      "args": ["cinelens-mcp"],
      "env": {
        "TMDB_API_KEY": "your-tmdb-bearer-token",
        "DEFAULT_REGION": "US",
        "WATCHMODE_API_KEY": "your-watchmode-api-key"
      }
    }
  }
}

Restart Claude Desktop, then ask it to search for a movie — it will call search_movie_tool first automatically, then any other tools.

Environment variables

Variable Required Where to get it Default
TMDB_API_KEY Yes, at call time for all movie tools themoviedb.org/settings/api (v4 Bearer token)
DEFAULT_REGION No ISO 3166-1 country code US
WATCHMODE_API_KEY Yes, at call time for get_show_streaming_tool api.watchmode.com

TVmaze tools (search_tv_show_tool, get_show_details_tool) need no key.

Bring Your Own Key (BYOK)

cinelens-mcp ships with no embedded credentials. Every tool that calls a paid or rate-limited API reads its key from an environment variable at call time, not at import time — so the server starts and lists its tools fine even with no keys configured, and only fails the specific tool call that needed a missing key. This keeps the package free to distribute, puts API usage and billing under each user's own account, and means a key never has to be committed, bundled, or shared to use the server. Keys are read only by the module that owns the corresponding backend (see backends/) and are never logged or included in a tool response or error message.

Tool reference

Tool Description Inputs Prerequisite
search_movie_tool Search for a movie by title query: str none (entry point)
discover_recent_movies_tool Browse movies by real release date within_days=90, genre_keyword, sort_by, region none (entry point)
discover_by_genre_tool Browse movies by genre genre: str, within_days, region, limit=10 none (entry point)
search_person_tool Find an actor/director by name query: str none
get_person_credits_tool List a person's movie credits person_id: int, role="all", limit=10 none
select_movie_tool Set active movie from a candidate list movie_id: int a prior search/discover/credits call
get_movie_details_tool Details for the active movie active movie
get_cast_tool Cast for the active movie limit=10 active movie
get_recommendations_tool Recommendations for the active movie limit=10 active movie
get_watch_providers_tool Watch providers for the active movie region active movie
get_now_playing_tool Movies currently in theatres none
get_trending_tool Top trending movies time_window="week" none
search_tv_show_tool Search for a TV show by title query: str none (entry point)
get_show_details_tool Details for a TV show show_id: int active TV show
get_show_streaming_tool Streaming sources for a TV show show_id: int active TV show

How it works: prerequisite middleware

Tools that depend on an active movie or TV show (e.g. get_cast_tool, get_show_details_tool) require an entry-point tool to have run first in the same session. This is not enforced by instructing the model in a system prompt — LLMs occasionally skip or misorder steps when the rule lives only in text. Instead, middleware/prerequisites.py checks session state programmatically before every gated tool executes, keyed off fields on MovieSessionState (movie_id, show_id, last_candidates) that are only ever set by a successful upstream call.

If the prerequisite isn't met, the tool call is short-circuited and returns a structured error instead of hitting the backend:

{
  "error": "prerequisite_not_met",
  "message": "Please search for a movie first.",
  "required_tool": "search_movie"
}

The movie chain and TV chain gate independently — an active movie doesn't satisfy a TV prerequisite and vice versa. This makes the dependency graph a property of the code, not a hope about model behavior, so it holds under any client and any prompt.

Reliability

TMDB requests automatically retry on 429/5xx with exponential backoff (3 retries, respecting Retry-After); persistent rate limiting raises TMDBRateLimitError rather than failing silently.

Install & run

uvx cinelens-mcp

Or from source:

uv sync
uv run cinelens-mcp

Development

uv sync
uv run pytest

See CONTRIBUTING.md for how to add a new tool or data source.

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cinelens_mcp-0.1.0.tar.gz (102.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cinelens_mcp-0.1.0-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file cinelens_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: cinelens_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 102.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cinelens_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 23a422c8bb2e32c04016e58c7354471f258cb8608cc076a031a7a429a12bf398
MD5 a9382edc3f883053047ca9de84b2685b
BLAKE2b-256 c3567de43df1cbea89c4e0fc82af820797d292cf84b7b9c830e2bb6e091ae6b4

See more details on using hashes here.

File details

Details for the file cinelens_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cinelens_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cinelens_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b7881201b71fc3df1f91ec8ff3b0db3c9291172901ad95d7b3549db91671fd6
MD5 401902c62ca81341e026e7517cf6394f
BLAKE2b-256 82e87f9b43295537e4e82bf5df79026c8a53e22b6effd09b4252c9db9262cbed

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page