MCP Connector

Analyze Network Topologies with Topolograph MCP

An MCP server for the Topolograph API, giving AI agents OSPF/IS-IS/BGP topology analysis, event monitoring, and path calculations.

Works with docker

84
Spark score
out of 100
Updated 8 days ago
Source checked Sep 15, 2026
Version 1.3.2
Models
universal

Add to Favorites

Why it matters

Leverage the Topolograph MCP Server to gain deep insights into your OSPF/IS-IS network topologies. Monitor events, calculate routes, and manage network graphs for enhanced operational visibility.

Outcomes

What it gets done

01

Access and manage network graphs (upload, retrieve by time).

02

Query network details by IP, node ID, or network mask.

03

Monitor network and adjacency events with time-based filtering.

04

Calculate shortest paths and identify backup routes.

Source

Get it from source

Spark does not host a copy of it.

Open source

Reports

Agent outcome reports

No reports yet

Capabilities

Tools your agent gets

get_all_graphs

List of available graphs with filtering options

get_graph_by_time

Get a specific graph by time

get_network_by_graph_time

Request network information

get_graph_status

Check graph health and connectivity

get_network_events

Get network enable/disable events

get_adjacency_events

Get node/host and link events

get_nodes

Query diagram nodes

get_edges

Query diagram edges

+2 tools

Overview

Topolograph MCP Server

An MCP server exposing the Topolograph API for OSPF/IS-IS and BGP network topology analysis, event monitoring, and path calculation, with mutation tools disabled by default for agent-facing deployments. Use it when an AI agent needs to query live network topology, trace paths, review event history, or simulate failure impact; not a general monitoring tool outside Topolograph's data model.

What it does

This MCP server exposes the Topolograph API for OSPF and IS-IS network analysis, letting AI agents analyze network topologies, monitor events, and calculate paths for these protocols in real time. It covers graph management (retrieving and uploading network graphs), network analysis (querying by IP, node ID, or network mask), event monitoring (network and adjacency events with time filtering), path calculation (shortest paths, including backup-path support), status monitoring (graph connectivity and health), and detailed node/edge queries from network diagrams.

Read tools, always available, include get_all_graphs, get_graph_by_time, get_network_by_graph_time, get_graph_status, get_network_events, get_adjacency_events, get_events_timeline (groups node/host up/down events into chronological waves labelled outage/flap/up, for incident narration), get_nodes (filterable by role flags such as ABR/ASBR or IS-IS overload/attached), get_edges (with an include parameter for MPLS TE fields), get_lsps (list or inspect MPLS TE LSP tunnels), get_shortest_path (optionally accounting for autoroute-enabled MPLS-TE tunnels via with_lsps), get_cspf_path (a constrained-shortest-path feasibility check that never mutates the graph), and get_edge_failure_reaction (a simulation-only prediction of network-wide impact if links go down). A separate set of BGP topology tools, available on Topolograph >= 2.69, covers BGP graph epochs, speakers and peering sessions, route-table search, per-speaker route summaries, point-in-time route state, route diffing between two instants, BGP event timelines, BGP-to-IGP graph correlation, and route resolution including VPN/MPLS handoffs.

When to use - and when NOT to

Use it when an AI agent needs to query and reason about live OSPF/IS-IS (and, on newer Topolograph versions, BGP) network topology - checking graph health, tracing shortest or constrained paths, reviewing outage/flap event history, or simulating the impact of a link failure. It is not a general network-monitoring tool outside Topolograph's own data model, and mutation is deliberately opt-in: by default the server runs in read-only mode.

Capabilities

Mutation tools - upload_graph, and add_lsp/update_lsp/delete_lsp for MPLS TE LSP tunnels (delete_lsp is additionally tagged destructive) - are hidden from tools/list and rejected server-side whenever TOPOLOGRAPH_MCP_READ_ONLY is true, which is the default and the recommended setting for agent-facing deployments; set it to false only for trusted/admin deployments that need write access. Every tool also carries standard MCP annotations (readOnlyHint, destructiveHint, idempotentHint) for client-side tool selection, though those annotations are metadata, not the actual security boundary - the read-only environment variable and its server-side guard are what actually block mutation.

How to install

pip install -r requirements.txt

Configure the required TOPOLOGRAPH_API_BASE and, optionally, an auth token and the read-only flag:

export TOPOLOGRAPH_API_BASE="https://your-topolograph-api-url"
export TOPOLOGRAPH_API_TOKEN="your-api-token"
export TOPOLOGRAPH_MCP_READ_ONLY="true"

Then start it with python mcp-server.py; it serves on http://0.0.0.0:8000/mcp by default. It is also bundled into the topolograph-docker repository's docker-compose.yml, where docker-compose up -d brings up the full Topolograph stack with the MCP server available at http://localhost:8000/mcp, auto-connected to the Flask API.

Who it's for

Network engineers and AI agents that need to query and act on live OSPF/IS-IS/BGP topology data - tracing paths, monitoring adjacency and BGP events, and simulating failure impact - without granting write access unless explicitly configured to. See the LICENSE file in the repository for the project's license terms.

Source README

Topolograph MCP Server

A Model Context Protocol (MCP) server that provides access to Topolograph API for OSPF/IS-IS network analysis.

Overview

This MCP server enables AI agents to interact with Topolograph API to analyze network topologies, monitor events, and perform path calculations for OSPF and IS-IS protocols. MCP (Model Context Protocol) is essential for connecting Large Language Models (LLMs) to network infrastructure, allowing AI agents to query and analyze network data in real-time.

This MCP server is included in the topolograph-docker repository and is available via the provided docker-compose.yml file.

Features

  • Graph Management: Retrieve and upload network graphs
  • Network Analysis: Query network information by IP, node ID, or network mask
  • Event Monitoring: Track network and adjacency events with time filtering
  • Path Calculation: Calculate shortest paths between nodes with backup path support
  • Status Monitoring: Check graph connectivity and health status
  • Node/Edge Queries: Retrieve detailed node and edge information from diagrams

Installation

pip install -r requirements.txt

Configuration

Set the required environment variable:

export TOPOLOGRAPH_API_BASE="https://your-topolograph-api-url"

Optional authentication:

export TOPOLOGRAPH_API_TOKEN="your-api-token"

Optional read-only mode (defaults to true, recommended for agent-facing deployments):

export TOPOLOGRAPH_MCP_READ_ONLY="true"

When enabled, mutation tools (upload_graph, add_lsp, update_lsp, delete_lsp) are
removed from the advertised tool surface (tools/list) and cannot be called, even by a
client that already knows their name. Set to false only for trusted/admin deployments
that need write access.

Usage

Start the MCP server:

python mcp-server.py

The server runs on http://0.0.0.0:8000/mcp by default.

Docker Compose Integration

This MCP server is included in the topolograph-docker repository. To use it as part of the complete Topolograph stack:

git clone https://github.com/Vadims06/topolograph-docker.git
cd topolograph-docker
docker-compose pull
docker-compose up -d

The MCP server will be available at http://localhost:8000/mcp and automatically connects to the Flask API.

Available Tools

Read tools (always available)

  • get_all_graphs: List available graphs with filtering options
  • get_graph_by_time: Fetch specific graph by time
  • get_network_by_graph_time: Query network information
  • get_graph_status: Check graph health and connectivity
  • get_network_events: Retrieve network up/down events
  • get_adjacency_events: Get node/host and link events
  • get_events_timeline: Node/host events grouped into time waves for incident narration
  • get_nodes: Query diagram nodes (filter by role flags: ABR/ASBR, IS-IS overload/attached)
  • get_edges: Query diagram edges (include=["lsp_left_bw", "lsps", "is_te_link", "edge_key"] for MPLS TE fields)
  • get_lsps: List/inspect MPLS TE LSP tunnels (filters: status, via_node, via_edge, via_edge_key)
  • get_shortest_path: Calculate the shortest path between two nodes (with_lsps=true to account for autoroute-enabled MPLS-TE tunnels)
  • get_cspf_path: Constrained-shortest-path (CSPF) feasibility check between two nodes; never mutates the graph
  • get_edge_failure_reaction: Predict whole-network impact if one or more links go down; simulation only

BGP topology tools (require Topolograph >= 2.69)

  • list_bgp_graphs / get_bgp_graph: List/fetch BGP graph epochs
  • list_bgp_nodes / list_bgp_sessions: BGP speakers and peering sessions of an epoch
  • search_bgp_routes: Search the BGP route table, whole-graph or scoped to one speaker's resolved RIB view
  • get_bgp_node_route_summary: Per-speaker route totals (RIB-tag histogram, Adj-RIB-Out count)
  • get_bgp_route_state: Point-in-time BGP route state
  • compare_bgp_routes: Diff BGP routes between two instants
  • get_bgp_events_timeline: BGP session/route monitoring events
  • list_bgp_bindings / get_bgp_binding: BGP-to-IGP graph correlation
  • resolve_route: Resolve a path to a destination, including VPN/MPLS handoffs
  • get_vrf_inventory / list_vpn_routers: VRF inventory and VPN start-node candidates for resolve_route

Mutation tools (hidden and disabled when TOPOLOGRAPH_MCP_READ_ONLY=true)

  • upload_graph: Upload new graphs to the API
  • add_lsp / update_lsp / delete_lsp: Create, update, and delete MPLS TE LSP tunnels (delete_lsp is also tagged destructive)

Tools are tagged read, write, and/or destructive in source, and carry standard MCP
annotations (readOnlyHint, destructiveHint, idempotentHint) for clients that use them
for tool selection. Annotations are metadata for clients, not a security boundary: the
actual boundary is TOPOLOGRAPH_MCP_READ_ONLY hiding mutation tools from tools/list,
backed by a server-side guard that also rejects direct calls to them in read-only mode.

Wave patterns (get_events_timeline)

get_events_timeline groups node/host up/down events into chronological
waves, each labelled with a pattern (outage / flap / up). For the
full field reference and the pattern ↔ graph-status mapping, see the docs:

➡️ Events Timeline (Waves)

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.