Labsco
MattArtzAnthro logo

Gephi MCP

โ˜… 21

from MattArtzAnthro

Control Gephi Desktop from your Al assistant with 80 tools for building, analyzing, laying out, and styling network graphs, plus an interactive in-chat graph viewer.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

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.

Full feature list
  • 86 tools covering the whole workflow: build, analyze, style, lay out, filter, and export
  • 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, /import-and-explore, /beautify, /teach
  • 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 components connect your AI assistant to Gephi Desktop:

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-mcp-plugin/Java module that adds an HTTP API to Gephi Desktop
MCP Servermcp-server/Python server that exposes 86 Gephi tools via MCP
Claude Pluginclaude-plugin/Skills, commands, agent, and hooks for Claude Code

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, validates the request Host header (DNS-rebinding defense), and sends no CORS headers โ€” it is reachable only by local processes such as the MCP server, never by a web page. It is not authenticated, so do not expose port 8080 beyond localhost.

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.

What the Claude Code plugin adds

The plugin (claude-plugin/) goes beyond raw MCP tools:

ComponentWhat it does
Slash commands/analyze-network, /community-detection, /centrality, /visualize, /import-and-explore, /beautify, /teach
Network analyst agentSpecialized subagent for deep structural analysis, metric comparison, and network classification
Gephi skillTeaches Claude network science workflows, visualization best practices, and known Gephi gotchas
Health-check hookAutomatically verifies Gephi is running before graph-modifying operations
Reference guidesTool reference, layout guide, and statistics interpretation guide

Tools (84)

CategoryCountExamples
Project & Workspace10gephi_create_project, gephi_save_project, gephi_duplicate_workspace, gephi_rename_workspace
Graph Construction18gephi_add_nodes, gephi_add_edges, gephi_query_nodes, gephi_get_node
Statistics12gephi_compute_modularity, gephi_run_statistic (any installed metric, by name)
Layout7gephi_run_layout, gephi_get_layout_properties
Appearance10gephi_color_by_partition, gephi_size_by_ranking, gephi_label_clusters
Filtering6gephi_filter_by_degree, gephi_extract_giant_component
Attributes5gephi_get_columns, gephi_set_node_attributes
Preview & Export9gephi_export_png, gephi_export_gexf, gephi_view_graph
Import4gephi_import_file, gephi_import_gexf
Health & Diagnostics2gephi_health_check, gephi_visual_qa
View / Camera1gephi_focus_view

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 in claude-plugin/skills/gephi/:

  • SKILL.md โ€” Workflow patterns, best practices, and critical gotchas
  • references/tool-reference.md โ€” Complete API reference for all 86 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 SDK (FastMCP), 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:

cd gephi-mcp-plugin
mvn clean package    # output: target/gephi-mcp-<version>.nbm

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

Author

Matt Artz โ€” mattartz.me | ORCID