An experimental Model Context Protocol (MCP) server that wraps Cisco pyATS / Genie to expose safe network-automation tools over JSON-RPC via STDIN/STDOUT.
https://github.com/automateyournetwork/pyATS_MCPStop building custom network automation APIs every time you want AI agents to interact with your Cisco infrastructure. The pyATS MCP Server gives you a production-ready bridge between any MCP-compatible AI system and your network devices through Cisco's battle-tested pyATS framework.
You've got AI agents that need to troubleshoot network issues, gather device information, or apply configurations. But connecting AI safely to network infrastructure typically means:
The pyATS MCP Server eliminates this entire development cycle by wrapping pyATS/Genie in a secure, AI-friendly interface.
STDIN/STDOUT Communication: Unlike HTTP-based APIs, this server communicates through standard input/output using JSON-RPC 2.0. No open ports, no web server overhead, perfect for containerized environments and AI agent integration.
Built-in Safety: Input validation blocks dangerous commands (erase, reload, write), prevents command injection (|, >, copy), and validates all inputs through Pydantic schemas. Your network stays safe while AI agents operate autonomously.
Structured Data by Default: Returns parsed, structured data instead of raw text output. AI agents get JSON they can actually work with rather than having to parse CLI text.
Automated Troubleshooting: Your monitoring system detects packet loss. An AI agent uses the MCP server to run show ip interface brief, ping tests, and show logging across affected devices, then correlates the structured data to identify the root cause.
Configuration Compliance: AI agents can audit device configurations by running show run brief, comparing against your desired state, and applying corrective configurations through the safe apply_configuration tool.
Network Discovery: During infrastructure changes, agents can discover topology by running show commands across your testbed devices and building comprehensive network maps from the structured responses.
LangGraph Ready: Drop it into your LangGraph pipeline as a tool node:
("pyats-mcp", ["python3", "pyats_mcp_server.py", "--oneshot"], "tools/discover", "tools/call")
Container Native: The included Dockerfile makes deployment trivial. Mount your testbed file, set environment variables, and you're running network automation through AI agents.
One-Shot or Persistent: Run in continuous mode for long-lived agents, or one-shot mode for discrete tasks. The server adapts to your architecture.
The server exposes five core tools that cover most network automation needs:
run_show_command: Execute any show command with optional Genie parsingrun_ping_command: Network connectivity testing with structured resultsapply_configuration: Safe configuration changes with multi-line supportlearn_config: Fetch running configurations efficientlylearn_logging: Retrieve system logs for troubleshootingEach tool validates inputs and handles errors gracefully, so your AI agents get consistent, reliable responses.
export PYATS_TESTBED_PATH=/path/to/testbed.yamlpython3 pyats_mcp_server.pyFor containerized deployment:
docker run -i --rm \
-e PYATS_TESTBED_PATH=/app/testbed.yaml \
-v /your/testbed/folder:/app \
pyats-mcp-server
Network operations are moving toward AI-assisted workflows, but the integration layer has been the stumbling block. This MCP server provides the missing link between AI agents and network infrastructure, with the security and reliability you need for production environments.
The STDIO-based approach means you can embed network automation capabilities directly into AI agents without the complexity of managing HTTP services or dealing with network security concerns around exposed APIs.
Whether you're building AI-powered network operations tools or just want your existing automation to be more intelligent, the pyATS MCP Server gives you a head start with proven, production-ready network automation capabilities.