
Neo4j GDS Agent
io.github.neo4j-contrib由 GitHub 账号 neo4j-contrib 发布v1.1.0更新于 Nov 2, 2026
Neo4j Graph Data Science MCP server
概览
提供 Neo4j 图数据科学(GDS)算法的 MCP 服务器,让助手在你的 Neo4j 图上做图数据科学分析。
- 可以做什么
- 在投影图上运行 GDS 算法:中心性、社区发现、路径查找、相似度与节点嵌入
- 构建并管理基于图特征的机器学习流水线
- 通过 Cypher 将图投影到 GDS 或 Aura Graph Analytics 会话
- 会话模式下可列出、创建和删除 Aura Graph Analytics 会话,并按图名路由算法
- 可搭配独立的只读 Cypher 服务器查看属性并核对结果
- 适用场景
- 当你希望助手在现有 Neo4j 图上充当图数据科学家时使用:计算中心性或社区、查找路径、生成嵌入,或运行 GDS 机器学习流水线;适用于装有 GDS 插件的自管 Neo4j 或 AuraDB。
- 运行要求
- 通过 PyPI 上的 uvx 在本地运行(需安装 uv),使用 stdio 或流式 HTTP 传输。需要 NEO4J_URI、NEO4J_USERNAME 和 NEO4J_PASSWORD,可选 NEO4J_DATABASE。Aura Graph Analytics 会话模式还需 AURA_API_CLIENT_ID 与 AURA_API_CLIENT_SECRET,若客户端可访问多个项目还需 AURA_API_PROJECT_ID。需要能访问数据库的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Neo4j GDS Agent,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
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.
Install
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):
By default the server uses STDIO transport for local MCP clients. For HTTP-native clients, run the server with streamable HTTP:
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:
Example dataset
To load a London underground example dataset:
- Fork and clone the repository
- 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
- Populate .env file with necessary credentials:
- Load the London Underground dataset with the following command (uv resolves the script's dependencies automatically):
Connect to your DB and querying the graph from Neo4j workspace, you should see: London Underground Graph
Start the server for dev
- When inside the
/mcp_serverdirectory, runuv sync --devand runuv run gds-agentto start the MCP server standalone, or runclaudeto start claude-cli with the agent. - 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:
to setup the python environment. And then,
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.
来源:README.md,提交 6dc2b49
工具
0版本历史
2- v1.1.0最新Oct 12, 2026
- v1.0.1Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分