A Model Context Protocol (MCP) server for interacting with network devices. This lab demonstrates how to build an MCP server that connects to Cisco IOS-XE devices using Scrapli.
This lab accompanies the video series available at: https://youtu.be/DlSJgTCUCDk
- Execute show commands on network devices
- List available devices in the lab inventory
- Async SSH connections using Scrapli
- Clone the repository
- Install dependencies using uv:
uv sync
- Create a
.envfile with your device credentials:LAB_USERNAME=your_username LAB_PASSWORD=your_password - Update the device inventory in
server.pywith your device IPs
Run the MCP server:
uv run server.pyserver.py- Main MCP server with network toolsnetwork-mcp/- Package directorypyproject.toml- Project configuration
- Python 3.13+
- Network devices accessible via SSH