# Neo4J

```json
{
  "name": "Neo4J",
  "slug": "neo4j",
  "url": "https://composio.dev/toolkits/neo4j",
  "markdown_url": "https://composio.dev/toolkits/neo4j.md",
  "logo_url": "https://logos.composio.dev/api/neo4j",
  "categories": [
    "data & analytics"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-06-18T09:55:06.701Z"
}
```

![Neo4J logo](https://logos.composio.dev/api/neo4j)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Neo4J MCP or direct API to run Cypher queries, inspect graph relationships, create nodes and edges, and analyze connected data through natural language.

## Summary

Neo4J is a graph database platform for storing and querying connected data.
Use it to model relationships, run Cypher queries, and power real-time graph analytics.

## Categories

- data & analytics

## Toolkit Details

- Tools: 21

## Images

- Logo: https://logos.composio.dev/api/neo4j

## Authentication

- **Oauth2**
  - Type: `oauth2`
  - Description: Oauth2 authentication for Neo4J.
  - Setup:
    - Configure Oauth2 credentials for Neo4J.
    - Use the credentials when creating an auth config in Composio.
- **Basic**
  - Type: `basic_auth`
  - Description: Basic authentication for Neo4J.
  - Setup:
    - Configure Basic credentials for Neo4J.
    - Use the credentials when creating an auth config in Composio.
- **Api Key**
  - Type: `api_key`
  - Description: Api Key authentication for Neo4J.
  - Setup:
    - Configure Api Key credentials for Neo4J.
    - Use the credentials when creating an auth config in Composio.
- **S2s Oauth2**
  - Type: `custom`
  - Description: S2s Oauth2 authentication for Neo4J.
  - Setup:
    - Configure S2s Oauth2 credentials for Neo4J.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- Run Cypher queries on customer graph
- Find shortest paths between accounts
- Create nodes for new transactions

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `NEO4J_AGGREGATE_DIRECTORS` | Aggregate Directors Count | Executes a directorsAggregate GraphQL query to count directors in Neo4j. Use when you need to get the total count of director records in the database. The GraphQL query returns the count of all directors regardless of pagination. |
| `NEO4J_CREATE_INSTANCE_BETA` | Create Neo4j Aura Instance | Creates a new Neo4j Aura instance with the specified configuration. Use this action when you need to provision a new Neo4j Aura database instance. The operation is asynchronous - the API returns 202 Accepted while the instance is being created in the background. Use this action when you need to create a new Neo4j Aura database instance for your project. The returned credentials (username and password) should be stored securely as they cannot be retrieved again. |
| `NEO4J_CREATE_SNAPSHOT` | Create Neo4j Aura Snapshot | Create an on-demand snapshot of a Neo4j Aura instance. Triggers asynchronous backup creation and returns a snapshot ID that can be used to monitor progress. Use this action when you need to manually create a backup point before major changes or to preserve the current state of your database. Use this action when you want to create an on-demand backup snapshot of your Neo4j Aura instance before performing risky operations like data migrations, schema changes, or bulk updates. |
| `NEO4J_ESTIMATE_GDS_SESSION_SIZE` | Estimate GDS Session Size | Estimate the size of a new GDS (Graph Data Science) session based on node/relationship counts and algorithm categories. Use this action when you need to determine the appropriate GDS session size before creating a new graph analytics session. This helps ensure you provision sufficient memory for your graph workloads, particularly useful when planning memory allocation for large-scale graph operations like community detection, pathfinding, or similarity algorithms. The estimation considers the number of nodes, relationships, properties, and intended algorithm categories to provide accurate memory recommendations. |
| `NEO4J_GET_INSTANCE_BETA` | Get Neo4j Aura Instance Details | Retrieves details for a specific Neo4j Aura instance using its unique instance ID. Returns comprehensive information including instance name, status, cloud provider, region, memory allocation, connection URL, and other configuration details. Use this action when you need to check the status, configuration, or connection details of a specific Neo4j Aura instance. This is a read-only operation that does not modify any instance state. |
| `NEO4J_GET_ORGANIZATION_USER` | Get Neo4j Aura Organization User | Retrieves details of a specific user in a Neo4j Aura organization. Returns user information including email, organization roles, MFA status, last activity, and project-level access permissions. Use this action when you need to inspect user details, verify organization membership, or check user permissions and access levels within an Aura organization. |
| `NEO4J_GET_PROJECT` | Get Neo4j Aura Project Details | Retrieve details of a specific Neo4j Aura project (tenant). Returns project information including its ID, name, and available instance configurations with regions, types, memory, storage options, and cloud providers. Use this action when you need to inspect project details or discover available instance configurations before creating a new Aura instance. |
| `NEO4J_GET_PROJECT_BETA` | Get Neo4j Aura Project Details (v1beta5) | Retrieve details of a specific Neo4j Aura project (tenant) using the v1beta5 API. Returns project information including its ID, name, and available instance configurations with regions, types, memory, storage options, and cloud providers. Use this action when you need to inspect project details or discover available instance configurations before creating a new Aura instance. This uses the v1beta5 API version which may have additional features compared to v1. |
| `NEO4J_GET_SNAPSHOT` | Get Neo4j Aura Snapshot Details | Retrieves details of a specific snapshot for a Neo4j Aura instance. Returns the snapshot profile, current status, and creation timestamp. Use this action when you need to check the status or details of a particular backup snapshot. |
| `NEO4J_LIST_AGENTS` | List Neo4j Aura Agents | List all agents belonging to a specific Neo4j Aura project. Returns agent information including ID, name, description, database ID, privacy settings, endpoint links, MCP status, and attached tools. Use this action when you need to retrieve all agents for a specific project to identify available agents or to select a specific agent for subsequent operations. |
| `NEO4J_LIST_GDS_SESSIONS` | List GDS Sessions | List all Graph Data Science (GDS) sessions for the authenticated Neo4j Aura account. Returns a summary of each GDS session including status, memory allocation, host information, and expiry date. Use optional filters (instanceId, tenantId, organizationId) to narrow down the results to specific instances or organizational units. Use this action when you need to: - Monitor active GDS sessions and their resource usage - Check session expiry dates to plan for renewals - View host connectivity information for GDS sessions - Audit GDS session creation and status across the organization This action is read-only and does not modify any resources. |
| `NEO4J_LIST_INSTANCES_BETA` | List Neo4j Aura Instances | Returns a list of Neo4j Aura instances. Use when you need to retrieve all available Neo4j Aura instances in your account, optionally filtered by tenant. |
| `NEO4J_LIST_IP_FILTERS` | List IP Filters | Returns a list of IP filters configured for a Neo4j Aura organization. Use this action when you need to retrieve all IP filters to check which CIDR blocks are allowed or blocked, or to determine which resources are protected by IP filtering. |
| `NEO4J_LIST_PROJECTS` | List Aura Projects | List all Aura projects (tenants) available to the authenticated user. Returns a summary of each project including its unique ID and name. Use this action when you need to retrieve all Aura projects to identify which projects are accessible or to select a specific project for subsequent operations. |
| `NEO4J_LIST_PROJECT_USERS` | List Project Users | List all users in a specific Neo4j Aura project. Returns user information including email, user ID, and project roles for each user. Use this action when you need to retrieve all users associated with a project to identify team members or verify user access levels. |
| `NEO4J_LIST_SNAPSHOTS` | List Neo4j Aura Snapshots | Lists available snapshots for a Neo4j Aura instance. Returns both scheduled and ad-hoc snapshots with their status and creation timestamps. Use when you need to retrieve information about available database backups or recovery points for a specific Aura instance. The date parameter can filter results to a specific day. |
| `NEO4J_PAUSE_INSTANCE_BETA` | Pause Neo4j Aura Instance | Pauses a Neo4j Aura instance. Use when you need to temporarily stop an instance to reduce costs or perform maintenance. The instance can be resumed later using the ResumeInstance action. This action is asynchronous - the instance will be in a 'pausing' state until the operation completes. Note: this action cannot be performed if an ongoing operation (such as cloning) is in progress on the instance. |
| `NEO4J_RESTORE_SNAPSHOT` | Restore Neo4j Aura Instance from Snapshot | Restore a Neo4j Aura instance from a snapshot. Replaces all current data with the snapshot data. This action is irreversible — all data since the snapshot was taken will be permanently lost. Use this action when you need to recover an Aura instance to a previous state from a specific snapshot. This operation cannot be undone once initiated. |
| `NEO4J_UPDATE_INSTANCE` | Update Neo4j Aura Instance | Updates a Neo4j Aura instance configuration. Allows modifying instance properties such as name, memory allocation, storage size, vector optimization, and graph analytics plugin. Use this action when you need to modify an existing Aura instance's settings or resource allocation. Note: Some operations like memory or storage resizing may trigger an asynchronous update process where the instance status changes to 'updating'. Check the instance status after making changes. |
| `NEO4J_UPDATE_INSTANCE_BETA` | Update Neo4j Aura Instance | Edits the configuration of a Neo4j Aura instance. Allows updating the instance name, memory allocation, storage size, and plugin configurations. Use this action when you need to modify an existing Neo4j Aura instance's settings such as renaming the instance, adjusting memory/storage resources, or enabling/disabling the graph analytics plugin or vector optimization features. Note: Some operations like resizing memory or storage may result in a 202 Accepted response indicating the resize request was accepted for async processing. |
| `NEO4J_UPDATE_IP_FILTER` | Update IP Filter | Updates an existing IP filter for a Neo4j Aura organization. Use this action when you need to modify an existing IP filter's settings, such as updating its name, description, allow list entries, or enabling/disabling the filter. The request body accepts partial updates - only include the fields you want to modify. This is an idempotent operation that updates the specified properties while preserving all other existing values. |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK
```python
pip install composio_openai
```

```typescript
npm install @composio/openai
```

#### Path 1, Step 2: Initialize Composio and Create Tool Router Session

Import and initialize Composio client, then create a Tool Router session
```python
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')
```

```typescript
import OpenAI from 'openai';
import { Composio } from '@composio/core';
import { OpenAIResponsesProvider } from '@composio/openai';

const composio = new Composio({
  provider: new OpenAIResponsesProvider(),
});
const openai = new OpenAI({});
const session = await composio.create('your-user-id');
```

#### Path 1, Step 3: Execute Neo4J Tools via Tool Router with Your Agent

Get tools from Tool Router session and execute Neo4J actions with your Agent
```python
tools = session.tools
response = openai.responses.create(
  model='gpt-4.1',
  tools=tools,
  input=[{
    'role': 'user',
    'content': 'Run this Cypher query in Neo4J: MATCH (n) RETURN labels(n) AS labels, count(*) AS count LIMIT 10'
  }]
)
result = composio.provider.handle_tool_calls(
  response=response,
  user_id='your-user-id'
)
print(result)
```

```typescript
const tools = session.tools;
const response = await openai.responses.create({
  model: 'gpt-4.1',
  tools: tools,
  input: [{
    role: 'user',
    content: 'Run this Cypher query in Neo4J: MATCH (n) RETURN labels(n) AS labels, count(*) AS count LIMIT 10'
  }],
});
const result = await composio.provider.handleToolCalls(
  'your-user-id',
  response.output
);
console.log(result);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK for Python or TypeScript
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/openai @ai-sdk/mcp
```

#### Path 2, Step 2: Initialize Client and Create Tool Router Session

Import and initialize the Composio client, then create a Tool Router session for Neo4J
```python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
```

```typescript
import { Composio } from '@composio/core';

const composio = new Composio({ apiKey: 'your-api-key' });
const session = await composio.create('your-user-id');
console.log(`Tool Router session created: ${session.mcp.url}`);
```

#### Path 2, Step 3: Connect to AI Agent

Use the MCP server with your AI agent (Anthropic Claude or Mastra)
```python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Neo4J tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Find the shortest path between Customer A and Product B in Neo4J')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { openai } from '@ai-sdk/openai';
import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
import { generateText } from 'ai';

const client = await createMCPClient({
  transport: {
    type: 'http',
    url: session.mcp.url,
    headers: {
      'x-api-key': 'your-composio-api-key',
    },
  },
});

const tools = await client.tools();
const { text } = await generateText({
  model: openai('gpt-4o'),
  tools,
  messages: [{
    role: 'user',
    content: 'Find the shortest path between Customer A and Product B in Neo4J'
  }],
  maxSteps: 5,
});

console.log(`Agent: ${text}`);
```

## Why Use Composio?

### 1. AI Native Neo4J Integration

- Supports both Neo4J MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable Cypher and graph operations
- Rich coverage for reading, writing, and querying your Neo4J graph data

### 2. Managed Auth

- Handles Neo4J OAuth, Basic Auth, API key, and service-to-service OAuth flows
- Central place to manage, scope, and revoke Neo4J access
- Per user and per environment credentials instead of hard-coded database secrets

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what query ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC so you control which agents and users can access Neo4J
- Scoped, least privilege access to Neo4J graph resources
- Full audit trail of agent actions to support review, debugging, and compliance

## Use Neo4J with any AI Agent Framework

Choose a framework you want to connect Neo4J with:

- [Claude Cowork](https://composio.dev/toolkits/neo4j/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/neo4j/framework/codex)

## Related Toolkits

- [Excel](https://composio.dev/toolkits/excel) - Microsoft Excel is a robust spreadsheet application for organizing, analyzing, and visualizing data. It's the go-to tool for calculations, reporting, and flexible data management.
- [21risk](https://composio.dev/toolkits/_21risk) - 21RISK is a web app built for easy checklist, audit, and compliance management. It streamlines risk processes so teams can focus on what matters.
- [Abstract](https://composio.dev/toolkits/abstract) - Abstract provides a suite of APIs for automating data validation and enrichment tasks. It helps developers streamline workflows and ensure data quality with minimal effort.
- [Addressfinder](https://composio.dev/toolkits/addressfinder) - Addressfinder is a data quality platform for verifying addresses, emails, and phone numbers. It helps you ensure accurate customer and contact data every time.
- [Agentql](https://composio.dev/toolkits/agentql) - Agentql is a toolkit that connects AI agents to the web using a specialized query language. It enables structured web interaction and data extraction for smarter automations.
- [Agenty](https://composio.dev/toolkits/agenty) - Agenty is a web scraping and automation platform for extracting data and automating browser tasks—no coding needed. It streamlines data collection, monitoring, and repetitive online actions.
- [Ambee](https://composio.dev/toolkits/ambee) - Ambee is an environmental data platform providing real-time, hyperlocal APIs for air quality, weather, and pollen. Get precise environmental insights to power smarter decisions in your apps and workflows.
- [Ambient weather](https://composio.dev/toolkits/ambient_weather) - Ambient Weather is a platform for personal weather stations with a robust API for accessing local, real-time, and historical weather data. Get detailed environmental insights directly from your own sensors for smarter apps and automations.
- [Anonyflow](https://composio.dev/toolkits/anonyflow) - Anonyflow is a service for encryption-based data anonymization and secure data sharing. It helps organizations meet GDPR, CCPA, and HIPAA data privacy compliance requirements.
- [Api ninjas](https://composio.dev/toolkits/api_ninjas) - Api ninjas offers 120+ public APIs spanning categories like weather, finance, sports, and more. Developers use it to supercharge apps with real-time data and actionable endpoints.
- [Api sports](https://composio.dev/toolkits/api_sports) - Api sports is a comprehensive sports data platform covering 2,000+ competitions with live scores and 15+ years of stats. Instantly access up-to-date sports information for analysis, apps, or chatbots.
- [Apify](https://composio.dev/toolkits/apify) - Apify is a cloud platform for building, deploying, and managing web scraping and automation tools called Actors. It lets you automate data extraction and workflow tasks at scale—no infrastructure headaches.
- [Autom](https://composio.dev/toolkits/autom) - Autom is a lightning-fast search engine results data platform for Google, Bing, and Brave. Developers use it to access fresh, low-latency SERP data on demand.
- [Beaconchain](https://composio.dev/toolkits/beaconchain) - Beaconchain is a real-time analytics platform for Ethereum 2.0's Beacon Chain. It provides detailed insights into validators, blocks, and overall network performance.
- [Big data cloud](https://composio.dev/toolkits/big_data_cloud) - BigDataCloud provides APIs for geolocation, reverse geocoding, and address validation. Instantly access reliable location intelligence to enhance your applications and workflows.
- [Bigpicture io](https://composio.dev/toolkits/bigpicture_io) - BigPicture.io offers APIs for accessing detailed company and profile data. Instantly enrich your applications with up-to-date insights on 20M+ businesses.
- [Bitquery](https://composio.dev/toolkits/bitquery) - Bitquery is a blockchain data platform offering indexed, real-time, and historical data from 40+ blockchains via GraphQL APIs. Get unified, reliable access to complex on-chain data for analytics, trading, and research.
- [Brightdata](https://composio.dev/toolkits/brightdata) - Brightdata is a leading web data platform offering advanced scraping, SERP APIs, and anti-bot tools. It lets you collect public web data at scale, bypassing blocks and friction.
- [Builtwith](https://composio.dev/toolkits/builtwith) - BuiltWith is a web technology profiler that uncovers the technologies powering any website. Gain actionable insights into analytics, hosting, and content management stacks for smarter research and lead generation.
- [Byteforms](https://composio.dev/toolkits/byteforms) - Byteforms is an all-in-one platform for creating forms, managing submissions, and integrating data. It streamlines workflows by centralizing form data collection and automation.

## Frequently Asked Questions

### Do I need my own developer credentials to use Neo4J with Composio?

Yes, Neo4J requires you to configure your own OAuth credentials. Once set up, Composio handles token storage, refresh, and lifecycle management for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
