Skip to main content
Glama
inbarajaldrin

NetworkX Graph MCP Server

README.md
## NetworkX Graph MCP Server

State/decision graph MCP server using NetworkX. Supports directed graphs (cycles allowed), explicit edge ordering, conditional branches, import/export, and visualization.

### Setup
```bash
cd ~/Documents/networkx-graph-mcp-server
uv venv
source .venv/bin/activate
uv sync
```

### MCP client config (example)

Add to your `mcp_config.json`:

```json
{
  "mcpServers": {
    "networkx-graph": {
      "disabled": false,
      "timeout": 60,
      "type": "stdio",
      "command": "~/Documents/networkx-graph-mcp-server/.venv/bin/python",
      "args": ["-m", "networkx_graph"]
    }
  }
}
```

### Tools (summary)
- Graph: create_state_graph, delete_state_graph, list_state_graphs, get_state_graph_info
- Nodes: add_node, update_node, remove_node, get_node, list_nodes
- Edges: add_edge, remove_edge, get_edges, set_edge_order, set_edge_condition, get_node_edges
- Bulk: bulk_add_nodes, bulk_add_edges
- Export/Visualize: export_graph (yaml/json), import_graph, visualize_graph (PNG)
- Analysis: validate_graph (warnings only, cycles allowed), get_graph_stats, find_path

### Web Visualization

Interactive web browser for visualizing graphs:

```bash
uv run app.py
```

Then open your browser to: http://localhost:5000

**Features:**
- Load YAML/JSON graph files via file upload
- Interactive graph visualization with zoom, pan, and node selection
- View node details, statistics, and graph structure
- Color-coded nodes by type (action, decision, verification, loop, success, failure)

TDQS

C2.8/5.0

Scored across 24 tools

Disambiguation4/5

Most tools have distinct purposes, such as add_edge vs. add_node or get_edges vs. get_node_edges, but some overlap exists, like get_graph_stats and get_state_graph_info both providing statistical insights, which could cause mild confusion. The descriptions generally clarify differences, but the overlap in statistical tools is noticeable.

Naming Consistency5/5

Tool names follow a consistent verb_noun pattern throughout, such as add_edge, remove_node, and validate_graph, with no deviations in style or convention. This predictability makes it easy for agents to understand and use the tool set without naming confusion.

Tool Count3/5

With 24 tools, the count is borderline high for a graph management server, as it includes many specific operations like set_edge_condition and visualize_graph that might be consolidated. While comprehensive, it feels slightly heavy compared to typical well-scoped sets of 3-15 tools, potentially overwhelming for agents.

Completeness5/5

The tool set provides complete CRUD/lifecycle coverage for graph management, including creation (create_state_graph), reading (get_node, list_nodes), updating (update_node, set_edge_order), deletion (delete_state_graph, remove_node), and additional utilities like import/export, validation, and visualization. No obvious gaps exist for the domain.

Maintenance

ActivityInactive
ResponsivenessNo issues