Movie MCP Server

This project provides a Python script that exposes a set of powerful tools for querying and analyzing a MongoDB movie database (specifically the

Remote serverstreamable-httpPython

What is the Movie MCP Server?

This project provides a Python script that exposes a set of powerful tools for querying and analyzing a MongoDB movie database (specifically the sample_mflix

What the server does

  • Comprehensive Movie Search: — Find movies by title, genre, actors, directors, writers, year, or various rating thresholds
  • Flexible Data Retrieval: — Specify fields to return (projection_fields) and control sorting (sort_by, sort_order_asc)
  • Movie Counting: — Quickly count movies matching specific criteria
  • Average Rating Calculation: — Compute average IMDb, Metacritic, or Rotten Tomatoes ratings for filtered movie sets
  • LLM-Friendly: — Designed with fastmcp to create a robust, self-documenting API easily consumable by LLMs. Includes special handling for stringified list arguments, addressing common LLM output formats
  • Robust MongoDB Integration: — Utilizes pymongo for efficient and reliable database operations

Credentials and setup notes

Before running this project, ensure you have the following: * Python 3.7+: Download Python * MongoDB Instance: A running MongoDB instance (local or cloud-hosted like MongoDB Atlas). * sample_mflix Dataset: The sample_mflix database and its movies collection must be loaded into your MongoDB instance.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
find_moviesFinds movies based on a variety of criteria, with options for sorting and limiting results.
count_movies
get_average_ratingCalculates the average rating for movies matching the criteria, for a specific rating type.

How to install the Movie MCP Server

{
  "mcpServers": {
    "Movie Database": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "fastmcp, pymongo",
        "fastmcp",
        "run",
        "<path to>/movie-mcp/movie-mcp.py",
        "<mongo connection string URI>"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

Before running this project, ensure you have the following: * Python 3.7+: Download Python * MongoDB Instance: A running MongoDB instance (local or cloud-hosted like MongoDB Atlas). * sample_mflix Dataset: The sample_mflix database and its movies collection must be loaded into your MongoDB instance.

Example prompts to try

  • “Use Movie MCP to Optionally.”
  • “Use Movie MCP to find movies.”
  • “Use Movie MCP to count movies.”

Frequently asked questions

This project provides a Python script that exposes a set of powerful tools for querying and analyzing a MongoDB movie database (specifically the `sample_mflix` Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.