SuperAPIAI Directory

memgraph/mcp-memgraph

github.com · AI developer platforms

Memgraph MCP Server is the official Model Context Protocol (MCP) server implementation provided by Memgraph, used to connect the Memgraph graph database with LLMs and various MCP clients. By default, the server exposes seven tools through MCP: run_cypher_query (executes arbitrary Cypher queries, read-only by default), search_schema (searches graph schema by regular expression), get_node_schema, get_relationship_schema, get_enum_schema, list_databases, and use_database. Supports Docker deployment, can configure connection, transport protocol, read-only mode, logging, etc. via environment variables, and optionally enables OIDC/JWT-based multi-tenant authentication. There is also an experimental server that provides adaptive query optimization and autonomous index management.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Memgraph MCP Server is an integration component in the Memgraph AI Toolkit that implements a lightweight Model Context Protocol (MCP) server, designed to connect the Memgraph graph database with large language models (LLMs) and different clients.

Purpose: This server acts as a bridge between Memgraph and MCP clients, enabling LLMs to query and explore the Memgraph graph database through a standardized tool invocation interface.

Main capabilities: The default server implementation exposes seven tools. run_cypher_query is used to execute arbitrary Cypher queries and returns type-preserving result rows. It runs in read-only mode by default, blocking write operations such as CREATE, MERGE, DELETE, SET, DROP, REMOVE, etc.; write operations can be enabled via MCP_READ_ONLY=false. search_schema searches the entire graph schema (node labels, relationship types, enums, property keys, and descriptions) by a case-insensitive regular expression pattern. get_node_schema gets the complete schema definition of a node (properties, indexes, constraints, and related relationships). get_relationship_schema gets the complete schema definition of a relationship. get_enum_schema gets the name and values of an enum. list_databases lists the databases accessible to the current session and marks the current active database. use_database switches the active database of the current MCP session; it always errors when authentication is disabled, and when authentication is enabled it can only switch to databases authorized by the JWT.

Usage: It can be run via Docker, and the image is also available from Docker Hub. It supports two transport protocols, stdio and streamable-http. The Docker image uses streamable-http by default and publishes port 8000. The MCP server is located at http://localhost:8000/mcp/。可通过环境变量配置 Memgraph connection (MEMGRAPH_URL, MEMGRAPH_USER, MEMGRAPH_PASSWORD, MEMGRAPH_DATABASE), server implementation (MCP_SERVER), transport protocol (MCP_TRANSPORT), bind host and port (MCP_HOST, MCP_PORT), read-only mode (MCP_READ_ONLY), log file and level (MCP_LOG_FILE, MCP_LOG_LEVEL), etc. Configuration examples for connecting in VS Code and Claude are also provided.

Multi-tenant authentication: optionally enable OIDC/JWT authentication, validate JWTs on the streamable-HTTP transport, and route sessions to different Memgraph logical databases based on the tenants claim in the JWT. Disabled by default. When enabled, related environment variables must be configured, and it depends on the OIDC provider's client, claim mapper, etc.

Multi-server architecture: the server implementation can be selected via the MCP_SERVER environment variable. The default server provides the seven stable tools described above. memgraph-experimental is an experimental server that provides adaptive GraphRAG capabilities based on FastMCP native sampling and elicitation, including tools such as query_tool, analyze_query, create_index, get_index_info, and get_schema_info; it does not support read-only mode because creating indexes requires write permissions.

Use cases: scenarios where an LLM or MCP client needs to query and explore a Memgraph graph database via natural language or tool calls; MCP deployments requiring multi-tenant isolation; scenarios requiring experimental query optimization and index management.

Limitations: the default read-only mode blocks write operations; use_database is unavailable when authentication is disabled; the experimental server does not support read-only mode; multi-tenant authentication requires additional OIDC configuration. For specific feature details and configuration, please refer to the official documentation.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools