Neo4j

by cxt9

Not rated
GitHub

About

A server for accessing and interacting with a Neo4j graph database, configured via environment variables.

Details

Author
cxt9
Categories
Database, Other

Setup

Install Neo4j in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/cxt9/neo4j-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

2. Drop a.env in any project that should talk to Neo4j

The MCP server inherits Claude Code's working directory, sopython-dotenvpicks up whatever.envlives in that project's root. Different folders → different databases, no plugin reconfiguration needed.

# my-project/.env NEO4J_HOST=localhost NEO4J_PORT=7687 NEO4J_USERNAME=neo4j NEO4J_PASSWORD=your-secret NEO4J_DATABASE=neo4j
NEO4J_HOST=xxx.databases.neo4j.io NEO4J_PORT=7687 NEO4J_USERNAME=neo4j NEO4J_PASSWORD=your-aura-password NEO4J_URI_SCHEME=neo4j+s NEO4J_ENCRYPTED=true

For an unauthenticated local instance, leaveNEO4J_USERNAMEandNEO4J_PASSWORDblank.

Don't commit.env.Add it to.gitignorein every project.

Open the project, then ask Claude things like:

- "What labels and relationship types exist in this graph?"
- "Find the 10 most-connectedPersonnodes."
- "Create aMovienode titledInceptionreleased in 2010."

Claude will call thecypher_query,get_database_schema, andtest_database_connectiontools as needed.

The same package works as a plain MCP server for any MCP-compatible client.

Add to~/Library/Application Support/Claude/claude_desktop_config.json(macOS) or your Cursor MCP config:

{ "mcpServers": { "neo4j": { "command": "neo4j-mcp-server", "args": [] } } }

Set the credentials by either putting a.envnext to wherever the client launches the process, or by exportingNEO4J_*variables in the environment block.

neo4j-mcp-server --transport sse --host 0.0.0.0 --port 3000

A small client is bundled for one-off testing:

neo4j-mcp-client --test neo4j-mcp-client --schema neo4j-mcp-client --query "MATCH (n) RETURN count(n) AS nodes" neo4j-mcp-client --write --query "CREATE (p:Person {name: 'Alice'}) RETURN p"

All settings are read from environment variables (or a.envfile in the working directory).

Resources:neo4j://schema,neo4j://connection. Prompt:cypher_query_help.

pip install -e ".[dev]" pytest # 21 unit tests, no live database needed ruff check src/ tests/ mypy src/neo4j_mcp/

- Neo4j authentication failed— username/password mismatch. For unauthenticated DBs, leave both blank (don't set them toneo4j/neo4j).
- Neo4j service unavailable— DB is down orNEO4J_HOST/NEO4J_PORTare wrong. Trycypher-shell -a bolt://$NEO4J_HOST:$NEO4J_PORTto confirm.
- Plugin can't findneo4j-mcp-server— the console script isn't on the PATH that Claude Code inherits. Install withpipxor make sure your shell rc file exports the rightPATHfor GUI apps. On macOS, GUI apps don't read~/.zshrc; uselaunchctl setenv PATH ...or install into/usr/local/bin.
- truncated: trueon a read— bumplimiton the call, or setNEO4J_DEFAULT_RESULT_LIMIThigher in.env.

Neo4j graph database server (schema + read/write-cypher) and separate graph database backed memory

Query Amazon Neptune databases using openCypher, Gremlin, and SPARQL. Supports both Neptune Database and Neptune Analytics.

A server for Apache AGE, a graph database extension for PostgreSQL.

A server for interacting with ArangoDB, a native multi-model database system.

Manage graph-based data models, schemas, and ontologies with CoreModels. 16 MCP tools for visual data modeling with full JSON Schema support.

Query and interact with FalkorDB graph databases using AI models.

Query a hybrid graph (Neo4j) and vector (Qdrant) database for powerful semantic and graph-based document retrieval.

Interact with any Gremlin-compatible graph database using natural language, with support for schema discovery, complex queries, and data import/export.

Interact with a Hasura GraphQL endpoint, enabling schema introspection, queries, mutations, and data aggregation.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.