# memgraph/mcp-memgraph [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/memgraph/ai-toolkit/tree/main/integrations/mcp-memgraph  
**GitHub Stars:** 119  
**Views:** 7  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/memgraph-mcp-memgraph

## Description
Memgraph MCP Server - includes a tool to run a query against Memgraph and a schema resource.

## Tools
Capabilities this server exposes over MCP:

- **list_databases** — List databases this session can access. The active one is flagged.
- **use_database** — Switch the active database for this MCP session.

The new name must be one of the databases your token authorizes. Switching
persists for the duration of the MCP session and does not require a new
login.
- **run_cypher_query** — Run a Cypher query on Memgraph and return one row per result, with each
value returned in a type-preserving form: nodes, relationships and paths are
tagged objects carrying their id, labels/type and endpoints; primitives,
maps, lists, temporals and points keep their shape. Write operations are
blocked if the server is in read-only mode.
- **search_schema** — Search the entire graph schema (nodes, relationships and enums) by a regex pattern.
Matches against labels, types, descriptions, and property keys/descriptions.
- **get_node_schema** — Get the full schema definition of a node by its labels. Returns properties,
indexes, constraints, and all relationships where this node appears.
- **get_relationship_schema** — Get the full schema definition of a relationship by its type and connected
node labels. Returns properties and indexes.
- **get_enum_schema** — Get the schema definition of an enum by its name. Returns the enum name and its values.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "mcp-memgraph": {
    "command": "uvx",
    "args": ["mcp-memgraph"]
  }
}
```

## Documentation

## What memgraph/mcp-memgraph does

memgraph/mcp-memgraph connects language-model clients to Memgraph and exposes database operations through the Model Context Protocol. Its default server provides seven tools: Cypher execution, schema search, detailed node, relationship, and enum schema inspection, database listing, and database switching.

The main query tool accepts arbitrary Cypher and returns one result row at a time. Graph values retain their types: nodes include identifiers, labels, and properties; relationships include their type, endpoints, and properties; paths, primitives, lists, maps, temporal values, and points also retain their shape. This allows a query to return graph entities alongside scalar values such as counts.

## How it works

The server connects to Memgraph through its Bolt URL and exposes MCP over either standard input/output or streamable HTTP. The transport defaults to stdio when run directly, while the published Docker image defaults to streamable HTTP on port 8000. HTTP clients can connect at the `/mcp/` endpoint when the container is started with the default Docker settings.

Read-only operation is enabled by default for the standard server. Queries containing write operations such as CREATE, MERGE, DELETE, SET, DROP, or REMOVE are rejected unless `MCP_READ_ONLY=false` is set. The experimental `memgraph-experimental` implementation has a different tool set and requires write access for index creation, so the read-only setting does not apply to it.

## Setup and configuration

The published image is available as `memgraph/mcp-memgraph:latest`. For an HTTP deployment, publish port 8000:

```bash
docker run --rm -p 8000:8000 memgraph/mcp-memgraph:latest
```

For an MCP host that launches stdio processes, run the image interactively and set the transport:

```bash
docker run --rm -i -e MCP_TRANSPORT=stdio memgraph/mcp-memgraph:latest
```

Set `MEMGRAPH_URL`, `MEMGRAPH_USER`, `MEMGRAPH_PASSWORD`, and `MEMGRAPH_DATABASE` to connect to a specific Memgraph instance. The default Bolt URL is `bolt://localhost:7687` for direct execution; the Docker image uses `bolt://host.docker.internal:7687` so a container can reach Memgraph on the host. `MCP_HOST`, `MCP_PORT`, `MCP_TRANSPORT`, and `MCP_SERVER` control HTTP binding, transport, and server selection. Logging can be adjusted with `MCP_LOG_LEVEL` or directed to a file with `MCP_LOG_FILE`.

Streamable HTTP can optionally use OIDC/JWT authentication. When enabled, authorized sessions can be routed to logical databases based on JWT tenant claims, with the available database catalog controlled by `MCP_TENANT_CATALOG`.

## Tools and capabilities

- `run_cypher_query`: Execute Cypher and receive type-preserving rows. Cypher can also collect distinct nodes and relationships for a compact graph result.
- `search_schema`: Find labels, relationship types, enums, descriptions, and property keys or descriptions using a case-insensitive regular expression.
- `get_node_schema`: Retrieve a node label's properties, indexes, constraints, and connected relationship definitions.
- `get_relationship_schema`: Inspect a relationship type for a specified pair of start and end node labels.
- `get_enum_schema`: Retrieve an enum's name and values.
- `list_databases`: Show databases available to the current session and identify the active database.
- `use_database`: Switch the active database when authentication authorizes the requested name.

Schema tools are useful before generating Cypher because they let an agent discover the graph model rather than relying on assumed labels or properties.

## Limitations and notes

With authentication disabled, the session has one database and `use_database` cannot switch to another. With authentication enabled, database access is limited by both the caller's JWT tenant claims and the server's tenant catalog. The experimental server exposes fewer tools than the default implementation and requires write access for its index-management behavior.

_Full upstream README: https://allmcps.com/mcp/memgraph-mcp-memgraph/readme_

