Loading...
Loading...
Use when installing, configuring, or troubleshooting the official Neo4j MCP server (neo4j/mcp): connecting Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Kiro, or other MCP-compatible editors to a Neo4j database via stdio or HTTP transport. Covers the four MCP tools (get-schema, read-cypher, write-cypher, list-gds-procedures), read-only mode, and multi-database configuration. Does NOT cover writing Cypher queries via those tools — use neo4j-cypher-skill. Does NOT cover agent memory — use neo4j-agent-memory-skill. Does NOT cover Aura instance provisioning — use neo4j-aura-provisioning-skill.
npx skill4agent add neo4j-contrib/neo4j-skills neo4j-mcp-skillneo4j-mcp-serverNEO4J_READ_ONLYneo4j-cypher-skillneo4j-aura-provisioning-skillneo4j-agent-memory-skillneo4j-cli-tools-skill| Tool | Type | What it does |
|---|---|---|
| read | Returns labels, relationship types, property keys, and indexes |
| read | Executes read-only Cypher ( |
| write | Executes write Cypher ( |
| read | Lists available Graph Data Science procedures (requires GDS plugin) |
# Option A: pip (recommended)
pip install neo4j-mcp-server
# Option B: Download binary
# https://github.com/neo4j/mcp/releases -- macOS, Linux, Windows binaries
# Option C: Docker
docker pull neo4j/mcpwhich neo4j-mcp # e.g. /usr/local/bin/neo4j-mcp
# or: /Users/you/project/.venv/bin/neo4j-mcp (if installed in venv)
neo4j-mcp --version # confirm it runsWhy absolute path matters: editors (Claude Code, Cursor, Claude Desktop) spawn the MCP server as a subprocess using their own restricted PATH — not your shell's PATH. On macOS, GUI apps do not inheritor.zshrc. Using.zprofileas the command will silently fail; usingneo4j-mcpalways works. Always use the output of/full/path/to/neo4j-mcpin thewhich neo4j-mcpfield below.command
# .env (gitignored)
NEO4J_URI=neo4j+s://<instance>.databases.neo4j.io # Aura
# or bolt://localhost:7687 # local
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=<password>
NEO4J_DATABASE=neo4jsource .env
cypher-shell -a "$NEO4J_URI" -u "$NEO4J_USERNAME" -p "$NEO4J_PASSWORD" \
"RETURN 'connected' AS status"
# If cypher-shell not available: python3 -c "
# from neo4j import GraphDatabase, __version__
# d = GraphDatabase.driver('$NEO4J_URI', auth=('$NEO4J_USERNAME','$NEO4J_PASSWORD'))
# d.verify_connectivity(); print('connected'); d.close()"~/.claude/settings.jsonneo4jmcpServers{
"mcpServers": {
"neo4j": {
"command": "/full/path/to/neo4j-mcp",
"env": {
"NEO4J_URI": "neo4j+s://<host>",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "<password>",
"NEO4J_DATABASE": "neo4j",
"NEO4J_READ_ONLY": "true"
}
}
}
}claude mcp add neo4j /full/path/to/neo4j-mcp~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"neo4j": {
"command": "/full/path/to/neo4j-mcp",
"env": {
"NEO4J_URI": "neo4j+s://<host>",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "<password>",
"NEO4J_DATABASE": "neo4j",
"NEO4J_READ_ONLY": "true"
}
}
}
}.vscode/mcp.jsonserversmcpServers{
"servers": {
"neo4j": {
"type": "stdio",
"command": "/full/path/to/neo4j-mcp",
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "password",
"NEO4J_DATABASE": "neo4j",
"NEO4J_READ_ONLY": "true"
}
}
}
}~/.cursor/mcp.json.cursor/mcp.jsonmcpServers~/.codeium/windsurf/mcp_config.json.windsurf/mcp_config.jsonmcpServers~/.kiro/settings/mcp.json.kiro/settings/mcp.json${VARIABLE}{
"mcpServers": {
"neo4j": {
"command": "/full/path/to/neo4j-mcp",
"env": {
"NEO4J_URI": "${NEO4J_URI}",
"NEO4J_USERNAME": "${NEO4J_USERNAME}",
"NEO4J_PASSWORD": "${NEO4J_PASSWORD}",
"NEO4J_DATABASE": "neo4j",
"NEO4J_READ_ONLY": "true"
}
}
}
}~/.vscode/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonmcpServersmcp_config.jsonmcpServersget-schemaread-cypher: RETURN 'connected' AS status{ "status": "connected" }get-schema# With credentials baked in (simpler — server authenticates all clients as the same user)
neo4j-mcp \
--neo4j-transport-mode http \
--neo4j-http-host 127.0.0.1 \
--neo4j-http-port 8080 \
--neo4j-uri bolt://localhost:7687 \
--neo4j-username neo4j \
--neo4j-password <password> \
--neo4j-database neo4j{
"mcpServers": {
"neo4j-http": {
"type": "http",
"url": "http://127.0.0.1:8080/mcp"
}
}
}--neo4j-username--neo4j-passwordAuthorization: Basic <base64(username:password)>echo -n "neo4j:<password>" | base64{
"headers": { "Authorization": "Basic bmVvNGo6cGFzc3dvcmQ=" }
}Security: bind to, not127.0.0.1. Only change to a broader interface if you need remote access and have TLS + auth in front of it.0.0.0.0
| Variable | Required | Default | Notes |
|---|---|---|---|
| yes | — | |
| yes | — | |
| yes | — | |
| no | server default | Specify explicitly to avoid routing to wrong DB |
| no | | Set |
NEO4J_READ_ONLY=falseget-schemaread-cypherlist-gds-procedureswrite-cypherget-schema# neo4j.conf
dbms.security.procedures.unrestricted=apoc.*read-cypher: RETURN apoc.version() AS vget-schema| Symptom | Likely cause | Fix |
|---|---|---|
| Server not listed in editor | Config file path wrong, JSON malformed, or editor not restarted | Validate JSON ( |
| Editor PATH doesn't include the binary location | Use absolute path in |
| Server starts then immediately exits | Python not found (pip install) or wrong binary for OS (binary install) | Run the command manually in terminal to see the error: |
| Wrong credentials | Verify URI + credentials with |
| | Remove or set to |
| DB not reachable from editor process | Check firewall, VPN, or whether Aura instance is paused |
| GDS not installed or Aura Free | GDS requires Aura Professional/Enterprise or self-managed with plugin |
which neo4j-mcpcommandneo4j-mcpRETURN 'connected'.env.gitignoreNEO4J_READ_ONLYtruefalseNEO4J_DATABASEserversmcpServerspython3 -m json.tool <file>read-cypher: RETURN 'connected' AS statusread-cypher: RETURN apoc.version()