Is the Neo4j MCP server safe? What it can reach
What the Neo4j MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.
Neo4j maintains an official MCP server that runs locally and signs in to your database with a username and password. It can read the graph schema and run Cypher, and write Cypher is on by default. Set NEO4J_MCP_READ_ONLY to true to remove the write tool. A separate Labs repo adds servers, including one that manages Aura instances.
Who maintains it
| Implementation | Kind | Status |
|---|---|---|
| neo4j/mcp | Official | active |
| neo4j-contrib/mcp-neo4j (Neo4j Labs, no SLA) | Official | active |
It runs as a local process on your machine or as a hosted remote server.
How it signs in
A Neo4j username and password in environment variables. In stdio mode the server acts with that database user’s rights. In HTTP mode the URI and credentials come with each request instead.
What its tools can do
| Kind | Tools |
|---|---|
| Read | get-schema, read-cypher, list-gds-procedures |
| Write | none documented |
| Can’t be undone | write-cypher |
write-cypher runs any write Cypher, including deletes, so it is listed as destructive. It is disabled when NEO4J_MCP_READ_ONLY is true. These tools belong to neo4j/mcp. The Labs repo has different servers, such as mcp-neo4j-cloud-aura-api, which can create and destroy Aura instances.
Built-in limits
| Option | What it does |
|---|---|
NEO4J_MCP_READ_ONLY | Set to true to disable the write tool. The default is false. |
NEO4J_MCP_TOOLS | A comma-separated list of the tools the server advertises. The default is all four. |
NEO4J_MCP_TELEMETRY | Telemetry is on by default. Set to false to turn it off. |
HTTP mode settings | NEO4J_MCP_HTTP_HOST defaults to 127.0.0.1, NEO4J_MCP_HTTP_ALLOWED_ORIGINS is empty so CORS is off, and TLS is off unless NEO4J_MCP_HTTP_TLS_ENABLED is true. |
Least-privilege database user | The tools act as the database user, so a user with only read roles limits what any query can do. |
The risks
- With write-cypher enabled, an injected instruction could run DETACH DELETE or overwrite properties across the graph, and Neo4j has no undo.
- The README warns that a custom procedure wrongly marked read-only by Neo4j can slip past the read-cypher check.
- Graph properties come back as text the model reads, so a node property can carry an instruction.
- The Labs Aura server can create and destroy cloud instances, which is much more reach than the database server has.
Limit it in Claude Code
Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:
claude mcp add --env NEO4J_MCP_URI=... --env NEO4J_MCP_USERNAME=... --env NEO4J_MCP_PASSWORD=... --env NEO4J_MCP_DATABASE=... neo4j -- python -m neo4j_mcp_serverClaude Code names MCP tools mcp__neo4j__<tool>. Deny rules win over ask rules, and ask rules over allow rules. Put these in ~/.claude/settings.json or the project’s .claude/settings.json:
{
"permissions": {
"deny": [
"mcp__neo4j__write-cypher"
]
}
}Limit it in Codex
Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:
[mcp_servers.neo4j]
command = "python"
args = ["-m", "neo4j_mcp_server"]
env_vars = ["NEO4J_MCP_URI", "NEO4J_MCP_USERNAME", "NEO4J_MCP_PASSWORD", "NEO4J_MCP_DATABASE"]
disabled_tools = ["write-cypher"]Checklist
- Set NEO4J_MCP_READ_ONLY=true unless you need writes.
- Create a database user with read roles only for the agent.
- Use NEO4J_MCP_TOOLS to expose only the tools you need.
- Do not run the Labs Aura server unless you want instance management.
- Keep HTTP mode on 127.0.0.1 or behind TLS.
Checked against the vendor documentation on November 25, 2026. neo4j/mcp README · Neo4j MCP docs: stdio configuration · Neo4j MCP docs: HTTP configuration · neo4j-contrib/mcp-neo4j README
What Excellent covers
Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server
Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing