home / mcp / mcp demo lab mcp server

MCP Demo Lab MCP Server

Provides an MCP server that exposes 35 network tools to AI assistants for device management and topology insights.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "e-conners-lab-mcp-demo-lab": {
      "command": "python",
      "args": [
        "network_mcp_server.py"
      ],
      "env": {
        "R1_HOST": "10.0.0.1",
        "R2_HOST": "10.0.0.2",
        "DEMO_MODE": "true",
        "NETBOX_URL": "http://localhost:8000",
        "NETBOX_TOKEN": "YOUR_TOKEN",
        "DEVICE_PASSWORD": "admin",
        "DEVICE_USERNAME": "admin"
      }
    }
  }
}

You deploy a Python-based MCP server that exposes 35 network tools to AI assistants, enabling direct, multi-vendor control over your routers, switches, and firewalls through natural language commands and automated checks. This server guides you from installation to running in demo mode, and provides practical workflows to explore device health, topology, routing, and configuration management with your preferred MCP client.

How to use

Connect your MCP client (such as Claude Desktop or ChatGPT) to the MCP server and start issuing natural language commands. For example you can ask the AI to check the health of all devices, discover topology, view routing tables, or push configurations. Your AI assistant will translate these requests into the available tools and perform the actions against your device inventory.

How to install

Prerequisites: Python 3.11+, a supported operating environment, and network accessibility to your devices. You will also need a Python virtual environment to isolate dependencies.

# 1) Clone the project
git clone https://github.com/E-Conners-Lab/MCP-DEMO-LAB.git
cd network-mcp

# 2) Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate

# 3) Install dependencies
pip install -r requirements.txt

Optional quick-start steps to run a demo server without real devices.

# Demo mode returns realistic mock data โ€” no devices needed
DEMO_MODE=true python network_mcp_server.py

Configuration notes

Configure device access by creating an environment configuration file and listing device endpoints and credentials. You can enable mock/demo mode to explore features without live devices, or connect to real devices by providing hostnames or IPs and authentication details in the environment.

Connecting a client to the MCP server

Once the server is running, connect your MCP client by pointing it at the local server process. In demo mode you will be able to exercise 35 tools without requiring live devices.

Try with a real lab (5 minutes)

# Spin up 2 FRR routers with containerlab
cd quickstart && sudo containerlab deploy -t topology.clab.yml

Available tools

get_devices

List all devices in inventory

send_command

Run show commands on any device

send_config

Push configuration changes to devices

health_check

Check device health metrics like CPU, memory, and interfaces

health_check_all

Health check all devices in parallel

backup_config

Backup the running configuration of a device

compare_configs

Diff two configuration backups

rollback_config

Restore a previous configuration

discover_topology

LLDP-based topology discovery

get_routing_table

View routing tables from devices

get_neighbors

Check BGP/OSPF neighbor status

get_arp_table

Lookup ARP table information

get_mac_table

Retrieve MAC address table entries

ping_sweep

Sweep a subnet for reachable hosts

traceroute

Trace path to a destination

calculate_tunnel_mtu

Compute optimal MTU/MSS for VPN tunnels

calculate_subnet_info

Provide subnet details from CIDR notation

split_network

Perform VLSM subnet splitting

convert_netmask

Convert CIDR to dotted decimal netmask

snmp_get_oid

SNMP GET for an OID

snmp_walk_oid

SNMP WALK a subtree for OIDs

snmp_poll_metrics

Poll interface, CPU, and memory metrics via SNMP

get_interfaces_netconf

Fetch interface data via NETCONF

get_bgp_neighbors_netconf

Get BGP neighbor state via NETCONF

get_netconf_capabilities

Query device NETCONF capabilities

compliance_check

Check device against compliance templates

full_network_test

End-to-end network validation