What is pyATS MCP Server?
pyATS MCP Server wraps Cisco pyATS and Genie, letting AI agents (Claude, LangGraph, etc.) run show commands, apply configuration, and query network state over STDIO using JSON-RPC 2.0. It communicates solely via STDIN/STDOUT with no HTTP ports or REST endpoints.
How to use pyATS MCP Server?
Clone the repository, install dependencies (pip install -r requirements.txt), copy .env.example to .env, edit the environment file with device credentials and testbed path, then run python3 pyats_mcp_server.py. Alternatively, build and run via Docker, passing the .env file and mounting the testbed YAML.
Key features of pyATS MCP Server
- Over a dozen tools for show commands, config, and diagnostics
- Validates show commands against pipes/redirects/dangerous keywords
- Blocks config commands containing
reload, erase, delete, etc.
- Dynamic test scripts run in a restricted sandbox
- All credentials live in
.env — never in source code or testbed file
- Supports concurrent operations on multiple devices
Use cases of pyATS MCP Server
- AI‑assisted network troubleshooting with parsed show commands
- Automated configuration rollback and diff-based change management
- Multi‑vendor health checks (CPU, memory, interfaces, routing)
- Sandboxed execution of custom test scripts against live devices
- Centralised ping and connectivity verification from network devices
评论