Purpose: pyATS_MCP provides an MCP interface for Cisco pyATS/Genie, enabling AI agents such as Claude to directly operate real or virtual network devices rather than simulated networks. It exposes tools via the Model Context Protocol's Streamable HTTP transport (mcp>=2.3.0), supports stateful or stateless modes selected by environment variables, and no longer uses STDIO.
Main capabilities: 26 tools in total, covering device discovery, show command execution and parsing, configuration deployment (with rollback points), Genie learn/diff, Genie Clean, declarative testing (Blitz, Robot Framework, AEtest), generic REST/RESTCONF, and Cisco XPresso. Supports two multi-device fan-out approaches: a shared thread pool, or one OS process per device (pyats.async_.pcall) for large-scale isolation. All dangerous paths are intercepted before reaching devices, and invocation records are written to an in-memory audit log.
Usage: Requires a pyATS testbed.yaml pointing to real or virtual devices, plus an MCP-capable client. Credentials and device information are all placed in .env, injected into testbed.yaml at runtime via %ENV{} substitution, and never hardcoded in the repository. The server is a long-running process; after starting it once, clients can connect to http://<host>:<port>/mcp. Client configuration examples include Claude Code, VS Code (GitHub Copilot Chat), OpenAI Codex CLI, etc.; Claude Desktop's stdio configuration does not support the url field and requires bridging via a Custom Connector or mcp-remote.
Limitations: The project is marked as experimental. Dynamic test scripts run in a restricted sandbox; pyats_clean_device defaults to dry_run=True and never executes the Genie Clean stages that reboot, erase, or reinstall images, and real execution requires an exact confirmation phrase. Task extensions adopt the 2026-07-28 specification and do not support the legacy experimental Tasks API; the task database requires one process per server and is not a distributed task queue. In unauthenticated mode, task ID is equivalent to bearer credentials and must be properly protected.