Neo4j GDS Agent

io.github.neo4j-contrib由 GitHub 帳號 neo4j-contrib 發布v1.1.0更新於 Nov 2, 2026

Neo4j Graph Data Science MCP server

已驗證STDIO僅桌面資料庫資料與分析

概覽

AI 產生的概覽

提供 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。需要能連線資料庫的網路。
安裝前請注意
需要資料庫憑證(NEO4J_PASSWORD),Aura 工作階段模式另需 Aura API 用戶端密鑰(AURA_API_CLIENT_SECRET),請妥善保管。工作階段模式會建立與刪除 Aura Graph Analytics 工作階段,且 Aura 工作階段與資料庫分開計費。圖投影會寫入資料庫或工作階段。伺服器不執行任意 Cypher,如需檢視資料請搭配唯讀 Cypher 伺服器。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Neo4j GDS Agent,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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.

[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 / 12 h)
SESSION_TIMEOUT_SECONDSnoseconds to wait for a session to become Ready
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:

bash
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:

json
"neo4j-cypher": {  "command": "uvx",  "args": ["[email protected]", "--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:
bash
 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):
bash
 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:

bash
uv sync --dev

to setup the python environment. And then,

bash
uv run pytest tests -v -suv run ruff checkuv 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.

來源:README.md,提交 6dc2b49

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v1.1.0最新Oct 12, 2026
  2. v1.0.1Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分