MCP server for connecting LLMs and AI agents to the Memgraph graph database
4.5K
A lightweight Model Context Protocol (MCP) server that connects LLMs and AI agents to Memgraph graph database.
# Start Memgraph
docker run -d -p 7687:7687 memgraph/memgraph-mage:latest
# Start MCP server (HTTP mode)
docker run --rm -p 8000:8000 memgraph/mcp-memgraph:latest
The server is available at http://localhost:8000/mcp/.
| Tool | Description |
|---|---|
run_query | Execute Cypher queries (read-only by default) |
get_schema | Fetch graph schema |
get_page_rank | Compute PageRank scores |
get_betweenness_centrality | Compute betweenness centrality |
get_node_neighborhood | Find nodes within distance |
search_node_vectors | Vector similarity search |
get_configuration | Fetch Memgraph configuration |
get_index / get_constraint | Retrieve index and constraint info |
get_storage | Storage usage metrics |
get_triggers | List database triggers |
get_procedures | List available procedures |
| Variable | Default | Description |
|---|---|---|
MEMGRAPH_URL | bolt://host.docker.internal:7687 | Memgraph Bolt URL |
MEMGRAPH_USER | memgraph | Authentication username |
MEMGRAPH_PASSWORD | (empty) | Authentication password |
MCP_TRANSPORT | streamable-http | Transport: streamable-http or stdio |
MCP_READ_ONLY | true | Block write operations |
MCP_SERVER | server | Server mode: server or memgraph-experimental |
VS Code / Cursor:
{ "servers": { "mcp-memgraph": { "url": "http://localhost:8000/mcp/" } } }
Stdio mode (Claude Desktop, etc.):
docker run --rm -i -e MCP_TRANSPORT=stdio memgraph/mcp-memgraph:latest
Content type
Image
Digest
sha256:80353fa1c…
Size
124.8 MB
Last updated
2 days ago
docker pull memgraph/mcp-memgraph