Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Graph-ToolsExtract relationships from this data and create an interactive visualization."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Graph Tools - Interactive Graph Analysis Toolkit
A comprehensive Ruby-based graph analysis toolkit with web visualizations and MCP server for AI-powered graph analysis.
š Features
Core Graph Operations
Adjacency Matrix Support - Load from CSV, JSON, or TXT files
Graph Algorithms - DFS, BFS, neighbor finding with visual feedback
Multiple Export Formats - CSV matrices, JSON, interactive HTML
Command Line Interface - Full-featured CLI for batch operations
Interactive Visualizations
Enhanced Graph Visualizer - D3.js force-directed layouts with real-time interactions
Algorithm Visualization - Visual highlighting for DFS/BFS traversals
Interactive Editing - Add/remove nodes and edges with drag-and-drop
Matrix Export - Custom filename support for adjacency matrix downloads
Graph Statistics - Real-time node count, edge count, and density calculations
AI Integration
MCP Server - HTTP REST API and Claude Desktop MCP server
Automatic Visualization - Generate interactive graphs from structured data
Smart Data Processing - Extract relationships from various data formats
Centrality Analysis - Calculate degree, betweenness, closeness, eigenvector centrality
š¦ Installation
Prerequisites
Ruby 2.7+ - Core graph operations
Node.js 16+ - MCP server functionality
Modern web browser - For interactive visualizations
Setup
š§ Usage
Command Line Interface
Interactive Visualizer
Local Usage:
Open
Files/enhanced-graph-visualizer.htmlin your browserLoad sample data or create your own graph
Run DFS/BFS operations with visual highlighting
Export matrices with custom filenames
Web Application:
Run
npm startand visithttp://localhost:3000Upload matrix files via drag-and-drop
Try sample data for quick testing
Get real-time analysis results
MCP Server Integration
HTTP REST API Mode
Claude Desktop Mode
Configure Claude Desktop (
~/Library/Application Support/Claude/claude_desktop_config.json):
Use natural language in Claude Desktop:
š Project Structure
API Endpoints
The MCP server provides both MCP protocol and HTTP REST API:
POST /api/analyze-relationships- Extract relationships from dataPOST /api/create-adjacency-matrix- Build matrices from relationship pairsPOST /api/calculate-centrality- Compute network centrality measuresPOST /api/analyze-network-structure- Comprehensive network analysisGET /health- Health check endpoint
See /mcp-documentation.html for complete API documentation with examples.
Quick Start
1. Create a Graph Visually
In the enhanced visualizer:
Add vertices by typing names and clicking "Add Node"
Click two nodes to select them, then click "Add Edge"
Drag nodes to reposition them
Run DFS/BFS operations and see visual highlights
Export as CSV matrix when done
2. Analyze Your Graph
3. Export for Visualization
Command Reference
CLI Options
Supported File Formats
CSV:
0,1,0\n1,0,1\n0,1,0TXT:
0 1 0\n1 0 1\n0 1 0(space-separated)JSON:
{"matrix": [[0,1,0],[1,0,1],[0,1,0]]}
MCP Server Tools
The MCP server provides these tools for AI assistants:
analyze_relationships- Extract relationships from structured data and create visualizationscreate_adjacency_matrix- Build matrices from relationship pairscalculate_centrality- Compute network centrality measures (degree, betweenness, closeness, eigenvector)analyze_network_structure- Comprehensive network analysis combining relationship extraction and centrality
Performance
Graph creation: Sub-second for graphs up to 100 nodes
DFS/BFS: Linear time complexity O(V + E)
Visualization: Handles 50+ nodes smoothly in D3.js
File formats: All formats (CSV, JSON, TXT) supported efficiently
HTTP API: Fast response times for network analysis
Error Handling
The tools provide comprehensive error handling for:
Invalid matrix formats
Non-existent vertices in operations
Malformed input files
Missing dependencies
API validation errors
Contributing
The codebase follows clean architecture principles with separation of concerns:
Core graph operations in Ruby
Web interface with modern JavaScript
MCP server for AI integration
Comprehensive API documentation