# ciscodevnet/cisco-pyats-mcp-network-automation architecture

> Architecture diagram of the GitHub repository ciscodevnet/cisco-pyats-mcp-network-automation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ciscodevnet/cisco-pyats-mcp-network-automation
- Repository: https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation

## Overview

Cisco pyATS MCP Server lets an AI assistant invoke guarded network operations in a pyATS testbed. The workflow runs from an engineer’s natural-language request through an MCP tool, runtime settings and command guardrails, then a short-lived device connection and returned output. The graph preserves the distinct read-command, health-check, configuration-backup, and guarded-configuration capabilities. Source excerpts show the server’s calls and device wrapper; other product capabilities and client/device relationships are included where the README documents them.

Main entry points: [`mcp_server/server.py`](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py) (MCP server), [`mcp_server/devices.py`](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/devices.py) (Device access), [`mcp_server/config.py`](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/config.py) (Runtime settings), [`mcp_server/validation.py`](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/validation.py) (Command validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["MCP interface"]
  node_server["MCP server<br/>[server.py]"]
end

subgraph group_safety["Settings and guardrails"]
  node_settings["Runtime settings<br/>[config.py]"]
  node_guardrails["Command validation<br/>[validation.py]"]
end

subgraph group_operations["Network operations"]
  node_device_access["Device access<br/>[devices.py]"]
  node_list_devices["List devices<br/>[server.py]"]
  node_show_command["Show command<br/>[server.py]"]
  node_health_check["Health check<br/>[server.py]"]
  node_config_backup["Config backup<br/>[server.py]"]
  node_apply_config["Apply config<br/>[server.py]"]
  node_testbed["pyATS testbed"]
end

node_engineer(("Engineer"))
node_assistant["AI assistant"]
node_network_devices["Cisco devices"]

node_engineer -->|"requests operation"| node_assistant
node_assistant -->|"calls over MCP"| node_server
node_server -->|"loads settings"| node_settings
node_server -->|"registers tool"| node_list_devices
node_server -->|"registers tool"| node_show_command
node_server -->|"registers tool"| node_health_check
node_server -->|"registers tool"| node_config_backup
node_server -->|"registers tool"| node_apply_config
node_list_devices -->|"lists allowed devices"| node_device_access
node_show_command -->|"validates command"| node_guardrails
node_apply_config -->|"validates config"| node_guardrails
node_show_command -->|"opens session"| node_device_access
node_health_check -->|"opens session"| node_device_access
node_config_backup -->|"opens session"| node_device_access
node_apply_config -->|"opens session"| node_device_access
node_device_access -->|"uses SSH and access settings"| node_settings
node_device_access -->|"loads device definitions"| node_testbed
node_device_access -->|"connects over SSH"| node_network_devices
node_server -->|"returns device output"| node_assistant

click node_server "https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py"
click node_settings "https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/config.py"
click node_guardrails "https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/validation.py"
click node_device_access "https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/devices.py"
click node_list_devices "https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py"
click node_show_command "https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py"
click node_health_check "https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py"
click node_config_backup "https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py"
click node_apply_config "https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py"
click node_testbed "https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/tree/main/testbed"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server toneBlue
class node_settings,node_guardrails toneAmber
class node_device_access,node_list_devices,node_show_command,node_health_check,node_config_backup,node_apply_config,node_testbed toneMint
class node_engineer,node_assistant,node_network_devices toneIndigo
```

## Components

### MCP interface

- [MCP server](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py): `mcp_server/server.py`

### Settings and guardrails

- [Runtime settings](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/config.py): `mcp_server/config.py`
- [Command validation](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/validation.py): `mcp_server/validation.py`

### Network operations

- [Device access](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/devices.py): `mcp_server/devices.py`
- [List devices](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py): `mcp_server/server.py`
- [Show command](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py): `mcp_server/server.py`
- [Health check](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py): `mcp_server/server.py`
- [Config backup](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py): `mcp_server/server.py`
- [Apply config](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/blob/main/mcp_server/server.py): `mcp_server/server.py`
- [pyATS testbed](https://github.com/ciscodevnet/cisco-pyats-mcp-network-automation/tree/main/testbed): `testbed`

### Other components

- **Engineer**
- **AI assistant**
- **Cisco devices**

## Connections

- Engineer → AI assistant: requests operation (evidence: `README.md`)
- AI assistant → MCP server: calls over MCP (evidence: `README.md`)
- MCP server → Runtime settings: loads settings (evidence: `mcp_server/server.py`)
- MCP server → List devices: registers tool (evidence: `mcp_server/server.py`)
- MCP server → Show command: registers tool (evidence: `mcp_server/server.py`)
- MCP server → Health check: registers tool (evidence: `mcp_server/server.py`)
- MCP server → Config backup: registers tool (evidence: `mcp_server/server.py`)
- MCP server → Apply config: registers tool (evidence: `mcp_server/server.py`)
- List devices → Device access: lists allowed devices (evidence: `mcp_server/server.py`)
- Show command → Command validation: validates command (evidence: `mcp_server/server.py`)
- Apply config → Command validation: validates config (evidence: `mcp_server/server.py`)
- Show command → Device access: opens session (evidence: `mcp_server/server.py`)
- Health check → Device access: opens session (evidence: `mcp_server/server.py`)
- Config backup → Device access: opens session (evidence: `mcp_server/server.py`)
- Apply config → Device access: opens session (evidence: `mcp_server/server.py`)
- Device access → Runtime settings: uses SSH and access settings (evidence: `mcp_server/devices.py`)
- Device access → pyATS testbed: loads device definitions (evidence: `README.md`)
- Device access → Cisco devices: connects over SSH (evidence: `README.md`)
- MCP server → AI assistant: returns device output (evidence: `README.md`)
