gephi-ai 标志

gephi-ai

社区
MattArtzAnthro

Extends Gephi with AI capabilities. Includes a Gephi plugin for graph analytics, an MCP server bridging AI assistants and Gephi, an agentic AI plugin with slash commands and workflow skills, and a specialized agent for network analysis research. Built for researchers working across network science and AI.

发布者MattArtzAnthro
代码仓库gephi-ai
语言Python
复刻数
5
星标数
22
可用工具
0
传输类型stdio
分类
许可协议Apache-2.0
链接
  • 将工具接入 AI 工作流

    gephi-ai 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 22 个星标和 5 个复刻。

Gephi AI

AI-powered network analysis through Gephi and the Model Context Protocol (MCP). Build, analyze, style, and export publication-ready network visualizations by talking to your AI assistant.

Built for researchers working across network science and AI.

Status: public beta. APIs may change between minor versions.

What you get

Your AI assistant drives Gephi. Say what you want in plain language and the assistant builds, analyzes, styles, and exports publication-ready network maps.

It's a conversation, not a command line. The assistant explains what it's doing, checks its own maps before showing them, and teaches you to read what you're seeing. You can point back: select nodes in the Gephi window and ask "what did I select?"

Any data, any MCP client. Network files import directly; spreadsheets and other data become networks conversationally. Works with Claude Code, Claude Desktop, or any MCP-compatible assistant.

  • 113 tools covering the whole workflow: build, analyze, style, lay out, filter, and export
  • One-level undo: destructive operations snapshot the workspace automatically, so gephi_undo brings the graph back
  • Layout quality is measured, not eyeballed: the graph profile flags heavy-tailed weights and hub-and-spoke wiring before a layout runs, visual QA scores how well communities separated and frames exports around the main cloud (ignoring runaway outlier nodes), and numerically exploded layouts are caught automatically instead of exported
  • Interactive network view inside the chat (pan, zoom, hover, click a node to ask about it)
  • Slash commands for common jobs: /analyze-network, /community-detection, /centrality, /visualize, /export-map, /import-and-explore, /explore, /verify-claim, /text-network, /teach, /counterfactual
  • Specialized agents that run multi-step work in their own context and hand back just the result: independent claim verification, layout iteration, structural analysis, and text-network construction
  • Two extra layouts beyond Gephi's own: by role played in the network, and by community (best for reply and retweet networks)
  • Reads your selection in the Gephi window, so "what did I select?" just works
  • Drives any layout or metric plugin installed from the Gephi plugin portal
  • Imports GEXF, GraphML, GML, CSV, DOT, and Pajek; turns spreadsheets and other files into networks conversationally

Architecture

Three runtime components connect your AI assistant to Gephi Desktop, with host-specific plugin packages adding guided workflows:

Claude / AI Assistant
        │
   MCP Protocol (stdio)
        │
   MCP Server (Python)          ← Translates MCP tool calls to HTTP
        │
   HTTP API (localhost:8080)
        │
   Gephi Plugin (Java)          ← Runs inside Gephi Desktop
        │
   Gephi Desktop                ← Must be running first
ComponentDirectoryWhat it does
Gephi Plugingephi-ai-plugin/Java module that adds an HTTP API to Gephi Desktop
MCP Servermcp-server/Python server that exposes 113 Gephi tools via MCP
Claude Pluginplugins/claude-code/Skills, commands, agents, and hooks for Claude Code
Codex Pluginplugins/gephi-network-analysis/Skills and bundled MCP registration for Codex

Install the Gephi plugin plus your AI client's connection — the Claude Code plugin bundles the MCP server, so most users install just two things. Gephi Desktop must be running before using any tools.

Security note: the plugin's HTTP API binds to 127.0.0.1 only. It refuses any request whose Host header is not a loopback address, which blocks DNS rebinding, and any request carrying Origin or Sec-Fetch-Site, which blocks a page you are merely visiting from driving Gephi with a cross-origin fetch. Browsers set those headers on every request and page JavaScript cannot forge them; local clients send neither, which is why a browser gets 403 and the MCP server does not. Beyond that it is not authenticated, so any process running as you can use it. Do not expose port 8080.

macOS note: older plugin versions could wedge Gephi during sustained writes against a large rendered graph (calls hang; only gephi_health_check answers). Plugin 1.2.0 fixes the two causes on our side: writes now pause the renderer via Gephi's own viz-engine API, and a read-lock leak in the query endpoints (the main culprit) is closed. All lock waits are bounded, so a genuinely wedged Gephi returns an immediate "fully quit and reopen Gephi" error instead of hanging, and gephi_health_check exposes lock probes (graph_lock, graph_lock_stats) that detect the condition. If you ever see persistent "Graph is busy" errors, restart Gephi — and make sure you are on plugin 1.2.2 or newer.

Setup

Prerequisites

Step 1: Install the Gephi plugin

This adds the HTTP API server inside Gephi Desktop. No build tools needed — download the pre-built plugin:

  1. Download gephi-ai-1.3.0.nbm from the Releases page.
  2. In Gephi: Tools → Plugins → Downloaded → Add Plugins — select the .nbm file, then click Install.
  3. Restart Gephi. The plugin starts automatically and listens on http://127.0.0.1:8080.

Verify: in a terminal, run curl http://127.0.0.1:8080/health. You should see "service": "Gephi AI API" and "status": "running". You can also open Tools > Gephi AI Server in Gephi, which shows the same state and lets you stop, start, or change the port.

Opening that URL in a browser deliberately returns 403 Forbidden. The API refuses browsers so that a page you happen to be visiting cannot drive Gephi; see the security note above.

Step 2: Connect your AI assistant

Renamed on PyPI. The server is published as gephi-ai. It was previously gephi-mcp, which stays installable at 1.18.0 so existing setups keep working but receives no further releases. If your config says uvx gephi-mcp, change the package to gephi-ai to keep getting updates. The server name itself is unchanged, so tool names and permissions stay as they are.

Claude Desktop (fastest start)

Download gephi-ai-<version>.mcpb from the Releases page and double-click it — Claude Desktop installs the server with all dependencies bundled. No terminal, no config file. (Requires Python 3.10+ on your system, which modern macOS provides.)

Use ONE connection method per app. If you previously added gephi-mcp to claude_desktop_config.json by hand, remove that entry before installing the bundle — otherwise Claude Desktop runs two copies of the server and every tool appears twice.

Add to your MCP configuration (claude_desktop_config.json):

json
{
  "mcpServers": {
    "gephi-mcp": {
      "command": "uvx",
      "args": ["gephi-ai"]
    }
  }
}

Claude Code (most capable)

bash
claude plugin marketplace add MattArtzAnthro/gephi-ai
claude plugin install gephi-network-analysis@gephi-ai

(Or run the same two commands as /plugin marketplace add … and /plugin install … inside a Claude Code session.)

The plugin bundles and runs the MCP server itself (via uv), and adds the slash commands, the network analyst agent, and the skills that teach Claude network science best practices. If you use Claude Code, this is the recommended setup.

bash
claude mcp add gephi-mcp -- uvx gephi-ai

OpenAI Codex (plugin package)

The Codex package bundles the MCP registration, the complete Gephi reference skill, and focused workflow skills corresponding to every Claude slash command and custom agent:

bash
codex plugin marketplace add MattArtzAnthro/gephi-ai --ref main
codex plugin add gephi-network-analysis@gephi-ai

Start a new Codex task after installation so the plugin and its skills are discovered together. The source package is in plugins/gephi-network-analysis/ and the repo marketplace is .agents/plugins/marketplace.json.

bash
codex mcp add gephi-mcp -- uvx gephi-ai

Gemini CLI and other MCP clients

The server is model-agnostic: a stdio MCP server with one launcher that works everywhere. Register it once:

bash
gemini mcp add -s user gephi-mcp uvx gephi-ai

(Claude Code without the plugin: claude mcp add gephi-mcp -- uvx gephi-ai.)

These agents get all 113 tools. To give them the network-analysis guidance as well, copy the skill folder into your agent's skills directory:

bash
git clone https://github.com/MattArtzAnthro/gephi-ai.git
cp -r gephi-ai/plugins/claude-code/skills/gephi ~/.codex/skills/
AgentSkills directory
Claude Codeinstall the plugin (skill, commands, and agents together)
OpenAI Codexinstall the Codex plugin above; ~/.codex/skills/ also accepts the portable base skill
Cursor~/.cursor/skills/
GitHub Copilot / VS Code~/.copilot/skills/
Shared project-level.agents/skills/ in your repository

The Codex plugin translates the slash-command and custom-agent procedures into ordinary triggerable skills. Other agents get the portable base skill and the tools. The repository also carries AGENTS.md and GEMINI.md, which those agents read on their own.

Any other MCP client: point it at uvx gephi-ai using stdio transport. uvx fetches the gephi-ai package from PyPI on first run and caches it. For a persistent named command, pipx install gephi-ai also works.

Avoid installing with pip inside a project virtual environment. Inside an activated .venv the gephi-ai command only exists on that venv's PATH, and MCP clients launch servers outside your shell — the server fails with "Executable not found in $PATH" even though which gephi-ai succeeds. Use uvx/pipx, or point your MCP config at the venv executable's absolute path.

Step 3: Verify

First confirm the MCP server actually connected. In Claude Code, run /mcp — gephi-mcp should be listed as connected. (In Claude Desktop, check that the tools appear in the tools menu.) If it shows a failure like "Executable not found in $PATH", the launcher (uv/uvx or gephi-ai) isn't on the global PATH — see the notes in Step 2.

Then, with Gephi running, ask your assistant:

"Check if Gephi is running"

It should call gephi_health_check and confirm the connection. In Claude Code, try:

/gephi-network-analysis:import-and-explore path/to/your/graph.gexf

Updating

gephi-ai improves often, so keep it current. Most fixes and new tools arrive through updates. The health check tells you once per session when your install is behind the latest release and shows the matching update step, but that notice only appears on recent versions, so if you installed a while ago (or an older command like /teach is missing), run the update below once to catch up. Updating is safe to do anytime.

  • Claude Code: claude plugin update gephi-network-analysis@gephi-ai, then start a new session.
  • If /mcp shows Failed to reconnect to plugin:gephi-network-analysis:gephi-mcp: -32000 on server 1.11.0 or older, that is the MCP SDK 2.0 break (issue #5); updating to 1.12.0 or newer is the fix, no pin needed.
  • Claude Desktop (one-click bundle): download the newest .mcpb from Releases and double-click it again.
  • Claude Desktop (config file): nothing to do — the uvx entry fetches the latest release each time you fully quit and reopen Claude Desktop.
  • Switching connection methods: remove the old one first (bundle: uninstall in Settings > Extensions; config file: delete the gephi-mcp block). Two methods at once means two servers and duplicated tools.
  • Cowork: Cowork keeps its own copy of plugins, separate from Claude Code — updating one does not update the other. If Cowork's commands look older than this README (for example, no /teach), ask Cowork itself to update the gephi-network-analysis plugin, then fully quit and reopen the app.
  • Gephi plugin: install the newest .nbm from Releases via Tools > Plugins > Downloaded and restart Gephi.
    • Upgrading from 1.2.x, one time only: the plugin was renamed to Gephi AI and its module identifier changed, so 1.3.0 installs alongside the old plugin instead of replacing it, and both will try to bind port 8080. In Gephi, open Tools > Plugins > Installed, uninstall Gephi AI (MCP), restart, then install the new .nbm. Later updates replace normally.

gephi_health_check reports both the Gephi plugin version and the MCP server version, and says whether they are up to date, so you can see at a glance what you are running.

What the assistant plugins add

Both host packages go beyond raw MCP tools. Claude uses slash commands, custom agents, and a health hook; Codex expresses the same procedures as focused skills and makes the health check the mandatory first workflow step.

ComponentWhat it does
Guided workflowsAnalysis, communities, centrality, visualization, export, import/explore, claim verification, text networks, teaching, and counterfactuals
Specialized proceduresStructural interpretation, independent claim verification, iterative layout QA, and tuned text-network construction
Gephi skillTeaches network-science workflows, visualization best practices, and known Gephi gotchas
Health gateVerifies Gephi is running before operational work begins
Reference guidesTool reference, layout guide, and statistics interpretation guide

Tools (113)

CategoryCountExamples
Project & Workspace12gephi_create_project, gephi_save_project, gephi_duplicate_workspace, gephi_snapshot, gephi_undo
Graph Construction18gephi_add_nodes, gephi_add_edges, gephi_query_nodes, gephi_get_node, gephi_text_to_network, gephi_bipartite_projection (two-mode to one-mode)
Statistics & Analysis18gephi_compute_modularity, gephi_run_statistic (any installed metric), gephi_whatif (counterfactual), gephi_compare_nodes, gephi_community_stability (are the communities real?), gephi_compare_workspaces (what changed between two versions)
Layout9gephi_run_layout, gephi_get_layout_properties, gephi_community_layout, gephi_similarity_layout, gephi_bipartite_layout
Appearance11gephi_color_by_partition, gephi_color_edges_by_partition, gephi_size_by_ranking, gephi_label_clusters
Filtering10gephi_filter_by_degree, gephi_extract_backbone, gephi_list_filters, gephi_apply_filter (any filter, by name)
Attributes5gephi_get_columns, gephi_set_node_attributes
Preview & Export14gephi_export_png, gephi_export_screenshot (live selection-aware canvas capture), gephi_export_gexf, gephi_export (VNA/Pajek/DL/…), gephi_view_graph, gephi_export_legend, gephi_export_figure (map and key as one PDF), gephi_session_receipt (how the figure was made)
Data Laboratory4gephi_column_value_frequencies, gephi_detect_duplicates, gephi_merge_nodes, gephi_create_regex_column
Timeline1gephi_get_timeline (dynamic-graph state, read-only)
Import4gephi_import_file, gephi_import_gexf
Health & Diagnostics3gephi_health_check, gephi_visual_qa, gephi_profile_graph
View / Camera / Perspective4gephi_focus_view, gephi_set_selection_mode, gephi_get_perspective, gephi_switch_perspective

Example workflows

Community detection

1. gephi_create_project
2. gephi_import_file                  (your GEXF, GraphML, or CSV)
3. gephi_compute_degree
4. gephi_compute_modularity           (resolution: 1.0)
5. gephi_color_by_partition           (column: modularity_class)
6. gephi_size_by_ranking              (column: degree)
7. gephi_run_layout                   (ForceAtlas 2, 1000 iterations)
8. gephi_export_png                   (3840x2160 for publication)

Centrality analysis

1. Import or build graph
2. gephi_compute_betweenness
3. gephi_compute_pagerank
4. gephi_run_layout                   (ForceAtlas 2)
5. gephi_color_by_ranking             (column: betweenesscentrality)
6. gephi_size_by_ranking              (column: pageranks)
7. gephi_query_nodes                  (find top-ranked nodes)

Documentation

Reference guides are shared in plugins/claude-code/skills/gephi/ and mirrored in plugins/gephi-network-analysis/skills/gephi/ for the installable Codex package:

  • SKILL.md — Workflow patterns, best practices, and critical gotchas
  • references/tool-reference.md — Complete API reference for all 113 tools
  • references/layout-guide.md — Layout algorithm selection and parameter tuning
  • references/statistics-guide.md — Statistics interpretation guide

Tech stack

  • Gephi Plugin: Java 11, NetBeans Platform, NanoHTTPD, Gson
  • MCP Server: Python 3.10+, MCP Python SDK 2.x (MCPServer, 2026-07-28 protocol with the 2025-era handshake still served), httpx, Pydantic, defusedxml; vendored sigma.js + graphology for the in-chat viewer
  • Target: Gephi 0.11.1, NetBeans RELEASE290

Development

Building the Gephi plugin from source requires JDK 11+ and Maven:

bash
cd gephi-ai-plugin
mvn clean package    # output: target/gephi-ai-<version>.nbm, auto-deployed to Gephi's modules dir

Fully quit and reopen Gephi after every rebuild, even mid-session. Gephi lazily loads plugin classes on first use; overwriting the jar file on disk while Gephi is still running an earlier build corrupts the classloader's view of any class not yet loaded, and the resulting crash (a raw dropped connection, no error message) can be hard to trace back to the real cause.

The MCP server is a standard Python package under mcp-server/ (pytest for tests, ruff for linting).

Attribution

If you use or adapt this project in your work, please credit:

Built with gephi-ai (Matt Artz, 2025–2026) — https://github.com/MattArtzAnthro/gephi-ai

Citation

If you use this toolkit in your academic research, please cite:

Artz, Matt. 2025. Gephi AI. Software. Zenodo. https://doi.org/10.5281/zenodo.18673386

License

Apache License 2.0 — see LICENSE.

Author

Matt Artz — mattartz.me | ORCID

安装

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "mattartzanthro-gephi-ai": {
      "command": "",
      "args": []
    }
  }
}

将 gephi-ai MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 gephi-ai 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 gephi-ai 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 gephi-ai MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "mattartzanthro-gephi-ai": {
      "command": "npx",
      "args": [
        "-y",
        "gephi-ai"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 gephi-ai MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 gephi-ai MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 gephi-ai 帮我完成这项任务吗?
gephi-ai
当然,我看过了。
以下是我使用 gephi-ai 得到的结果。

常见问题

gephi-ai MCP 服务器有什么用途?

gephi-ai 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 gephi-ai MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 gephi-ai。

为什么在 TypingMind 中使用 gephi-ai MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 gephi-ai 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 gephi-ai MCP 连接到 TypingMind?

gephi-ai 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

gephi-ai MCP 在 TypingMind 中提供哪些工具?

gephi-ai 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 gephi-ai MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 gephi-ai 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇