Skip to main content
Glama
imdb-analytics-mcp

imdb-analytics-mcp

imdb-analytics-mcp

Local, personal MCP server that lets an LLM rank, compare and connect actors and titles from IMDb's non-commercial datasets, stored in DuckDB, with Wikidata enrichment.

Status (2026-09-09): M1 ingest, M2 analytics and M3 MCP tools are built. Wikidata enrichment (nationality, gender, awards) is M4 and those filters return an error until then.

Read in this order:

  1. docs/brief.md — the original plan and definition of done.

  2. docs/research.md — prior art survey and answers to the Phase 15 questions.

  3. docs/storage-decision.md — DuckDB, measured against SQLite on the full data.

  4. docs/data-model.md — tables, the configurable credit definition, unsupportable filters.

  5. docs/architecture.md — layers, data flow, tool surface, milestones.

  6. docs/scoring.md — recognition score: first measurement and planned experiments.

Detailed source research and benchmark reports live in docs/research/. Prototype scripts are in scripts/ (proto_* = raw-table load and DuckDB vs SQLite bench; proto2_* = the proposed schema bench). Data lives outside the repo under data/ (a symlink; gitignored).

Setup: uv sync, then uv run imdb-mcp update to download the datasets and build data/imdb.duckdb (about 4.4 GB). uv run imdb-mcp status says how fresh it is, uv run imdb-mcp doctor checks the environment.

Licensing and data

The software is MIT licensed. The IMDb datasets it downloads are not: IMDb permits them for personal, non-commercial use only, and forbids republishing them as a database of movie information. This project therefore runs locally, each user fetches the data themselves with imdb-mcp update, and nothing derived from IMDb data is redistributed. Do not host it as a shared service. Wikidata enrichment data is CC0.

Related MCP server: IMDB MCP

Use with Claude Desktop or Claude Code

The server speaks MCP over stdio. Build the database first (uv run imdb-mcp update), then point a client at imdb-mcp serve.

Claude Desktop — add this to claude_desktop_config.json and restart the app:

{
  "mcpServers": {
    "imdb-analytics": {
      "command": "uv",
      "args": ["--directory", "/home/you/dev/imdb-analytics-mcp", "run", "imdb-mcp", "serve"],
      "env": { "IMDB_MCP_DATA_DIR": "/home/you/dev/imdb-analytics-mcp/data" }
    }
  }
}

Claude Code — one line:

claude mcp add imdb-analytics -- uv --directory /home/you/dev/imdb-analytics-mcp run imdb-mcp serve

imdb-mcp serve --transport http --port 8765 serves the same tools over HTTP, for MCP Inspector or any other debugging client. The server holds the database open, so after an imdb-mcp update the client has to reconnect before it sees the new data.

An example conversation

This is the brief's definition-of-done chain, run against the real build on 2026-09-09. The full output of every step, including each response's method and caveats, is in docs/summaries/m3-dod-chain-2026-09-09.md.

Who are the 25 people with the most acting credits?

Brahmanandam (1,131), Eric Roberts (725), Jagathy Sreekumar (653), Eddie Garcia (650), Adoor Bhasi (617)… — counting movies, TV movies, TV series, TV specials and direct-to-video titles, with a series counted once regardless of episode count, and self appearances, archive footage and adult titles excluded. 2,380,714 people have at least one credit.

Only the ones still alive.

15 of the 25. IMDb records a death year only when a death is known, so this really means "not known to have died".

Born before 1960, and sort them by how long their careers have run.

10 people. Aruna Irani leads at 68 years, then Jagathy Sreekumar (67), Frank Welker (66), Raza Murad (61), Shakti Kapoor (52), Eric Roberts (51)…

Which five of those have been in the most highly rated films?

Counting titles rated 7.0 or better with at least 1,000 votes: Frank Welker (103), Nassar (73), Tanikella Bharani (54), Brahmanandam (49), Anupam Kher (42).

Compare those five, and tell me which two have worked together most.

Frank Welker has by far the most votes across his filmography (4.9M) and the highest mean rating (6.75); Brahmanandam has the most credits (1,131) and the highest credits per year (28). Tanikella Bharani and Brahmanandam have appeared together 168 times.

What did those two make together?

Ghilli (2004, 8.2), Dookudu (2011, 7.4), Race Gurram (2014, 7.4), Khaleja (2010, 7.6), Bommarillu (2006, 8.2)… — 168 titles in all, most-voted first.

Every one of those turns is a single tool call whose arguments are the previous turn's arguments with one field changed, and each refinement passes the previous result's IMDb ids back in. The server keeps no session state.

Available Tools

6 tools
compare_peopleCompare PeopleA
Read-onlyIdempotent

Put two to ten named people side by side on the same measures.

Answers questions like: "Compare Eric Roberts, Danny Trejo, James Hong, Samuel L. Jackson and Christopher Walken", "Who between De Niro and Pacino has the higher rated filmography?", "Which of these five has the longest career?", "Have any of these people worked together?".

Every number comes from the same code path a ranking uses, so a value here and the same value in a rank_people row cannot disagree. Returns one compact row per person with credits, career length, credits per year, rating measures, recognition scores and background share, plus, in query_summary.pairs, the shared-title count and the number of common collaborators for every unordered pair. That pairs block is what answers "which two of these have worked together most" without a second call.

Takes IMDb name ids in either form. It is a comparison, not a search: to find the people first, use search_people or rank_people, then pass their ids here. For the titles two of them actually share, follow up with find_collaborations in shared_titles mode.

Inputs: person_ids, credit_definition. Returns: object

find_collaborationsFind CollaborationsA
Read-onlyIdempotent

Who has worked with whom, in five shapes selected by mode.

Answers questions like: "Which actors have worked with Samuel L. Jackson most often?" (collaborators_of, one id), "What films do Jackson and Walken share?" (shared_titles, two ids), "Which two people in this list have appeared together most?" (pairwise, two or more ids), "Who has worked with all five of these people?" (worked_with_all, one or more ids), "How many steps connect these two?" (degrees_of_separation, two ids, at most three hops).

Every mode counts at the unit level, so a series shared across forty episodes counts once, and every mode honours the credit definition, so "only their films together" is include_tv_series=false, include_tv_movies=false, include_video=false. limit bounds the returned collaborators; max_hops bounds the path search.

The hard limit is the data, not the query: IMDb's principal-cast list holds at most 69 people per title, so a shared credit means both people are in that top-billed subset. Its absence is not evidence they never worked together, and a "no path found" result means no path through principal casts within the hop limit. Pass ids, not names; use search_people first.

Inputs: mode (required), limit, max_hops, person_ids, +1 more. Returns: object

get_personGet PersonA
Read-onlyIdempotent

Everything known about one person, recomputed under whatever credit definition you pass.

Answers questions like: "Tell me about Samuel L. Jackson", "How many movies has Eric Roberts actually been in?", "What are Danny Trejo's best-known films?", "Is Bess Flowers mostly an extra?", "How long has James Hong been working, and in what genres?".

Takes an IMDb name id, either "nm0000168" or its numeric form 168. Returns the person's credit count under the definition you gave, career span, top titles by votes with the billing position and characters, genre and decade breakdowns, frequent collaborators, and the precomputed career, recognition and background-work statistics with their components exposed. This is the one tool that returns full component detail; the ranking tools return compact rows.

The recognition and background-work blocks are always the default-definition values and do not move when you change the credit definition, which the response states. Change the definition to answer follow-ups directly: "restrict to theatrical films" is include_tv_series=false, include_tv_movies=false, include_video=false; "count every episode" is include_tv_episodes=true with count_series_as_one=false.

Inputs: person_id (required), top_titles, credit_definition. Returns: object

rank_peopleRank PeopleA
Read-onlyIdempotent

Rank people by any measure, under any filter and any definition of an acting credit.

This is the tool for every superlative question and every refinement of one. Answers questions like: "Who are the 25 most prolific actors?", "Same list, but only people recognizable enough that an audience would know them", "Now only living actors born before 1960", "Who has the longest career?", "Which prolific actors have the most highly rated films?", "Rank these five by career length instead".

Follow-ups are the previous arguments with one field changed, so keep the whole filter object and edit it. The fields that carry the common follow-ups: "women only" is filters.professions_any=["actress"], an approximation of the credit and not of the person, until gender enrichment lands; "living only" is filters.living_only=true; "born after 1950" is filters.birth_year_min=1951; "remove the extras" is filters.max_background_share, around 0.5; "make it recognizable" is filters.min_prominence or sort_by="prominence_score"; "at least ten well-rated films" is filters.min_highly_rated_titles=10 with filters.title_rating_min and title_votes_min setting the bar; "restrict to theatrical films" is credit_definition.include_tv_series=false, include_tv_movies=false, include_video=false.

To re-rank a result you already have rather than re-running the whole filter chain, pass its ids as filters.person_ids and change sort_by. Page with next_cursor, handing it back unchanged with the same sort.

sort_by choices: acting_credits, prominence_score (peak recognition), exposure_score (volume of seen work), career_length, credits_per_year, average_rating, weighted_rating (Bayesian, pulls thinly voted careers toward the mean), total_votes, highly_rated_titles, max_title_votes, collaborator_count.

What it cannot do: filter by nationality, gender or award, which need Wikidata enrichment that lands in M4 and error until then; separate voice roles from on-screen ones, because IMDb's datasets carry no voice flag and the include_voice parameter approximates it with the Animation genre; or filter uncredited roles, which the datasets do not mark at all. collaborator_count is an anchored self-join and is refused for candidate sets over a thousand people.

Inputs: limit, cursor, filters, sort_by, +2 more. Returns: object

search_peopleSearch PeopleA
Read-onlyIdempotent

Find people by name and pick the right one before spending another call on them.

Answers questions like: "Who is James Hong?", "Is there more than one Michael Caine?", "Find the Danny Trejo who acts", "Which Sarah Douglas has the most credits?", "What is Bess Flowers' IMDb id?".

Returns each match with its imdb_name_id, birth and death years, listed professions, credit count under the default definition, prominence score and best-known titles, ordered exact match first, then prefix, then credit count. Use the imdb_name_id it returns for every later call rather than passing the name again. filters accepts the same person filter as rank_people, which is how you disambiguate two people with the same name by birth year or profession.

This is lookup, not ranking: it never scans the whole catalogue, so do not use it to answer "who has the most credits" or any question with a superlative in it. It cannot search by nationality, gender or award, which need enrichment that does not land until M4, and it matches on the primary name only, not alternate spellings or credited-as names.

Inputs: name (required), limit, filters. Returns: object

search_titlesSearch TitlesA
Read-onlyIdempotent

Find and rank titles by text, type, year, genre, rating, votes, or who is in them.

Answers questions like: "What are the highest rated horror films of the 1980s?", "Find the movie called Heat", "Which titles have both Samuel L. Jackson and John Travolta in the principal cast?", "List Danny Trejo's titles with over 100,000 votes", "What TV series started in 1999 and are rated above 8.5?".

Returns compact title rows with imdb_title_id, type, year, runtime, genres, rating and votes. filters.with_person_ids keeps only titles whose principal cast contains every one of the named people, which is the direct way to ask "what did these two make together" when you want the title's own metadata rather than the collaboration count. Page with next_cursor, unchanged, with the same sort.

What it cannot do: only 1.7 of 12.8 million titles carry any rating, so a rating or vote filter is also a coverage filter and drops everything unrated. There is no theatrical-release flag: the video title type is direct-to-video, but a movie may also have gone straight to video, so this is a title-type filter and never a distribution one. A person filter here uses the default credit definition and matches the unit title, so a credit on an episode matches its series.

Inputs: limit, cursor, filters, sort_by, +1 more. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.7/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: ranking people, searching for a specific person, retrieving one person's details, comparing a fixed set of people, finding collaborations, and searching titles. The descriptions actively clarify boundaries, e.g. search_people is lookup not ranking, and compare_people is not a search. There is no real risk of selecting the wrong tool.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern: rank_people, search_people, get_person, compare_people, find_collaborations, search_titles. The verbs are clear and the nouns consistently identify the entity being acted on. Minor singular/plural variation does not create confusion.

    Tool Count5/5

    Six tools is well-scoped for a read-only analytics server. Each tool covers a distinct query shape without redundancy. The count feels intentional rather than padded or thin.

    Completeness4/5

    The server covers the main person-analytics workflows well: discover, rank, inspect, compare, collaborate, and filter titles by people. The only notable gap is the absence of a dedicated title-detail tool for full cast/crew or richer title metadata, but search_titles and the collaboration tools provide reasonable workarounds.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides access to IMDB movie and person data, including searches, cast details, and top-rated lists through the Model Context Protocol. It enables LLMs to fetch structured cinematic metadata and filmographies using the Cinemagoer backend.
      1
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables semantic and similarity search across IMDB movie data using vector embeddings and PostgreSQL with pgvector, supporting traditional filters and hybrid search.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables local LLMs to search the web, scrape pages, and extract structured data (tables, metadata) from sources like Wikipedia and IMDb, with caching and rate limiting.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Query local CSV, Parquet, JSON and TSV files with real SQL via DuckDB. Gives your AI coding tool ground-truth data access instead of hallucinated answers.
      5
      MIT