LabStore
← All labs

Neo4j Cypher

by docker ✓ verified ✓ Packaged by Docker

Interact with Neo4j using Cypher graph queries.

MCP server installable needs setup network: on runtime: sysbox

DevOps MCP Servers

Neo4j Cypher MCP Server

Interact with Neo4j using Cypher graph queries.

What is an MCP Server?

MCP Info

Attribute Details
Docker Image mcp/neo4j-cypher
Author neo4j-contrib
Repository https://github.com/neo4j-contrib/mcp-neo4j

Image Building Info

Attribute Details
Dockerfile https://github.com/neo4j-contrib/mcp-neo4j/blob/dbc01ba78f171851f2d57dcd125b028c29912fd1/servers/mcp-neo4j-cypher/Dockerfile
Commit dbc01ba78f171851f2d57dcd125b028c29912fd1
Docker Image built by Docker Inc.
Docker Scout Health Score Docker Scout Health Score
Verify Signature COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/neo4j-cypher --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub
Licence MIT License

Available Tools (3)

Tools provided by this Server Short Description
get_neo4j_schema Get Neo4j Schema
read_neo4j_cypher Read Neo4j Cypher
write_neo4j_cypher Write Neo4j Cypher

Tools Details

Tool: get_neo4j_schema

Returns nodes, their properties (with types and indexed flags), and relationships using APOC's schema inspection.

You should only provide a sample_size value if requested by the user, or tuning the retrieval performance.

Performance Notes: - If sample_size is not provided, uses the server's default sample setting defined in the server configuration. - If retrieving the schema times out, try lowering the sample size, e.g. sample_size=100. - To sample the entire graph use sample_size=-1.

Parameters Type Description
sample_size integer optional The sample size used to infer the graph schema. Larger samples are slower, but more accurate. Smaller samples are faster, but might miss information.

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: read_neo4j_cypher

Execute a read Cypher query on the neo4j database.

Parameters Type Description
query string The Cypher query to execute.
params object optional The parameters to pass to the Cypher query.

This tool is read-only. It does not modify its environment.

This tool interacts with external entities.


Tool: write_neo4j_cypher

Execute a write Cypher query on the neo4j database.

Parameters Type Description
query string The Cypher query to execute.
params object optional The parameters to pass to the Cypher query.

This tool may perform destructive updates.

This tool interacts with external entities.


Use this MCP Server

{
  "mcpServers": {
    "neo4j-cypher": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "NEO4J_URL",
        "-e",
        "NEO4J_USERNAME",
        "-e",
        "NEO4J_DATABASE",
        "-e",
        "NEO4J_NAMESPACE",
        "-e",
        "NEO4J_TRANSPORT",
        "-e",
        "NEO4J_MCP_SERVER_HOST",
        "-e",
        "NEO4J_MCP_SERVER_PORT",
        "-e",
        "NEO4J_MCP_SERVER_PATH",
        "-e",
        "NEO4J_MCP_SERVER_ALLOW_ORIGINS",
        "-e",
        "NEO4J_MCP_SERVER_ALLOWED_HOSTS",
        "-e",
        "NEO4J_READ_TIMEOUT",
        "-e",
        "NEO4J_RESPONSE_TOKEN_LIMIT",
        "-e",
        "NEO4J_READ_ONLY",
        "-e",
        "NEO4J_SCHEMA_SAMPLE_SIZE",
        "-e",
        "NEO4J_PASSWORD",
        "mcp/neo4j-cypher"
      ],
      "env": {
        "NEO4J_URL": "bolt://host.docker.internal:7687",
        "NEO4J_USERNAME": "neo4j",
        "NEO4J_DATABASE": "neo4j",
        "NEO4J_NAMESPACE": "",
        "NEO4J_TRANSPORT": "http",
        "NEO4J_MCP_SERVER_HOST": "0.0.0.0",
        "NEO4J_MCP_SERVER_PORT": "8000",
        "NEO4J_MCP_SERVER_PATH": "/mcp/",
        "NEO4J_MCP_SERVER_ALLOW_ORIGINS": "example.com,www.example.com",
        "NEO4J_MCP_SERVER_ALLOWED_HOSTS": "localhost,127.0.0.1",
        "NEO4J_READ_TIMEOUT": "30",
        "NEO4J_RESPONSE_TOKEN_LIMIT": "10000",
        "NEO4J_READ_ONLY": "false",
        "NEO4J_SCHEMA_SAMPLE_SIZE": "1000",
        "NEO4J_PASSWORD": "password"
      }
    }
  }
}

Why is it safer to run MCP Servers with Docker?