Provides a model-driven MCP server that wraps Cisco pyATS and Genie for structured STDIO interactions and safe CLI actions.
Configuration
View docs{
"mcpServers": {
"automateyournetwork-pyats_mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PYATS_TESTBED_PATH",
"-v",
"/absolute/path/to/testbed/folder:/app",
"pyats-mcp-server"
],
"env": {
"PYATS_TESTBED_PATH": "YOUR_PATH"
}
}
}
}The pyATS MCP Server provides a model-context driven interface that wraps Cisco pyATS and Genie functionality and exposes a structured, JSON-RPC over STDIO workflow. It lets you interact with devices, run safe CLI commands, retrieve parsed or raw outputs, and apply changes in a controlled, tool-driven way, all without HTTP endpoints.
You connect to the MCP server from your client by invoking the server process and then sending JSON-RPC requests over standard input. Your client can discover the available tools, call them with validated parameters, and receive results on standard output. Use the provided tools to run safe show commands, ping tests, fetch running configurations, and apply configuration changes in a controlled manner. All inputs are validated to ensure safety and consistency.
Prerequisites you need before starting: a Python runtime and Docker, if you plan to run the containerized server.
# Docker-based (containerized server)
docker build -t pyats-mcp-server .
docker run -i --rm \
-e PYATS_TESTBED_PATH=/app/testbed.yaml \
-v /absolute/path/to/testbed/folder:/app \
pyats-mcp-server
# Local (STDIO) server
export PYATS_TESTBED_PATH=/absolute/path/to/testbed.yaml
python3 pyats_mcp_server.pyIf you prefer to run a one-shot request, you can pipe a single JSON-RPC command to the server in STDIO mode after starting it.
Configuration and usage notes for the pyATS MCP Server are shown in the examples and structure below. The server communicates strictly via STDIN/STDOUT, which makes it ideal for embedded deployments, containerized environments, or integration in toolchains that rely on non-HTTP IPC.
Project structure highlights the important entry points you interact with when running or configuring the server in your environment.
{
"mcpServers": {
"pyats": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PYATS_TESTBED_PATH",
"-v",
"/absolute/path/to/testbed/folder:/app",
"pyats-mcp-server"
],
"env": {
"PYATS_TESTBED_PATH": "/app/testbed.yaml"
}
}
}
}
```
```json
{
"servers": {
"pyats": {
"type": "stdio",
"command": "python3",
"args": [
"-u",
"/Users/johncapobianco/pyATS_MCP/pyats_mcp_server.py"
],
"env": {
"PYATS_TESTBED_PATH": "/Users/johncapobianco/pyATS_MCP/testbed.yaml"
}
}
}
}You benefit from input validation via Pydantic, which ensures requests conform to expected schemas before any action is performed. Unsafe commands are blocked (for example, destructive actions like erase or reload commands are prevented). The server also guards against pipe or redirect abuse to prevent injection attempts and parsing errors. If parsing fails, it gracefully reports errors rather than crashing.
The MCP server exposes a defined set of tools that you can discover and call. These include running safe show commands with optional parsing, performing ping tests, applying multi-line configuration commands, and fetching running configurations or logs. Each tool is designed to provide structured results or parsed outputs to support automation workflows.
Discover the available tools to see what you can call, then execute a tool by name with the required arguments. The server validates inputs and returns structured results or parsing where available.
Executes show commands safely with optional parsing
Executes ping tests and returns parsed or raw results
Applies safe configuration commands (multi-line supported)
Fetches running config (show run brief)
Fetches system logs (show logging last 250)