/neo4j-skills:neo4j-mcp-skillfrom neo4j-skills
Installs, configures, and troubleshoots the official Neo4j MCP server (neo4j/mcp) for connecting MCP-compatible editors to a Neo4j database via stdio or HTTP transport.
Ships in neo4j-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Installs and configures the official Neo4j MCP server so AI agents can connect to Neo4j via any MCP-compatible client.
neo4j-mcp binary or neo4j-mcp-server from PyPI) and writing the correct config for a specific editorNEO4J_MCP_READ_ONLY)neo4j-cypher-skillneo4j-aura-provisioning-skillneo4j-agent-memory-skillneo4j-cli-tools-skillNEO4J_MCP_* env vars (NEO4J_MCP_URI, NEO4J_MCP_USERNAME, NEO4J_MCP_PASSWORD, NEO4J_MCP_DATABASE, NEO4J_MCP_READ_ONLY, ...) and unprefixed flags (--uri, --username, --read-only, ...). Old NEO4J_* names and --neo4j-* flags removed — v1.x configs fail.NEO4J_MCP_DATABASE required (no longer defaults to neo4j)./db/{database}/mcp; URI and credentials per request; NEO4J_MCP_HTTP_ALLOWED_URIS required.neo4j-mcp -v. On v1.x, upgrade rather than mixing old names. CHANGELOG| Tool | Type | What it does |
|---|---|---|
get-schema | read | Returns labels, relationship types, property keys, and indexes |
read-cypher | read | Executes read-only Cypher (MATCH, RETURN, SHOW) |
write-cypher | write | Executes write Cypher (MERGE, CREATE, SET, DELETE) — not exposed when NEO4J_MCP_READ_ONLY=true |
list-gds-procedures | read | Lists available Graph Data Science procedures; omitted from the tool list when GDS is not installed |
# Option A: PyPI — command name is neo4j-mcp-server
pip install neo4j-mcp-server # or run without install: uvx neo4j-mcp-server
# Option B: Homebrew or release binary — command name is neo4j-mcp
brew install neo4j-mcp
# or download from https://github.com/neo4j/mcp/releases (neo4j-mcp_<OS>_<arch>.tar.gz / .zip)
# Option C: Docker
docker pull neo4j/mcp
Get the absolute path — you will need this in Step 3. Use the name that matches the install method:
which neo4j-mcp-server # PyPI, e.g. /Users/you/project/.venv/bin/neo4j-mcp-server
which neo4j-mcp # Homebrew/binary, e.g. /usr/local/bin/neo4j-mcp
neo4j-mcp -v # binary: prints version; expect 2.x
Why 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 inherit
.zshrcor.zprofile. Using a bare command name will silently fail; using the absolute path always works. Always use the output ofwhichin thecommandfield below (/full/path/to/neo4j-mcpin the examples — substituteneo4j-mcp-serverfor PyPI installs).
# .env (gitignored)
NEO4J_MCP_URI=neo4j+s://<instance>.databases.neo4j.io # Aura
# or bolt://localhost:7687 # local
NEO4J_MCP_USERNAME=neo4j
NEO4J_MCP_PASSWORD=<password>
NEO4J_MCP_DATABASE=neo4j
Verify connectivity before configuring the editor:
source .env
cypher-shell -a "$NEO4J_MCP_URI" -u "$NEO4J_MCP_USERNAME" -p "$NEO4J_MCP_PASSWORD" -d "$NEO4J_MCP_DATABASE" \
"RETURN 'connected' AS status"
# If cypher-shell not available: python3 -c "
# from neo4j import GraphDatabase, __version__
# d = GraphDatabase.driver('$NEO4J_MCP_URI', auth=('$NEO4J_MCP_USERNAME','$NEO4J_MCP_PASSWORD'))
# d.verify_connectivity(); print('connected'); d.close()"
Pick the config block for your editor. All use STDIO transport (the MCP server runs as a subprocess of the editor).
Claude Code — project .mcp.json (repo root, under mcpServers) or claude mcp add (local/user scope, stored in ~/.claude.json). Never ~/.claude/settings.json — Claude Code ignores MCP servers there. If .mcp.json exists, merge the neo4j block into mcpServers — do not replace the file. Gitignore .mcp.json if it holds a password.
{
"mcpServers": {
"neo4j": {
"command": "/full/path/to/neo4j-mcp",
"env": {
"NEO4J_MCP_URI": "neo4j+s://<host>",
"NEO4J_MCP_USERNAME": "neo4j",
"NEO4J_MCP_PASSWORD": "<password>",
"NEO4J_MCP_DATABASE": "neo4j",
"NEO4J_MCP_READ_ONLY": "true"
}
}
}
}
CLI alternative (sets command and env; at least one option such as --transport stdio must sit between --env and the name):
claude mcp add --env NEO4J_MCP_URI=neo4j+s://<host> --env NEO4J_MCP_USERNAME=neo4j \
--env NEO4J_MCP_PASSWORD=<password> --env NEO4J_MCP_DATABASE=neo4j --env NEO4J_MCP_READ_ONLY=true \
--transport stdio neo4j -- /full/path/to/neo4j-mcp
claude mcp get neo4j # verify
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"neo4j": {
"command": "/full/path/to/neo4j-mcp",
"env": {
"NEO4J_MCP_URI": "neo4j+s://<host>",
"NEO4J_MCP_USERNAME": "neo4j",
"NEO4J_MCP_PASSWORD": "<password>",
"NEO4J_MCP_DATABASE": "neo4j",
"NEO4J_MCP_READ_ONLY": "true"
}
}
}
}
VS Code — .vscode/mcp.json (note: uses servers, not mcpServers — different from all other editors):
{
"servers": {
"neo4j": {
"type": "stdio",
"command": "/full/path/to/neo4j-mcp",
"env": {
"NEO4J_MCP_URI": "bolt://localhost:7687",
"NEO4J_MCP_USERNAME": "neo4j",
"NEO4J_MCP_PASSWORD": "password",
"NEO4J_MCP_DATABASE": "neo4j",
"NEO4J_MCP_READ_ONLY": "true"
}
}
}
}
Cursor — global: ~/.cursor/mcp.json / project: .cursor/mcp.json (same structure as Claude Code, uses mcpServers).
Windsurf — path depends on version; check the editor's current MCP docs. Current docs (Devin Desktop): user ~/.config/devin/mcp_config.json, project .devin/mcp_config.json. Older Windsurf installs: ~/.codeium/windsurf/mcp_config.json.
Kiro — global: ~/.kiro/settings/mcp.json / project: .kiro/settings/mcp.json. Supports ${VARIABLE} to pull from the shell environment exported before the editor launched:
{
"mcpServers": {
"neo4j": {
"command": "/full/path/to/neo4j-mcp",
"env": {
"NEO4J_MCP_URI": "${NEO4J_MCP_URI}",
"NEO4J_MCP_USERNAME": "${NEO4J_MCP_USERNAME}",
"NEO4J_MCP_PASSWORD": "${NEO4J_MCP_PASSWORD}",
"NEO4J_MCP_DATABASE": "neo4j",
"NEO4J_MCP_READ_ONLY": "true"
}
}
}
}
Cline — ~/.vscode/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json (same structure as Claude Code, uses mcpServers). Or add via VS Code settings → Cline extension → MCP Servers panel.
Antigravity — global ~/.gemini/config/mcp_config.json, workspace .agents/mcp_config.json (uses mcpServers). Remote servers: serverUrl (not httpUrl).
After editing the config file, restart the editor (or reload the MCP server if the editor supports hot-reload). Verify the server appears in the editor's MCP panel or tool list.
Run get-schema via the agent or directly via MCP. Do not use "does it return labels?" as the test — an empty database returns no labels and looks identical to a broken connection.
Use this instead — it succeeds even on an empty DB:
read-cypher: RETURN 'connected' AS status
Expected: { "status": "connected" }. Any result confirms the server is alive and the credentials are valid.
If the database has data, also run:
get-schema
and confirm it returns the node labels and relationship types you expect.
HTTP transport runs the MCP server as a persistent network service — useful for shared servers, containers, or multiple clients.
Credentials are per request only — the server refuses to start if NEO4J_MCP_URI/USERNAME/PASSWORD/DATABASE (or --uri/--username/--password/--database) are set in HTTP mode.
NEO4J_MCP_TRANSPORT_MODE=http \
NEO4J_MCP_HTTP_HOST=127.0.0.1 \
NEO4J_MCP_HTTP_PORT=8080 \
NEO4J_MCP_HTTP_ALLOWED_URIS=localhost:7687 \
neo4j-mcp
# NEO4J_MCP_HTTP_ALLOWED_URIS: comma-separated host[:port] clients may target (required in 2.0; e.g. *.databases.neo4j.io)
Each request: POST /db/{database}/mcp with headers X-Neo4j-MCP-URI: <bolt URI> (missing → 400) and Authorization: Basic <base64(user:password)> or Bearer <token> (missing → 401). Optional per-request narrowing: X-Neo4j-MCP-ReadOnly: true, X-Neo4j-MCP-Tools: get-schema,read-cypher.
Generate the Basic value:
echo -n "neo4j:<password>" | base64
Editor config for HTTP — keys differ per editor:
Claude Code / Cursor (mcpServers, url):
{
"mcpServers": {
"neo4j-http": {
"type": "http",
"url": "http://127.0.0.1:8080/db/neo4j/mcp",
"headers": {
"X-Neo4j-MCP-URI": "bolt://localhost:7687",
"Authorization": "Basic <base64>"
}
}
}
}
Claude Code CLI: claude mcp add --transport http neo4j-http http://127.0.0.1:8080/db/neo4j/mcp --header "X-Neo4j-MCP-URI: bolt://localhost:7687" --header "Authorization: Basic <base64>".
VS Code (.vscode/mcp.json): same entry under servers instead of mcpServers.
Antigravity: same entry under mcpServers, with serverUrl in place of url and type.
Windsurf, Kiro, Cline, Claude Desktop: check the editor's docs for remote-server keys; Claude Desktop JSON config has no direct remote entry — use STDIO there.
Security: bind to
127.0.0.1, not0.0.0.0. Only change to a broader interface if you need remote access and have TLS + auth in front of it.
| Variable | Required | Default | Notes |
|---|---|---|---|
NEO4J_MCP_URI | STDIO: yes | — | neo4j+s:// for Aura; bolt:// for local. HTTP: unset (per-request header) |
NEO4J_MCP_USERNAME | STDIO: yes | — | HTTP: unset |
NEO4J_MCP_PASSWORD | STDIO: yes | — | HTTP: unset |
NEO4J_MCP_DATABASE | STDIO: yes | none (2.0) | HTTP: unset (database in URL path) |
NEO4J_MCP_READ_ONLY | no | false | Set true to hide write-cypher (safe default for exploration) |
NEO4J_MCP_TELEMETRY | no | true | Set false to opt out |
NEO4J_MCP_TOOLS | no | all four | Comma-separated tool allowlist |
Full list (HTTP/TLS, timeouts, logging): configuration reference.
When to set NEO4J_MCP_READ_ONLY=false (or remove the variable): any use case that needs to write data — imports, MERGE, schema changes, GDS write-back. Without write access, the agent will see only three tools (get-schema, read-cypher, list-gds-procedures) and write-cypher calls will fail.
The MCP server requires APOC (incl. apoc.meta.schema) — without it the server fails its requirement check at the MCP initialize handshake ("please ensure the APOC plugin is installed..."). On Aura, APOC is included automatically. On self-managed Neo4j, install the APOC plugin and allow it:
# neo4j.conf
dbms.security.procedures.unrestricted=apoc.*
Without the unrestricted line, get-schema returns an error ("apoc.meta.schema is unavailable because it is sandboxed"), not partial results.
Verify before configuring the editor (apoc.version() passing does not prove the meta procedures exist):
cypher-shell -a "$NEO4J_MCP_URI" -u "$NEO4J_MCP_USERNAME" -p "$NEO4J_MCP_PASSWORD" -d "$NEO4J_MCP_DATABASE" \
"CALL apoc.meta.schema() YIELD value RETURN 'ok' AS apoc_meta"
# 'ok' → OK; "Unknown procedure"/no such procedure → install APOC (core); 52N34 "restricted" → add dbms.security.procedures.unrestricted=apoc.*
| Symptom | Likely cause | Fix |
|---|---|---|
| Server not listed in editor | Config file path wrong, JSON malformed, or editor not restarted | Validate JSON (python3 -m json.tool <config-file>); confirm correct file for your editor; restart editor |
neo4j-mcp: command not found | Editor PATH doesn't include the binary location, or PyPI install (command is neo4j-mcp-server) | Use absolute path in command: run which neo4j-mcp (binary/Homebrew) or which neo4j-mcp-server (PyPI) and paste the result |
| 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: /full/path/neo4j-mcp -v |
AuthenticationException | Wrong credentials | Verify URI + credentials with cypher-shell or driver before editing config |
write-cypher tool missing | NEO4J_MCP_READ_ONLY=true | Remove or set to false if writes are needed |
ServiceUnavailable | DB not reachable from editor process | Check firewall, VPN, or whether Aura instance is paused |
list-gds-procedures missing from tool list | GDS not installed or Aura Free | GDS requires Aura Professional/Enterprise or self-managed with plugin |
neo4j-mcp -v); config uses only NEO4J_MCP_* nameswhich neo4j-mcp (or which neo4j-mcp-server for PyPI) run and absolute path noted — this goes in commandRETURN 'connected') before editing editor config.env in .gitignoreNEO4J_MCP_READ_ONLY set intentionally — true for exploration, false/absent for write use casesNEO4J_MCP_DATABASE set (required in STDIO).mcp.json or claude mcp add; VS Code uses servers; others mcpServers)python3 -m json.tool <file> before saving)read-cypher: RETURN 'connected' AS status returns a resultCALL apoc.meta.schema() succeedsWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub neo4j/agent-skills --plugin neo4j-skills30 skills in this plugin
/neo4j-agent-memory-skillAuthoritative reference for the neo4j-agent-memory Python package — a graph-native memory system for AI agents built on Neo4j — and for the hosted service (NAMS) at memory.neo4jlabs.com. Use this skill whenever the user mentions neo4j-agent-memory, agent memory with Neo4j, context graphs, the POLE+O model, MemoryClient/MemorySettings, the memory MCP server, or any of the framework integrations (LangChain, PydanticAI, CrewAI, AWS Strands, Google ADK, Microsoft Agent Framework, OpenAI Agents, LlamaIndex). Also use when the user mentions the hosted service at memory.neo4jlabs.com, NAMS, the Neo4j Agent Memory Service, the `nams_` API key prefix, or the hosted MCP endpoint. Also use when writing documentation, blog posts, tutorials, PRDs, or code samples for the project, when comparing agent memory approaches, or when positioning graph-native memory against vector-only approaches — even if the user doesn't explicitly name the package. Does NOT handle GraphRAG pipelines — use neo4j-graphrag-skill./neo4j-aura-agent-skillManages Neo4j Aura Agents via the v2beta1 REST API — create, list, get, update, delete, and invoke Aura agents backed by an AuraDB instance. Use when configuring Aura Agent tools (CypherTemplate, SimilaritySearch, Text2Cypher), setting system prompts, deploying agents to REST or MCP endpoints, invoking agents with natural language queries, or generating evaluation datasets (max 50 questions) for the Aura Agent evaluation feature. Covers OAuth2 auth, organization/project scoping, tool parameter schemas, and InvokeAgentResponse format. Does NOT cover AuraDB instance provisioning — use neo4j-aura-provisioning-skill. Does NOT cover vector index creation — use neo4j-vector-index-skill.Other plugins' skills for the same job