Quickstart (MCP with FalkorDB)
2 minute read
Overview
Model Context Protocol is an open protocol that standardizes how applications provide context to LLMs. Check out this page on how to connect to Toolbox via MCP.
Step 1: Set up your FalkorDB graph and data
In this section, you’ll start a FalkorDB instance and populate it with sample data for a movies-related agent.
Start FalkorDB. The quickest way is Docker:
docker run -d --name falkordb -p 6379:6379 falkordb/falkordbPopulate the graph with data. Using
redis-cli(or the FalkorDB browser athttp://localhost:3000if you expose it), create a small movie graph:docker exec falkordb redis-cli GRAPH.QUERY movies "CREATE (hanks:Person {name: 'Tom Hanks'}), (ryan:Person {name: 'Meg Ryan'}), (sleepless:Movie {title: 'Sleepless in Seattle', year: 1993}), (gump:Movie {title: 'Forrest Gump', year: 1994}), (hanks)-[:ACTED_IN]->(sleepless), (hanks)-[:ACTED_IN]->(gump), (ryan)-[:ACTED_IN]->(sleepless)"
Step 2: Install and configure Toolbox
In this section, we will download Toolbox and run the Toolbox server with a FalkorDB configuration.
Download the latest version of Toolbox as a binary. Select the correct binary corresponding to your OS and CPU architecture.
Make the binary executable:
chmod +x toolboxWrite the following into a
tools.yamlfile:kind: source name: falkordb-movies type: falkordb host: 127.0.0.1 port: "6379" graph: movies --- kind: tool name: search_movies_by_actor type: falkordb-cypher source: falkordb-movies statement: | MATCH (m:Movie)<-[:ACTED_IN]-(p:Person) WHERE p.name = $name RETURN m.title, m.year LIMIT 10 description: Use this tool to list the movies a given actor acted in. parameters: - name: name type: string description: Full name of the actor. --- kind: tool name: execute_cypher type: falkordb-execute-cypher source: falkordb-movies description: Use this tool to execute a Cypher query against the movie graph. --- kind: tool name: get_schema type: falkordb-schema source: falkordb-movies description: Use this tool to get the schema of the movie graph.Start the Toolbox server:
./toolbox --tools-file "tools.yaml"
Step 3: Connect to MCP Inspector
Run the MCP Inspector:
npx @modelcontextprotocol/inspectorType
ywhen it asks to install the inspector package.It should show the following when the MCP Inspector is up and running:
MCP Inspector is up and running at http://127.0.0.1:6274Open the above link in your browser.
For
Transport Type, selectStreamable HTTP.For
URL, type inhttp://127.0.0.1:5000/mcp.Click the
Connectbutton.Click
List Tools— you should see thesearch_movies_by_actor,execute_cypher, andget_schematools. Select one and try it out: ask for Tom Hanks’ movies, run an ad-hoc Cypher query, or fetch the graph schema.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.