Shortest Path Engine

Shortest Path Engine MCP Connector for Claude

A+

Find optimal paths in weighted graphs using Dijkstra, A*, and Bellman-Ford algorithms.

3 tools Official Updated Oct 1, 2026 Official Vinkius Partner

The Shortest Path Engine provides specialized computational tools for navigating complex networks. Use dijkstra to find the most efficient route in graphs with non-negative weights. For optimized searches using spatial heuristics like Euclidean or Manhattan distances, use astar. If your graph contains negative edge weights or you need to detect infinite cost-reduction loops (negative cycles), use bellman_ford. This engine calculates precise paths, total distances, and reachability maps for any weighted directed or undirected graph.

dijkstraastarbellman-fordgraph-algorithmsshortest-path

3 tools expose this connector's capabilities to your AI agent.

astar

Do NOT use for simple unweighted graphs. Find the shortest path using A* search

bellman_ford

Scan graph using Bellman-Ford algorithm

dijkstra

Do NOT use for negative weights. Find the shortest path using Dijkstra algorithm

See how to talk to your AI agent using Shortest Path Engine.

Find the shortest path from node 'A' to node 'C' using Dijkstra with these edges: [{'startNode': 'A', 'endNode': 'B', 'weight': 5}, {'startNode': 'B', 'endNode': 'C', 'weight': 3}, {'startNode': 'A', 'endNode': 'C', 'weight': 10}]

The shortest path from A to C is [A, B, C] with a total distance of 8.

Using A* search with Manhattan heuristic, what is the path from 'Start' to 'End' in this graph: nodes=['Start', 'Mid', 'End'], edges=[{'startNode': 'Start', 'endNode': 'Mid', 'weight': 2}, {'startNode': 'Mid', 'endNode': 'End', 'weight': 2}]

The optimal path from Start to End is [Start, Mid, End] with a total distance of 4.

Check for negative cycles in a graph starting from node 'S' with edges: [{'startNode': 'S', 'endNode': 'A', 'weight': 1}, {'startNode': 'A', 'endNode': 'B', 'weight': -2}, {'startNode': 'B', 'endNode': 'S', 'weight': 1}]

A negative cycle was detected in the graph (S -> A -> B -> S has a total weight of 0, but if weights were lower, it would trigger). In this specific case, no infinite loop was found as the sum is exactly 0.

Use `dijkstra` when you are certain that all edge weights in your graph are zero or positive. It is highly efficient for standard shortest-path queries.

Related Connectors