# All-Pairs Route Distance Matrix AI Agent Connect

> All-Pairs Route Distance Matrix MCP gives your agent the mathematical tools needed to navigate directed graphs. It handles the heavy lifting of calculating distance matrices, finding the shortest paths between nodes, and identifying disconnected sub-graphs within a network.

## Overview
- **Category:** graph-theory
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_rrmkxVFu7pgWxHKuv5CWxbSJyIhmzsaeYaSotxZQ/ai-agent-connect
- **Tags:** graph, routing, shortest-path, network, matrix

## Description

You can now give your AI client the ability to perform deep graph theory analysis. Instead of trying to reason through complex network structures using text alone, you can use this MCP to run precise mathematical operations on directed graphs. It handles the computation of full distance matrices so your agent can see the entire network landscape at once. If you need to know how to get from point A to point B, the MCP finds the specific node sequences for you. It also helps you spot structural issues, like isolated islands in your data or directional imbalances that make certain routes one-way only. This is built for anyone working with routing, logistics, or network topology who needs an agent that can actually calculate, not only guess.

## Tools

### analyze_matrix_symmetry
This tool checks how directional a network is by comparing reciprocal distances between nodes.

### calculate_distance_matrix
This tool generates a complete distance matrix for each node in your provided graph.

### get_shortest_paths
This tool retrieves the exact sequence of nodes required to complete a requested route.

### validate_network_connectivity
This tool finds disconnected sub-graphs or isolated nodes that cannot reach the rest of the network.

## Prompt Examples

**Prompt:** 
```
Calculate the distance matrix for nodes A, B, and C with edges A->B (5) and B->C (10).
```

**Response:** 
```
The distance matrix is: A to B: 5, B to C: 10, A to C: 15. Node C to A is unreachable.
```

**Prompt:** 
```
What is the shortest path from node A to node C in a graph with edges A->B (5) and B->C (10)?
```

**Response:** 
```
The shortest path from A to C is A -> B -> C with a total distance of 15.
```

**Prompt:** 
```
Check if the network is symmetric with edges A->B (5) and B->A (5).
```

**Response:** 
```
The network is symmetric as the distance from A to B equals the distance from B to A.
```

## Capabilities

### Full Matrix Generation
Your agent uses this to map out each possible distance between all nodes in a graph.

### Path Sequencing
Your agent identifies the specific order of nodes needed to travel between two points.

### Symmetry Analysis
Your agent evaluates if a network allows for reciprocal travel between nodes.

### Connectivity Audits
The tool finds isolated clusters or nodes that are cut off from the main network.

## Use Cases

### Logistics Routing
Calculate the shortest paths between distribution hubs in a supply chain network.

### Network Topology Audits
Find disconnected segments in a communication or power grid graph.

### Traffic Flow Analysis
Analyze how directional constraints affect the symmetry of a transit network.

### Data Structure Validation
Verify the connectivity of complex directed graphs used in database modeling.

## Benefits

- Replaces manual graph calculations with direct tool calls.
- Identifies network gaps and isolated nodes automatically.
- Provides exact node sequences for routing instead of estimates.
- Enables mathematical validation of network directionality.

## How It Works

Connecting this MCP to your client gives your agent immediate access to graph math tools.

1. Connect your AI client to Vinkius.
2. Provide your graph data to your agent.
3. Your agent calls the specific tool needed for the calculation.
4. The MCP executes the graph theory operation.
5. Your agent receives the results to answer your questions.

## Frequently Asked Questions

**What kind of graphs does this MCP support?**
This MCP is designed specifically for directed graphs.

**Can I use this with Claude or Cursor?**
Yes, you can use this with any MCP-compatible client like Claude, Cursor, or Windsurf.

**How do I find disconnected parts of my network?**
You can use the validate_network_connectivity tool to identify isolated nodes or sub-graphs.

**Does this MCP host the data?**
Vinkius hosts the MCP and manages the execution, but you provide the graph data through your AI client.

**Can it find the shortest path between two specific nodes?**
Yes, the get_shortest_paths tool retrieves the exact sequence of nodes for a requested route.

**What kind of graphs can I analyze?**
The tools are designed for directed graphs where edges have specific weights representing distance, time, or cost.

**How do I find the specific path between two nodes?**
You can use the `get_shortest_paths` tool by providing the list of nodes, edges, and the specific origin-destination pairs you are interested in.

**Can I detect disconnected parts of my network?**
Yes, the `validate_network_connectivity` tool identifies isolated nodes and strongly connected components within your graph.
