find_moviesLABSCO SUMMARY
A worked query surface over a dataset you can load in one click.
It handles the thing that breaks most model-driven database calls: list arguments arriving as strings. It targets sample_mflix specifically, so treat it as a way to query that dataset rather than as a general MongoDB client.
What it is
A FastMCP server over the sample_mflix movie dataset in MongoDB. Searches take title, genre, actors, directors, writers, year and rating thresholds, and let you name which fields come back and how results are sorted.
What you get
- Movies found by title, genre, actor, director, writer, year or rating threshold
- The returned fields chosen with projection_fields, and ordering set with sort_by and sort_order_asc
- Movies matching criteria counted rather than listed
- Average IMDb, Metacritic or Rotten Tomatoes ratings computed over a filtered set
- Stringified list arguments handled, which is the form models tend to emit
Requirements
Python 3.7 or higher, a MongoDB instance, and the sample_mflix database with its movies collection loaded — Atlas ships it under Load Sample Dataset. The client launches the script with the MongoDB connection string as an argument.
Setup effort
Build from source — git clone https://github.com/patw/movie-mcp.git
USE CASES
Finding films that match several conditions at once
Filter on genre, year and a rating threshold in one call, returning only the fields you name.
Getting a number rather than a list
Count the matches instead of pulling them all back.
Comparing how different critics scored a set
Average IMDb, Metacritic or Rotten Tomatoes ratings across the filtered movies.
Ranking the results
Sort by any field, ascending or descending, without post-processing.
3 tools
Listed in project docs. Your client may show a different list.
count_moviesget_average_ratingBEFORE YOU INSTALL
What to know first
Tools you get
3 tools named in the project's documentation. It only reads. The Usage section runs movie_tools.py while the Claude Desktop config runs movie-mcp.py; if one fails, try the other.
Requires
- Python 3.7+
- A running MongoDB instance (local or cloud-hosted like MongoDB Atlas)
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
Clone the repository:
git clone https://github.com/patw/movie-mcp.git
cd movie-mcpInstall dependencies:
pip install -r requirements.txtRun the script:
python movie_tools.py "mongodb://localhost:27017/"MCP Clients
Claude Desktop
{
"mcpServers": {
"Movie Database": {
"command": "uv",
"args": [
"run",
"--with",
"fastmcp, pymongo",
"fastmcp",
"run",
"<YOUR_PATH_TO>/movie-mcp/movie-mcp.py",
"<YOUR_MONGO_CONNECTION_STRING_URI>"
]
}
}
}