by memgraph
Provides a unified mono‑repo of Python utilities, LangChain integration, MCP server, and experimental migration agents to build AI‑driven graph applications on Memgraph.
The toolkit offers core Python utilities for querying and analyzing Memgraph, a LangChain integration that exposes Memgraph operations as tools, an MCP server implementation for lightweight STDIO communication, and an experimental LLM‑powered agent that automates MySQL‑to‑Memgraph migrations.
uv pip install -e <package-path>[test].pytest -s to verify the installation..env (MySQL and Memgraph connection details) and execute uv run main.py inside integrations/agents.Q: What Python version is required?
A: The packages are compatible with Python 3.9+ and rely on uv for environment management.
Q: Do I need an OpenAI API key?
A: Only the LangChain integration tests require OPENAI_API_KEY; runtime usage depends on the LLMs you choose.
Q: Can I run the MCP server on Windows? A: Yes, the Python implementation works on any OS where Memgraph and Python are available.
Q: Is the migration agent production‑ready? A: It is marked experimental; use it for evaluation and provide feedback before production deployment.
Q: How do I contribute? A: Fork the repository, make changes in the relevant subdirectory, and submit a pull request following the contribution guidelines in the repo.
A unified mono-repo for integrating AI-powered graph tools on top of Memgraph.
This repository contains the following libraries:
memgraph-toolbox Core Python utilities and CLI tools for querying and analyzing a Memgraph database. The package is available on the PyPi
langchain-memgraph A LangChain integration package, exposing Memgraph operations as LangChain tools and toolkits. The package is available on the PyPi
mcp-memgraph An MCP (Model Context Protocol) server implementation, exposing Memgraph tools over a lightweight STDIO protocol. The package is available on the PyPi
agents ⚡ Experimental An intelligent database migration agent that automates the process of migrating from MySQL to Memgraph using LLM-powered graph modeling and analysis. Features automated schema analysis, intelligent graph modeling with interactive refinement, and data migration with validation.
For individual examples on how to use the toolbox, LangChain, MCP, or agents, refer to our documentation:
You can build and test each package directly from your repo. First, start a Memgraph MAGE instance with schema info enabled:
docker run -p 7687:7687 \
--name memgraph \
memgraph/memgraph-mage:latest \
--schema-info-enabled=true
Once Memgraph is running, install any package in “editable” mode and run its test suite. For example, to test the core toolbox:
uv pip install -e memgraph-toolbox[test]
pytest -s memgraph-toolbox/src/memgraph_toolbox/tests
To test the core toolbox, just run:
uv pip install -e memgraph-toolbox[test]
pytest -s memgraph-toolbox/src/memgraph_toolbox/tests
To run the LangChain tests, create a .env file with your OPENAI_API_KEY, as the tests depend on LLM calls:
uv pip install -e integrations/langchain-memgraph[test]
pytest -s integrations/langchain-memgraph/tests
uv pip install -e integrations/mcp-memgraph[test]
pytest -s integrations/mcp-memgraph/tests
uv pip install -e integrations/agents[test]
pytest -s integrations/agents/tests
To run a complete migration workflow with the agent:
cd integrations/agents
uv run main.py
Note: The agent requires both MySQL and Memgraph connections. Set up your environment variables in .env based on .env.example.
If you are running any test on MacOS in zsh, add "" to the command:
uv pip install -e memgraph-toolbox"[test]"
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by googleapis
An MCP server that streamlines database tool development by handling connection pooling, authentication, observability, and secure access, allowing agents to interact with databases via natural language.
by bytebase
Provides a universal gateway that lets MCP‑compatible clients explore and query MySQL, PostgreSQL, SQL Server, MariaDB, and SQLite databases through a single standardized interface.
by designcomputer
Enables secure interaction with MySQL databases via the Model Context Protocol, allowing AI applications to list tables, read contents, and execute queries safely.
by benborla
Provides read‑only access to MySQL databases for large language models, allowing schema inspection and safe execution of SQL queries.
by neo4j-contrib
Enables natural‑language interaction with Neo4j databases, allowing large language models to query, modify, and manage graph data through multiple transport modes.
by mongodb-js
Provides a Model Context Protocol server that enables interaction with MongoDB databases and MongoDB Atlas clusters through a unified API.
by ClickHouse
Enables AI assistants to run read‑only ClickHouse queries, list databases and tables, and execute embedded chDB queries through an MCP interface.
by neondatabase
Interact with Neon Postgres databases using natural language commands through the Model Context Protocol, enabling conversational database creation, migration, and query execution.
by motherduckdb
Enables SQL analytics on DuckDB and MotherDuck databases via a Model Context Protocol server, allowing AI assistants and IDEs to query data directly.