Self-hosted
Database Basic Auth

Neo4j REST API

Native graph database with powerful Cypher query language

Neo4j is a high-performance native graph database that stores data as nodes and relationships rather than tables. Developers use Neo4j's REST API to execute Cypher queries, manage graph data structures, and build applications requiring complex relationship traversal, recommendation engines, fraud detection, and knowledge graphs. It excels at handling connected data scenarios where traditional relational databases struggle.

Base URL http://localhost:7474/db/neo4j/tx

API Endpoints

MethodEndpointDescription
POST/commitExecute one or more Cypher statements in a single transaction and commit immediately
POST/Open a new transaction and execute Cypher statements without committing
POST/{transactionId}/commitCommit an open transaction by its transaction ID. Requires transactionId in the path.
DELETE/{transactionId}Rollback an open transaction using its transaction ID. Discards all uncommitted changes.
GET/Get service root and available endpoints. Returns discovery information for the Neo4j database.
POST/cypherExecute a single Cypher query using the legacy endpoint. Returns query results directly.
GET/schema/constraintList all constraints defined in the database. Returns constraint types and affected properties.
GET/schema/indexList all indexes defined in the database. Returns index types and indexed properties.
POST/schema/constraintCreate a new constraint on nodes or relationships. Requires constraint type and property specification.
POST/schema/indexCreate a new index on node properties. Requires label and property names to index.
GET/node/{nodeId}Retrieve a node by its internal ID. Returns node properties, labels, and relationships.
POST/nodeCreate a new node with optional properties and labels. Returns the created node's internal ID.
DELETE/node/{nodeId}Delete a node by its internal ID. Node must have no relationships to be deleted.
GET/relationship/{relationshipId}Retrieve a relationship by its internal ID. Returns relationship type, properties, and connected nodes.
POST/node/{nodeId}/relationshipsCreate a relationship between two nodes. Requires source nodeId, target node, and relationship type.

Code Examples

curl -X POST http://localhost:7474/db/neo4j/tx/commit \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Basic bmVvNGo6cGFzc3dvcmQ=' \
  -d '{
    "statements": [
      {
        "statement": "MATCH (n:Person {name: $name}) RETURN n",
        "parameters": {
          "name": "Alice"
        }
      }
    ]
  }'

Use Neo4j from Claude / Cursor / ChatGPT

Neo4j is a self-hosted protocol — it lives on a host you operate (default http://localhost:7474/db/neo4j/tx). A hosted MCP gateway can't reach localhost on your machine, so the usual one-click setup doesn't apply. These are the tools an MCP for Neo4j would expose:

execute_cypher_query Execute a Cypher query against the Neo4j database and return results in a structured format
create_graph_nodes Create multiple nodes with specified labels and properties in a single transaction
find_shortest_path Find the shortest path between two nodes using Cypher's shortest path algorithms
analyze_graph_patterns Analyze graph patterns and relationships to discover insights about connected data
manage_graph_schema Create, list, or delete indexes and constraints to optimize graph queries

Run an Neo4j MCP locally

The local-CLI version of these tools is on the way (npx @meru/rest-mcp --vendor=neo4j · BYO connection string · zero secrets sent to us). For now use the patterns below in your own MCP server, or self-host one from the IOX templates.

Build your own Neo4j MCP →

Related APIs