MCP.so
登录

pyATS MCP Server

@automateyournetwork

关于 pyATS MCP Server

An MCP Server for pyATS (experimental)

基本信息

分类

其他

许可证

MIT

运行时

python

传输方式

stdio

发布者

automateyournetwork

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "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"
      }
    }
  }
}

工具

15

List all devices in the testbed

Fuzzy-search devices by name or alias

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

Run a show command across multiple devices concurrently

Execute a ping from a network device

Run a command on a Linux host

Apply configuration commands with safety guardrails

Apply configuration across multiple devices concurrently

Apply config and return a before/after diff

Roll back to the last saved configuration snapshot

Snapshot CPU, memory, interfaces, and routing state

Retrieve CDP/LLDP neighbors

Find which interface owns a given IP address

Execute a sandboxed pyATS test script

Retrieve the in-memory operation log

概览

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

FAQ from pyATS MCP Server

What protocols and platforms does the server support?

It supports Cisco IOS XE, IOS XR, NX‑OS, IOS, Arista EOS, Juniper Junos, Palo Alto PAN‑OS, Linux, and Windows, set via {DEVICENAME}_OS in .env. A generic OS option lets Unicon autodetect on first connect.

Are the tools safe for production use?

Show commands are validated against dangerous pipes, redirects, and keywords. Config commands are checked for reload, erase, write erase, delete, and format. Dynamic tests run in a sandbox that bans os, sys, subprocess and other risky imports.

How are device credentials handled?

Credentials are never stored in the testbed YAML or source code. All device‑specific credentials (username, password, enable password) are defined in the .env file using a {DEVICENAME}_{FIELD} naming convention and referenced in the testbed via %ENV{} substitution.

What are the runtime dependencies?

The server requires Python 3 and the packages listed in requirements.txt. It can be run locally or inside a Docker container built from the provided Dockerfile.

How does the server communicate with clients?

All communication uses STDIN/STDOUT and JSON‑RPC 2.0. There are no HTTP ports or REST endpoints, making it suitable for MCP clients like Claude and LangGraph.

评论

其他 分类下的更多 MCP 服务器