PluginBench
MCP Server
Active
MIT

Neo4j GDS Agent MCP Server

io.github.neo4j-contrib/gds-agent

Run Neo4j Graph Data Science algorithms through Claude, Cursor, and other LLMs via MCP.

What is the Neo4j GDS Agent MCP server?

The Neo4j GDS Agent MCP server exposes Neo4j Graph Data Science (GDS) algorithms to LLMs, enabling them to perform graph analysis tasks like centrality, community detection, path finding, similarity, embeddings, and ML pipelines. It works with Claude, Cursor, OpenAI Codex, VS Code/Copilot, and Gemini CLI, connecting to self-managed Neo4j or AuraDB Graph Analytics sessions.

The GDS Agent lets LLMs reason about and perform data science work on graph data in Neo4j. It provides MCP tools for GDS algorithms and an agent skill that teaches best practices for graph data science workflows. You can ask any graph question about your Neo4j database and collaborate with the agent to solve complex analytical tasks.

How to install Neo4j GDS Agent

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • NEO4J_URI
    required

    Neo4j connection URI (neo4j:// or neo4j+s://)

  • NEO4J_USERNAME
    required

    Neo4j username

  • NEO4J_PASSWORD
    required
    secret

    Neo4j password

  • NEO4J_DATABASE

    Neo4j database name

  • AURA_API_CLIENT_ID

    Aura API client ID (enables Aura Graph Analytics session mode)

  • AURA_API_CLIENT_SECRET
    secret

    Aura API client secret

  • AURA_API_PROJECT_ID

    Aura project ID (only if the API client can access multiple projects)

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "gds-agent": {
      "command": "uvx",
      "args": [
        "gds-agent"
      ],
      "env": {
        "NEO4J_URI": "<YOUR_NEO4J_URI>",
        "NEO4J_USERNAME": "<YOUR_NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<YOUR_NEO4J_PASSWORD>",
        "NEO4J_DATABASE": "<YOUR_NEO4J_DATABASE>",
        "AURA_API_CLIENT_ID": "<YOUR_AURA_API_CLIENT_ID>",
        "AURA_API_CLIENT_SECRET": "<YOUR_AURA_API_CLIENT_SECRET>",
        "AURA_API_PROJECT_ID": "<YOUR_AURA_API_PROJECT_ID>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • Centrality algorithms — Compute node importance metrics in graphs
  • Community detection — Identify clusters and communities in graph data
  • Path finding — Find optimal paths and routes in graphs
  • Similarity algorithms — Measure similarity between nodes
  • Node embeddings — Generate vector representations of nodes
  • ML pipelines — Build and execute machine learning workflows on graphs
  • Graph projection — Project Neo4j data into GDS graph space for analysis
  • Session management (Aura mode) — Create, list, and delete GDS Aura Graph Analytics sessions

Use cases

  • Analyze network centrality to identify key nodes in social networks or infrastructure graphs
  • Detect communities and clusters in large graphs to understand structural patterns
  • Find shortest paths and optimal routes for logistics or navigation problems
  • Generate node embeddings for downstream machine learning tasks
  • Build end-to-end ML pipelines on graph data without leaving your LLM interface
  • Compare similarity between entities in your graph to find related items or duplicates

Neo4j GDS Agent MCP server FAQ

What is the Neo4j GDS Agent?

It's an MCP server that exposes Neo4j Graph Data Science algorithms to LLMs like Claude and Cursor, allowing them to perform graph analysis, community detection, embeddings, and ML workflows on your Neo4j database.

Is it free?

The GDS Agent itself is open-source and free. However, you need a Neo4j database with the GDS plugin (self-managed) or a GDS Aura Graph Analytics session (AuraDB), which may incur costs depending on your Neo4j deployment.

How do I install it in Cursor or Claude?

For Cursor: use the one-click badge or add it via `npx skills add neo4j-contrib/gds-agent -a cursor`. For Claude Desktop: download the `.mcpb` file from releases and double-click it, then upload the skill zip in Settings → Skills. For Claude Code: use `/plugin marketplace add neo4j-contrib/gds-agent`.

What authentication is required?

You need Neo4j database credentials (URI, username, password). For AuraDB Graph Analytics sessions, you also need Aura API credentials (client ID and secret). All are set as environment variables.

Can I use it with other MCP servers?

Yes. It's designed to work alongside `mcp-neo4j-cypher` in read-only mode, which lets the agent inspect data and verify results. Claude Code and Gemini CLI bundle both automatically.

What transport methods does it support?

By default it uses STDIO for local MCP clients. For HTTP-native clients, run with `--transport http --host 127.0.0.1 --port 8000 --path /mcp`.

README (reference)

Source of truth, from the repository.

GDS Agent

The GDS Agent let LLMs reason and do data science work on your graph data in Neo4j, by using two artifacts:

  • Tools — an MCP server exposing Neo4j Graph Data Science (GDS) algorithms: centrality, community detection, path finding, similarity, node embeddings, and ML pipelines.
  • Skills — an agent skill (neo4j-graph-data-scientist) teaching the agent how and when to use those tools and best practices for doing data science on graphs.

It works with any MCP-capable harness — Claude Code, Claude Desktop, claude.ai, OpenAI Codex, Cursor, VS Code/Copilot, Gemini CLI — and programmatically from agent frameworks. It uses the GDS plugin on self-managed Neo4j and GDS Aura Graph Analytics sessions on AuraDB, over STDIO or HTTP transport.

Once set up, you can ask any graph question about your Neo4j graph and get answers. You can collaborate with the agent as a graph data scientist to solve complex tasks.

gds-agent-arch

Install

HarnessTools (MCP)SkillGuide
Claude Code/plugin marketplace add neo4j-contrib/gds-agent → /plugin install gds-agent@neo4j-gdsbundled with the pluginsetup
Claude Desktopdownload the .mcpb from releases, double-clickupload the skill zip in Settings → Skillssetup
OpenAI Codexcodex mcp add neo4j-gds -- uvx gds-agentnpx skills add neo4j-contrib/gds-agent -a codexsetup
Cursorone-click badgenpx skills add neo4j-contrib/gds-agent -a cursorsetup
VS Code / Copilotone-click badge or .vscode/mcp.jsonnpx skills add neo4j-contrib/gds-agent -a copilotsetup
Gemini CLIgemini extensions install https://github.com/neo4j-contrib/gds-agentbundled with the extensionsetup
Your own agentany MCP client (stdio/HTTP)inject SKILL.md as instructionssetup

Most local setups need uv installed (the server runs via uvx gds-agent from PyPI). Generic MCP clients run uvx gds-agent over stdio with the environment variables below.

Configuration reference

Set as environment variables (or the credential form of your harness's installer):

VariableRequiredPurpose
NEO4J_URIyesneo4j:// or neo4j+s:// connection URI
NEO4J_USERNAME / NEO4J_PASSWORDyesdatabase credentials
NEO4J_DATABASEnodatabase name (defaults to neo4j)
AURA_API_CLIENT_ID / AURA_API_CLIENT_SECRETsession modeAura API credentials for Aura Graph Analytics
AURA_API_PROJECT_IDnoonly if the API client can access multiple projects
SESSION_MEMORY_GB / SESSION_TTL_HOURSnosession defaults (8 GB / 24 h)
GDS_AGENT_MAX_RESULT_ROWS / _CHARS / _CELL_CHARSnotool output limits (500 / 100000 / 200)

By default the server uses STDIO transport for local MCP clients. For HTTP-native clients, run the server with streamable HTTP:

gds-agent --transport http --host 127.0.0.1 --port 8000 --path /mcp

The equivalent environment variables are GDS_AGENT_TRANSPORT, GDS_AGENT_HOST, GDS_AGENT_PORT, and GDS_AGENT_PATH. The Neo4j MCP-style NEO4J_TRANSPORT and NEO4J_MCP_SERVER_* names are also supported.

GDS Aura Graph Analytics (sessions)

The server detects whether the connected Neo4j has the GDS plugin installed or whether to use a GDS Aura Graph Analytics session. Detection runs gds.session.list() on startup; if it succeeds, session mode is used and graph projections fall back to gds.graph.project.remote.

Session mode requires Aura API credentials (see the configuration reference above) in the same .env file or env block as the database credentials. Sessions are managed explicitly by the agent: three extra tools become available in session mode (list_sessions, create_session, and delete_session). A session must first be created with create_session, project_graph_cypher then projects each graph into the session named by its required sessionName parameter, and algorithm calls are routed to the right session automatically by graphName. Most workflows need a single session holding all graphs; multiple sessions allow running analyses in parallel. To resize a session (e.g. after an OOM), delete it and create it again with a larger memoryGB. All sessions created by the server are named with an mcp_ prefix. Aura sessions are charged separate to the DB.

The skill

[skills/neo4j-graph-data-scientist](skills/neo4j-graph-data-scientist/SKILL.md) is consumed from this one location by the Claude Code plugin, the Gemini extension, npx skills, and the release skill zip. It covers GDS-specific workflow best practices with a troubleshooting reference guide, as well as general data science best practices. It is designed for the gds-agent and mcp-neo4j-cypher MCP servers.

Read-only Cypher alongside GDS

The GDS server deliberately executes no arbitrary Cypher — its only Cypher entry point is graph projection. To let the agent also read the underlying data (inspect properties, aggregate, verify algorithm results), pair it with the [mcp-neo4j-cypher](https://github.com/neo4j-contrib/mcp-neo4j) server in read-only mode.

The Claude Code plugin and the Gemini CLI extension already bundle it: one install configures both servers with the same credentials, and NEO4J_READ_ONLY=true removes its write tool. NEO4J_RESPONSE_TOKEN_LIMIT caps read-query responses (tokens) so large results don’t overwhelm the model; omit it for no Cypher-side limit. On any other harness, register a second server alongside gds-agent:

"neo4j-cypher": {
  "command": "uvx",
  "args": ["mcp-neo4j-cypher@0.6.0", "--transport", "stdio"],
  "env": {
    "NEO4J_URI": "neo4j://localhost:7687",
    "NEO4J_USERNAME": "neo4j",
    "NEO4J_PASSWORD": "<your-password>",
    "NEO4J_READ_ONLY": "true",
    "NEO4J_RESPONSE_TOKEN_LIMIT": "20000"
  }
}

Example dataset

To load a London underground example dataset:

  1. Fork and clone the repository
  2. Install the Neo4j database with GDS plugin: Download the Neo4j Desktop from Neo4j Download Center Install the GDS plugin from the Neo4j Desktop Create a new database and start it
  3. Populate .env file with necessary credentials:
 NEO4J_URI=bolt://localhost:7687  # or your database URI
 NEO4J_USERNAME=neo4j  # or your db username
 NEO4J_PASSWORD=your_password
  1. Load the London Underground dataset with the following command (uv resolves the script's dependencies automatically):
 uv run import_data.py --undirected

Connect to your DB and querying the graph from Neo4j workspace, you should see: London Underground Graph

Start the server for dev

  1. When inside the /mcp_server directory, run uv sync --dev and run uv run gds-agent to start the MCP server standalone, or run claude to start claude-cli with the agent.
  2. To try the plugin (MCP server + skill) from your working tree: claude --plugin-dir . from the repository root.

Releases

Version numbers are kept in lockstep across pyproject.toml and all distribution manifests by scripts/bump_version.py. Pushing a v* tag triggers the release workflow.

How to contribute

Open a pull request from a branch of your forked repository into the main branch of this repo, for example mygithubid:add-new-algo -> neo4j-contrib:main.

The CI build in github action requires all codestyle checks and tests to pass.

To run and fix codestyle checks locally, in the /mcp_server directory, run:

uv sync --dev

to setup the python environment. And then,

uv run pytest tests -v -s
uv run ruff check
uv run ruff format

for all tests and codestyle fixes.

Feature request and bug reports

To report a bug or a new feature request, raise an issue. If it is a bug, include the full stacktrace and errors. When available, attach relevant logs in mcp_server_neo4j_gds.log. This file is located inside the /mcp_server/src_mcp_server_neo4j_gds directory if the gds agent is running from source, or inside the logging path for Claude (e.g /Library/Logs/Claude for Claude Desktop on Mac). Include relevant minimal dataset that can be used to reproduce the issue if possible.

Additional resources

The GDS agent can be used with other MCP servers, such as those that provide additional Neo4j toolings: https://github.com/neo4j-contrib/mcp-neo4j Arxiv paper including details about the architecture and benchmark results: https://arxiv.org/abs/2508.20637.

Related MCP servers

Manage Neo4j Aura database instances via natural language through Claude and other MCP clients.

979
Python
MIT
View repository →

Run Cypher queries against Neo4j databases using natural language.

979
Python
MIT
View repository →

Create, validate, and visualize Neo4j graph data models with interactive tools and Arrows.app integration.

979
Python
MIT
View repository →

Store and retrieve personal knowledge graphs in Neo4j across sessions and clients.

979
Python
MIT
View repository →

Neo4j MCP Canary — The canary goes first so the rest of us know what's coming

2
Go
View repository →

Opinionated sprint tracker. Read/update tickets, sprints, velocity from Claude/Cursor/Zed.