network-mcp
Provides AI assistants with direct access to multi-vendor network devices for tasks like configuration management, health checks, and topology discovery through 35 specialized tools. It enables natural language control over platforms including Cisco, Juniper, and Nokia using SSH, NETCONF, and SNMP protocols.
README
network-mcp
Give AI direct access to your network devices. 35 MCP tools, multi-vendor, one interface.
Stop writing Netmiko scripts. Connect Claude, ChatGPT, or any MCP-compatible AI to your routers, switches, and firewalls — and let it run show commands, check health, calculate subnets, discover topology, and manage configs through natural language.
You: "Check the health of all my devices"
Claude: [calls health_check_all] → 6 devices healthy, Switch-R2 has 2 interfaces down
What is this?
An MCP (Model Context Protocol) server that gives AI assistants real-time access to network devices. Built for network engineers who want to automate without writing boilerplate.
Supported platforms:
- Cisco IOS-XE (routers, switches)
- Nokia SR Linux
- FRRouting (FRR)
- Juniper Junos
- Aruba AOS-CX
- Linux hosts
Quick Start
1. Install
git clone https://github.com/E-Conners-Lab/MCP-DEMO-LAB.git
cd network-mcp
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
2. Configure devices
cp .env.example .env
# Edit .env with your device IPs and credentials
3. Try it instantly (no lab required)
# Demo mode returns realistic mock data — no devices needed
DEMO_MODE=true python network_mcp_server.py
4. Connect to Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"network": {
"command": "/path/to/network-mcp/.venv/bin/python",
"args": ["/path/to/network-mcp/network_mcp_server.py"]
}
}
}
Restart Claude Desktop. You now have 35 network tools available.
5. Try with a real lab (5 minutes)
# Spin up 2 FRR routers with containerlab
cd quickstart && sudo containerlab deploy -t topology.clab.yml
Tools
Device Operations
| Tool | Description |
|---|---|
get_devices |
List all devices in inventory |
send_command |
Run show commands on any device |
send_config |
Push configuration changes |
health_check |
Check device health (CPU, memory, interfaces) |
health_check_all |
Health check all devices in parallel |
backup_config |
Backup running configuration |
compare_configs |
Diff two config backups |
rollback_config |
Restore a previous config |
Network Intelligence
| Tool | Description |
|---|---|
discover_topology |
LLDP-based topology discovery |
get_routing_table |
View routing tables |
get_neighbors |
BGP/OSPF neighbor status |
get_arp_table |
ARP table lookup |
get_mac_table |
MAC address table |
ping_sweep |
Sweep a subnet for reachable hosts |
traceroute |
Trace path to destination |
Calculators (no devices needed)
| Tool | Description |
|---|---|
calculate_tunnel_mtu |
Optimal MTU/MSS for VPN tunnels |
calculate_subnet_info |
Subnet details from CIDR notation |
split_network |
VLSM subnet splitting |
convert_netmask |
CIDR to dotted decimal conversion |
SNMP & Monitoring
| Tool | Description |
|---|---|
snmp_get_oid |
SNMP GET for specific OIDs |
snmp_walk_oid |
SNMP WALK subtrees |
snmp_poll_metrics |
Poll interface/CPU/memory metrics |
NETCONF
| Tool | Description |
|---|---|
get_interfaces_netconf |
Interface data via NETCONF |
get_bgp_neighbors_netconf |
BGP state via NETCONF |
get_netconf_capabilities |
Device NETCONF capabilities |
Configuration Management
| Tool | Description |
|---|---|
compliance_check |
Check device against compliance templates |
full_network_test |
End-to-end network validation |
Architecture
┌─────────────────────────────────────────┐
│ AI Assistant (Claude, ChatGPT, etc.) │
└────────────────┬────────────────────────┘
│ MCP Protocol (stdio/SSE)
┌────────────────▼────────────────────────┐
│ network_mcp_server.py │
│ FastMCP server + tool registry │
└────────────────┬────────────────────────┘
│
┌────────────────▼────────────────────────┐
│ mcp_tools/ │
│ ├── device.py (9 tools) │
│ ├── calculators.py (6 tools) │
│ ├── topology.py (6 tools) │
│ ├── config.py (8 tools) │
│ ├── snmp.py (5 tools) │
│ ├── netconf.py (4 tools) │
│ ├── compliance.py (7 tools) │
│ └── ... (10 modules, 35 tools total) │
└────────────────┬────────────────────────┘
│
┌────────────────▼────────────────────────┐
│ core/ │
│ ├── connection.py (Netmiko/Scrapli) │
│ ├── parser.py (NTC/Genie) │
│ ├── mtu_calculator.py │
│ └── subnet_calculator.py │
└────────────────┬────────────────────────┘
│ SSH / NETCONF / SNMP
┌────────────────▼────────────────────────┐
│ Network Devices │
│ Cisco · Nokia · FRR · Juniper · Aruba │
└─────────────────────────────────────────┘
Project Structure
network-mcp/
├── network_mcp_server.py # MCP server entry point
├── config/
│ └── devices.py # Device inventory (env var overrides)
├── mcp_tools/ # All MCP tool implementations
│ ├── device.py # Core device operations
│ ├── calculators.py # MTU/subnet calculators
│ ├── topology.py # LLDP discovery
│ ├── config.py # Config backup/compare/rollback
│ ├── snmp.py # SNMP polling
│ ├── netconf.py # NETCONF operations
│ ├── compliance.py # Compliance checking
│ └── ... # 10 modules, 35 tools total
├── core/ # Connection and parsing libraries
├── templates/ # Jinja2 config templates (FRR, IOS-XE)
├── quickstart/ # Containerlab quick-start lab
└── tests/ # Test suite
Configuration
All configuration is via environment variables (or .env file):
# Device credentials
DEVICE_USERNAME=admin
DEVICE_PASSWORD=admin
# Device IPs (override defaults)
R1_HOST=10.255.255.11
R2_HOST=10.255.255.12
# Optional features
DEMO_MODE=true # Mock data, no real devices
USE_NETBOX=true # Pull inventory from NetBox
NETBOX_URL=http://localhost:8000
NETBOX_TOKEN=your-token
Requirements
- Python 3.11+
- Network devices reachable via SSH/NETCONF/SNMP
- Claude Desktop or any MCP-compatible client
Contributing
See CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。