Gene Library Courses Download Pricing Contact Sign in
neo4j logo
databases Official Website

Neo4j MCP Server – Graph Database Access

Neo4j MCP is the official Neo4j Model Context Protocol server for connecting MCP-compatible clients to Neo4j Aura, self-managed Neo4j, Docker, Desktop, and Sandbox deployments. It lets AI agents inspect graph schema, run read Cypher queries, optionally run write Cypher queries, and discover available Graph Data Science procedures with controlled credentials.

#graph#cypher#database

Overview

Neo4j MCP is the official Model Context Protocol server for Neo4j graph databases. It gives MCP-compatible clients such as Claude Desktop, VS Code, Cursor, and other agent environments a structured way to interact with a Neo4j database instead of relying on static schema notes or manually copied query results. The server can work with Neo4j Aura, self-managed Neo4j, Docker-based deployments, Neo4j Desktop, and Neo4j Sandbox.

What the MCP server enables

The server exposes graph-oriented tools for database exploration and Cypher execution. get-schema introspects labels, relationship types, and property keys so an AI agent can understand the graph model before generating queries. read-cypher executes read-only Cypher and rejects write, schema, admin, and profiling operations. write-cypher allows mutating Cypher when enabled, and is hidden when NEO4J_READ_ONLY=true. list-gds-procedures reports Graph Data Science procedures available in the connected Neo4j instance.

When to use it

Use Neo4j MCP when an agent needs live graph context: exploring a knowledge graph, generating Cypher from natural language, answering questions over connected data, checking relationships and paths, or preparing graph-backed application logic. It is also useful in development workflows where an IDE assistant needs to inspect a local or Aura database while helping with queries, data modeling, or Graph Data Science exploration.

Connection and authentication

The server supports STDIO and HTTP transport modes. STDIO is the default desktop-client mode and can be launched after installing neo4j-mcp-server from PyPI or the neo4j-mcp binary. Required STDIO credentials are NEO4J_URI, NEO4J_USERNAME, and NEO4J_PASSWORD; optional settings include NEO4J_DATABASE, NEO4J_READ_ONLY, telemetry, logging, and schema sample size. HTTP mode is configured with NEO4J_TRANSPORT_MODE=http and exposes a local /mcp endpoint; each request supplies credentials through the configured authentication header, usually Authorization with either Bearer token or Basic authentication.

Key considerations

Neo4j recommends using a restricted database user and reviewing generated Cypher before execution, especially on production systems. Set NEO4J_READ_ONLY=true when the agent should only inspect and query data. HTTP mode should be protected with appropriate network controls and authentication; unauthenticated ping or tool-list endpoints should only be enabled when a deployment platform requires them. The older NEO4J_MCP_TRANSPORT option is deprecated in favor of NEO4J_TRANSPORT_MODE.

Supported Transports

streamable_http

URL: http://127.0.0.1:80/mcp

stdio

Command: python

Args:

  • -m
  • neo4j_mcp_server

Frequently Asked Questions

When should an AI agent use the Neo4j MCP server?
Use it when an agent needs live access to a Neo4j graph database for schema discovery, read-only Cypher querying, optional controlled writes, or Graph Data Science procedure discovery. It is especially useful for knowledge graphs, relationship-heavy data, graph-backed application development, and database exploration inside MCP-capable IDEs or desktop clients.
What does Neo4j MCP add to an AI agent's capabilities?
It lets the agent inspect labels, relationship types, and property keys with `get-schema`, run read-only Cypher with `read-cypher`, run write Cypher when the server is not in read-only mode, and list available GDS procedures. These capabilities give the model live database context rather than relying only on prior knowledge or pasted schema text.
What can the AI agent access or manage through this server?
The agent can access the configured Neo4j database through the credentials supplied to the server. It can introspect schema, retrieve data with read Cypher, and, if permitted, execute mutating Cypher. `write-cypher` is disabled when `NEO4J_READ_ONLY=true`, and the server's access is bounded by the Neo4j user permissions used for the connection.
How is authentication configured for Neo4j MCP?
In STDIO mode, the server uses `NEO4J_URI`, `NEO4J_USERNAME`, and `NEO4J_PASSWORD` to connect to the database, with `NEO4J_DATABASE` and other options available for tuning. In HTTP mode, Neo4j credentials are supplied per request using the configured auth header, normally `Authorization`, with Bearer token for suitable Enterprise or Aura SSO setups or Basic authentication for username/password credentials.
Which transport should be used for Neo4j MCP?
Use STDIO for local desktop and IDE clients where the MCP host starts the server process directly. Use HTTP when deploying the server for web-based or multi-tenant scenarios, when credentials need to arrive per request, or when the server must run behind its own network and TLS controls. Configure HTTP with `NEO4J_TRANSPORT_MODE=http`; the older `NEO4J_MCP_TRANSPORT` option is deprecated.