mcp-memgraph

mcp-memgraph

Expose Memgraph database features via the Model Context Protocol.

52
Stars
5
Forks
52
Watchers
19
Issues
mcp-memgraph provides an MCP (Model Context Protocol) server implementation, enabling Memgraph tools to be accessed over a lightweight STDIO protocol. It supports seamless integration with AI frameworks by standardizing context and communication for data-driven AI workflows. The toolkit is part of a larger suite for extending Memgraph with AI-powered capabilities, including tools for LangChain integration and automated database migration. Tested packages and usage examples are provided for quick adoption.

Key Features

Implements Model Context Protocol (MCP) server for Memgraph
Lightweight STDIO-based protocol for tool invocation
Seamless integration with AI frameworks like LangChain
Python utilities and command-line tools for Memgraph analysis
Automated intelligent migration from MySQL and PostgreSQL to Memgraph
Scriptable and testable modules for local development
REST and tool exposure for AI-driven data access
Standardized environment setup and testing procedures
Extensive documentation with practical usage examples
Composable packages for extended AI and data workflows

Use Cases

Exposing Memgraph data as a context provider for AI and LLM workflows
Connecting Memgraph to LangChain to enable graph-powered prompts and reasoning
Running standardized protocol-based queries for automated modelling
Automating migration from relational databases like MySQL or PostgreSQL to Memgraph
Developing and testing AI workflows that require graph database context integration
Building command-line utilities for graph data analysis and exploration
Orchestrating data pipelines that require real-time Memgraph interaction via MCP
Integrating Memgraph into multi-agent LLM systems
Facilitating interactive schema analysis and data validation for graph migration
Rapid prototyping and research on AI-powered graph-driven applications

README

Memgraph AI Toolkit

A unified mono-repo for integrating AI-powered graph tools on top of Memgraph.
This repository contains the following libraries:

  1. memgraph-toolbox Core Python utilities and CLI tools for querying and analyzing a Memgraph database. The package is available on the PyPi

  2. langchain-memgraph A LangChain integration package, exposing Memgraph operations as LangChain tools and toolkits. The package is available on the PyPi

  3. mcp-memgraph An MCP (Model Context Protocol) server implementation, exposing Memgraph tools over a lightweight STDIO protocol. The package is available on the PyPi

  4. agents An intelligent database migration agent that automates the process of migrating from MySQL or Postgresql to Memgraph. Features automated schema analysis, intelligent graph modeling with interactive refinement, and data migration with validation.

Usage examples

For individual examples on how to use the toolbox, LangChain, MCP, or agents, refer to our documentation:

Developing locally

You can build and test each package directly from your repo. First, start a Memgraph MAGE instance with schema info enabled:

bash
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

Core tests

To test the core toolbox, just run:

uv pip install -e memgraph-toolbox[test]
pytest -s memgraph-toolbox/src/memgraph_toolbox/tests

Langchain integration 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

MCP integration tests

uv pip install -e integrations/mcp-memgraph[test]
pytest -s integrations/mcp-memgraph/tests

Agent integration 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]"

Star History

Star History Chart

Repository Owner

memgraph
memgraph

Organization

Repository Details

Language Python
Default Branch main
Size 2,212 KB
Contributors 6
MCP Verified Nov 12, 2025

Programming Languages

Python
97.58%
Jupyter Notebook
1.84%
Makefile
0.32%
Shell
0.18%
Dockerfile
0.07%

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Multi-Database MCP Server (by Legion AI)

    Multi-Database MCP Server (by Legion AI)

    Unified multi-database access and AI interaction server with MCP integration.

    Multi-Database MCP Server enables seamless access and querying of diverse databases via a unified API, with native support for the Model Context Protocol (MCP). It supports popular databases such as PostgreSQL, MySQL, SQL Server, and more, and is built for integration with AI assistants and agents. Leveraging the MCP Python SDK, it exposes databases as resources, tools, and prompts for intelligent, context-aware interactions, while delivering zero-configuration schema discovery and secure credential management.

    • 76
    • MCP
    • TheRaLabs/legion-mcp
  • Semgrep MCP Server

    Semgrep MCP Server

    A Model Context Protocol server powered by Semgrep for seamless code analysis integration.

    Semgrep MCP Server implements the Model Context Protocol (MCP) to enable efficient and standardized communication for code analysis tasks. It facilitates integration with platforms like LM Studio, Cursor, and Visual Studio Code, providing both Docker and Python (PyPI) deployment options. The tool is now maintained in the main Semgrep repository with continued updates, enhancing compatibility and support across developer tools.

    • 611
    • MCP
    • semgrep/mcp
  • MCP Server for Milvus

    MCP Server for Milvus

    Bridge Milvus vector database with AI apps using Model Context Protocol (MCP).

    MCP Server for Milvus enables seamless integration between the Milvus vector database and large language model (LLM) applications via the Model Context Protocol. It exposes Milvus functionality to external LLM-powered tools through both stdio and Server-Sent Events communication modes. The solution is compatible with MCP-enabled clients such as Claude Desktop and Cursor, supporting easy access to relevant vector data for enhanced AI workflows. Configuration is flexible through environment variables or command-line arguments.

    • 196
    • MCP
    • zilliztech/mcp-server-milvus
  • Membase-MCP Server

    Membase-MCP Server

    Decentralized memory layer server for AI agents using the Model Context Protocol.

    Membase-MCP Server provides decentralized and persistent storage of conversation history and agent knowledge for AI agents using Unibase and the Model Context Protocol. It supports secure, traceable storage and retrieval of messages to ensure agent continuity and personalization within interactions. The server offers integration with Claude, Windsurf, Cursor, and Cline, allowing dynamic context management such as switching conversations and saving or retrieving messages. The server leverages the Unibase DA network for verifiable storage and agent data interoperability.

    • 15
    • MCP
    • unibaseio/membase-mcp
  • Insforge MCP Server

    Insforge MCP Server

    A Model Context Protocol server for seamless integration with Insforge and compatible AI clients.

    Insforge MCP Server implements the Model Context Protocol (MCP), enabling smooth integration with various AI tools and clients. It allows users to configure and manage connections to the Insforge platform, providing automated and manual installation methods. The server supports multiple AI clients such as Claude Code, Cursor, Windsurf, Cline, Roo Code, and Trae via standardized context management. Documentation and configuration guidelines are available for further customization and usage.

    • 3
    • MCP
    • InsForge/insforge-mcp
  • Neo4j MCP Clients & Servers

    Neo4j MCP Clients & Servers

    Seamless natural language and knowledge graph integration for Neo4j via Model Context Protocol.

    Neo4j MCP Clients & Servers provide standardized interfaces that enable large language models and AI assistants to interact with Neo4j databases and cloud services using natural language through the Model Context Protocol (MCP). It includes multiple servers for translating natural language to Cypher queries, managing graph memory, handling Neo4j Aura cloud services, and supporting interactive data modeling. Multiple transport modes such as STDIO, HTTP, and SSE offer flexibility for various deployments including cloud and local environments.

    • 797
    • MCP
    • neo4j-contrib/mcp-neo4j
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results