movie-rag
One-line summary: This server recommends movies from a Neo4j GraphRAG movie graph by taking a natural-language Korean request about mood, setting, or theme and returning matched films with related works and similar titles.
Search by mood, situation, or theme — e.g. "머리 쓰면서 봐야 하는 반전 있는 영화"; the query is rewritten (Gemma2) before vector search using HyPE.
Get rich results per match — each movie comes back with its director's other films, topic-similar movies (shared keywords), and plots.
Pick 3 recommendations — the tool's description instructs selecting three titles from the returned candidates as the final recommendation.
Requires a query string (
query) as the only mandatory input; no other parameters are exposed.
Note: the README describes additional tools (find_by_director, find_similar), but this schema exposes only recommend_movies.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@movie-rag 채피 같은 로봇 영화랑 같은 감독의 다른 작품도 추천해줘"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Description
A movie recommender built as a GraphRAG MCP server on Neo4j 5.22. Movies, directors, genres and topic keywords are stored as a graph, and their embeddings from EmbeddingGemma live in the same database, so vector search and graph traversal run in a single query without a separate vector store. When a user asks for a movie in Korean, Gemma2 handles query rewriting, vector search finds the closest matches, and the graph connects them to other films by the same director and to films that share the same topics. This gives the answer context that vector search alone cannot provide. Both HyDE and HyPE are included for the search step, so the two can be tested side by side.
Related MCP server: Kakao Map MCP Server
Graph
(:Person)-[:DIRECTED]->(:Movie)-[:HAS_GENRE]->(:Genre)
(:Question)-[:ABOUT]->(:Movie)
(:Movie)-[:HAS_KEYWORD]->(:Keyword)Genres are separate nodes, so movies that share a genre are linked through the same node.
Keywords work the same way. Gemma2 extracts 3-5 topic keywords from each movie, and movies that share two or more keywords are listed as similar movies. Chappie, for example, is linked to I, Robot through "robot" and "artificial intelligence", while the same director's District 9 is not. Keywords used by more than 20 movies, such as action or crime, are skipped because they work like genres.
Search
HyDE: generates a hypothetical plot for the request and compares it with movie plots
HyPE: compares the request with hypothetical questions generated for each movie in advance (used by the MCP server)
HyDE matches plot against plot. HyPE matches question against question.
With 300 movies, HyPE put the right movies higher for requests about a subject or setting, such as a magic school or a prison escape. HyDE did better when the request reads like a plot, such as being stranded alone in space, but it needs one more Gemma2 call per request. The better choice depends on the data and on what users tend to ask, so both are kept for comparison.
Structure
app.js MCP server
chat.js function calling chat in the terminal
lib/ Neo4j driver, Ollama client, .env loader
services/
recommend-hype.js
recommend-hyde.js
recommend-langchain.js HyPE search written with LangChain.js
find-by-director.js
find-similar.js
ingest/
hype.js builds the graph with plot and question indexes and keywords (HyPE)
hyde.js builds the graph with the plot index and keywords (HyDE)
data/
movies.csv
questions.json cached HyPE questions
keywords.json cached keywordsRun
ollama pull gemma2
ollama pull embeddinggemma
npm install
node ingest/hype.js
npm run inspectRequires Neo4j 5.11+ and Ollama. Copy .env.example to .env and fill in your connection settings.
MCP
claude mcp add movie-rag -- node /path/to/GraphRAG_MCP_Movie_Recommender/app.jsThe MCP server has three tools.
recommend_movies: searches by mood, setting or theme and returns the matched movies with their directors' other works, similar movies and plotsfind_by_director: returns the movies made by a directorfind_similar: returns movies that share keywords with a given movie, most shared first
recommend_movies takes requests about mood, setting or theme, so it runs query rewriting with Gemma2 before the vector search. find_by_director and find_similar only need a director's name or a movie title, so they skip query rewriting.
The client model, such as Claude, decides which tool to call from the request, and can call more than one when needed. For a request like "movies like Inside Out", for example, it looks for movies that share keywords with Inside Out and also searches by its theme. It then writes the answer from the results.
recommend_movies uses HyPE by default. To use HyDE, import recommendHyde from services/recommend-hyde.js in app.js and call it instead of recommendHype.
Running ingest/hyde.js removes the question nodes' links, so run ingest/hype.js again before using the MCP server.
Function Calling
ollama pull qwen2.5
node chat.jsThe same search also works without MCP. chat.js registers recommendHype as a tool for qwen2.5 and runs it in the same process when the model calls it. Gemma2 is not used here because Ollama does not support tool calling for it. Press Enter on an empty line to quit.
LangChain
services/recommend-langchain.js is the same HyPE search, written with LangChain.js to compare it with calling Ollama and Neo4j directly. The prompt, Gemma2 call and JSON parsing are joined into one chain, and the vector search runs through Neo4jVectorStore with the same graph query. Both return the same movies and search scores.
Example
Recommending by theme (recommend_movies)

Other movies by a director (find_by_director)

Movies like Inside Out (find_similar and recommend_movies)

Function calling with qwen2.5

Note
The dataset ends in 2017.
Other works by the same director are listed because they share the director, not because their stories are similar.
The earlier version, without keywords and with Gemma2 writing the answer, is on the
basicbranch.
Available Tools
1 toolrecommend_movies영화 추천B
사용자가 원하는 분위기, 상황, 주제를 자연어로 받아 Neo4j 영화 그래프에서 영화 후보를 찾고, 같은 감독의 다른 작품과 주제가 비슷한 영화를 함께 돌려준다. 이 결과에서 3편을 골라 추천한다.
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool there is no risk of misselection between tools. However, the single tool internally bundles several behaviors (natural-language candidate search, same-director lookup, thematic similarity, and final top-3 selection), so an agent cannot target a specific sub-capability.
The sole tool name 'recommend_movies' follows a clear verb_noun snake_case convention and is descriptive of its action. There is no second name to conflict with, so consistency is trivially satisfied.
A single monolithic tool that performs graph search, similarity traversal, ranking, and recommendation in one call is too coarse for the apparent scope. Splitting into search/related/recommend operations would give the agent meaningful control.
The surface offers only end-to-end recommendation; there is no way to look up a specific movie, list a director's filmography, filter by genre/theme, or inspect why a candidate was retrieved. Agents will hit dead ends when they need details or refinement beyond the initial three picks.
Maintenance
Related MCP Connectors
Query your Kollus video platform in natural language — VOD content, analytics, and docs.
A collaborative substrate over your data: vector, knowledge graph, SQL, geospatial, streaming.
Persistent memory and knowledge graph for AI assistants — keyword + vector + graph search.
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables local-first semantic search and retrieval of Korean Bible verses using FAISS embeddings and full-text indexes. Supports exploration of biblical entities including people, places, and events with Korean-to-English query handling.-
- AlicenseAqualityDmaintenanceProvides location-based place recommendations in South Korea using the Kakao Map API, optimized for Korean language queries. Supports recommending various places like restaurants, shops, public facilities, and tourist attractions based on user queries.116MIT
- AlicenseNot gradedqualityDmaintenanceAutomatically discovers vector indexes in a Neo4j database and exposes each as a semantic search tool with metadata pre-filtering, enabling natural language queries with dynamic filter support.2MIT
- FlicenseNot gradedqualityDmaintenanceCombines Neo4j graph database with vector search using OpenAI embeddings for intelligent semantic search across knowledge graphs.3-