Neo4j MCP Server
Neo4j MCP Server
A Model Context Protocol server that exposes a Neo4j graph database as tools an AI agent can call. It serves the MCP protocol over HTTP, so it can be reached by any MCP client — including a Databricks Unity Catalog MCP connection.
Tools
Tool | Purpose |
| Run a read-only Cypher query ( |
| Run a write Cypher query ( |
| Return the graph schema — node labels, relationship types, properties, and connection patterns. Call this first so queries use the right labels/relationships instead of guessing. |
Requirements
Node.js 20+
A Neo4j database (e.g. Neo4j Aura)
Setup
npm install
cp .env.example .env # then fill in your Neo4j credentials + a secret token
npm run build
npm start # serves on http://localhost:3000Endpoints:
GET /health— liveness checkPOST /mcp— the MCP endpoint (requiresAuthorization: Bearer <MCP_SECRET_TOKEN>)
Optional: npm run seed loads sample data into Neo4j.
Environment
See .env.example. Copy it to .env and fill in:
Variable | Description |
| Bolt/Aura connection URI, e.g. |
| Neo4j username |
| Neo4j password |
| HTTP port (default |
| Bearer token clients must present on |
.envis git-ignored. Never commit real credentials.
Exposing it to Databricks (or any remote client)
The server listens on localhost. To let a remote MCP client reach it during development, expose the port with a tunnel:
ngrok http 3000Then register the public URL as a UC HTTP/MCP connection in Databricks, using
Authorization: Bearer <MCP_SECRET_TOKEN>. For production, host the server on a
reachable machine instead of a tunnel.
Project layout
neo4j-mcp-server/
├── src/
│ ├── index.ts # the MCP server (tools + HTTP transport)
│ └── seed.ts # optional sample-data seeder
├── package.json
├── tsconfig.json
├── .env.example
└── .gitignore