pyATS MCP Server

by automateyournetwork

76 320 downloads Not rated yet MIT
GitHub

About

Interact with network devices using Cisco's pyATS and Genie libraries for model-driven automation.

Details

License
MIT

Explore

- 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

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name pyATS MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository


git clone https://github.com/automateyournetwork/pyATS_MCP
cd pyATS_MCP
pip install -r requirements.txt

cp .env.example .env

json
{
"mcpServers": {
"pyats": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"--env-file", "/absolute/path/to/.env",
"-v", "/absolute/path/to/testbed.yaml:/app/testbed.yaml",
"pyats-mcp-server"
]
}
}
}

json
{
"mcpServers": {
"pyats": {
"command": "python3",
"args": ["-u", "/path/to/pyats_mcp_server.py"],
"env": {
"PYATS_TESTBED_PATH": "/absolute/path/to/testbed.yaml"
}
}
}
}
```

---

uv venv .venv && uv pip install -r requirements-dev.txt

pyats_list_devices

List all devices in the testbed

pyats_search_devices

Fuzzy-search devices by name or alias

pyats_run_show_command

Run a validated show command; returns parsed JSON or raw output

pyats_run_show_command_on_multiple_devices

Run a show command across multiple devices concurrently

pyats_ping_from_network_device

Execute a ping from a network device

pyats_run_linux_command

Run a command on a Linux host

pyats_configure_device

Apply configuration commands with safety guardrails

pyats_configure_devices_multi

Apply configuration across multiple devices concurrently

pyats_configure_with_diff

Apply config and return a before/after diff

pyats_rollback_config

Roll back to the last saved configuration snapshot

pyats_device_health

Snapshot CPU, memory, interfaces, and routing state

pyats_get_neighbors

Retrieve CDP/LLDP neighbors

pyats_find_interface_by_ip

Find which interface owns a given IP address

pyats_run_dynamic_test

Execute a sandboxed pyATS test script

pyats_get_operation_log

Retrieve the in-memory operation log

| Tool | Description |
|------|-------------|
| pyats_list_devices | List all devices in the testbed |
| pyats_search_devices | Fuzzy-search devices by name or alias |
| pyats_run_show_command | Run a validated show command; returns parsed JSON or raw output |
| pyats_run_show_command_on_multiple_devices | Run a show command across multiple devices concurrently |
| pyats_ping_from_network_device | Execute a ping from a network device |
| pyats_run_linux_command | Run a command on a Linux host |
| pyats_configure_device | Apply configuration commands with safety guardrails |
| pyats_configure_devices_multi | Apply configuration across multiple devices concurrently |
| pyats_configure_with_diff | Apply config and return a before/after diff |
| pyats_rollback_config | Roll back to the last saved configuration snapshot |
| pyats_device_health | Snapshot CPU, memory, interfaces, and routing state |
| pyats_get_neighbors | Retrieve CDP/LLDP neighbors |
| pyats_find_interface_by_ip | Find which interface owns a given IP address |
| pyats_run_dynamic_test | Execute a sandboxed pyATS test script |
| pyats_get_operation_log | Retrieve the in-memory operation log |

---

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "pyats mcp server": {
            "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"
                }
            }
        }
    }
}

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"
        }
    }
}
Trust Score

Available on CodeGuilds

MCP server that 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.

> All communication is via STDIN/STDOUT — no HTTP ports, no REST endpoints.

---

Quick Start

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.

Videos about pyATS MCP Server

Relevant YouTube tutorials, setups, and demos