mcp_vyos
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp_vyos show the current firewall rules and NAT configuration"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server for VyOS
A production-ready Model Context Protocol (MCP) server that lets AI agents (Claude Desktop, Claude Code, OpenCode, Antigravity, Codex, and Cursor) inspect, configure, operate, and troubleshoot VyOS routers and firewalls.
Architecture Overview
mcp_vyos drives VyOS through its HTTPS API, with optional SSH for operational commands and fallback:
┌──────────────────────────────────────────────────────────────────────────────┐
│ AI Agents / MCP Clients │
│ (Claude Desktop • Claude Code • OpenCode • Antigravity • Codex • Cursor) │
└───────────────────────────────────────┬──────────────────────────────────────┘
│ MCP Protocol (stdio / sse)
▼
┌──────────────────────────────────────────────────────────────────────────────┐
│ mcp_vyos │
│ ┌────────────────────┐ ┌────────────────────┐ ┌────────────────────────┐ │
│ │ VyOS HTTPS API │ │ SSH client │ │ Safety & Redaction │ │
│ │ (key auth, form) │ │ (op-mode, paramiko)│ │ (read-only, secrets) │ │
│ └─────────┬──────────┘ └─────────┬──────────┘ └────────────────────────┘ │
└────────────┼───────────────────────┼──────────────────────────────────────────┘
│ HTTPS │ SSH (vbash)
▼ ▼
┌──────────────────────────────────────────────────────────────────────────────┐
│ VyOS Router │
│ Single configuration tree: interfaces • firewall • nat • protocols (BGP/ │
│ OSPF/static) • service (DHCP/DNS/SSH/NTP) • vpn (WireGuard/IPsec/OpenVPN) • │
│ system • vrf • qos • container • pki • high-availability │
│ Endpoints: /configure /retrieve /show /generate /config-file /reset │
│ /reconnect /reboot /poweroff /image /info │
└──────────────────────────────────────────────────────────────────────────────┘Because VyOS exposes its entire configuration as one path tree, a handful of generic primitives reach every feature. The server layers typed, validated domain wrappers on top for ergonomics, plus a raw escape hatch so nothing is ever out of reach.
Related MCP server: mtik-mcp
Complete Tools Reference
67 tools across 8 domains.
1. Generic configuration primitives (100% coverage)
Tool | Arguments | Description |
|
| Retrieve the config tree or a subtree as JSON. Empty-but-valid paths return |
|
| Check whether a config path exists. |
|
| Return the value(s) of a multi-valued node. |
|
| Export running config as flat |
|
| Apply a single |
|
| Apply a single |
|
| Attach/remove a node comment. |
|
| Apply mixed set/delete/comment ops as one transaction (use for validator-coupled fields). |
2. Operational & diagnostics
Tool | Arguments | Description |
|
| Run any operational |
|
| Run a |
| none | Public |
|
| Ping from the router. |
|
| Traceroute from the router. |
|
| Resolve a name from the router. |
3. Lifecycle & persistence
Tool | Arguments | Description |
|
| Persist running config to disk ( |
|
| Replace running config from a file or string. |
|
| Merge config from a file or string. |
| none | Confirm a pending commit-confirm (stops auto-revert). |
|
| Run a |
|
| Bounce a PPPoE/WWAN interface. |
|
| Reboot (requires |
|
| Power off (requires |
|
| Install a system image from a URL. |
|
| Delete an installed image. |
4. Interfaces
vyos_list_interfaces, vyos_get_interface, vyos_show_interfaces_status, vyos_set_interface_address, vyos_configure_interface, vyos_delete_interface — ethernet, bridge, bonding, vxlan, wireguard, tunnel, dummy, loopback and more.
5. Firewall
vyos_show_firewall, vyos_list_firewall_rules, vyos_add_firewall_rule (action + protocol + ports in one commit), vyos_delete_firewall_rule, vyos_set_firewall_default_action, vyos_configure_firewall_group (address/network/port/interface/mac/domain groups).
6. NAT
vyos_show_nat, vyos_add_source_nat_rule (SNAT/masquerade), vyos_add_destination_nat_rule (DNAT/port-forward, translation bundled), vyos_delete_nat_rule.
7. Routing, Services, VPN, System
Routing:
vyos_show_routes,vyos_add_static_route,vyos_delete_static_route,vyos_configure_bgp,vyos_configure_ospf,vyos_show_bgp_summary,vyos_show_ospf_neighbor.Services:
vyos_list_services,vyos_show_dhcp_leases,vyos_configure_dhcp_server,vyos_configure_dns_forwarding,vyos_configure_ssh,vyos_configure_ntp.VPN:
vyos_show_vpn_config,vyos_show_vpn_status,vyos_configure_wireguard,vyos_configure_ipsec_site_to_site,vyos_configure_openvpn.System:
vyos_show_system_config,vyos_show_system_info,vyos_show_log,vyos_set_hostname,vyos_set_name_server,vyos_set_time_zone,vyos_configure_user,vyos_configure_task_scheduler.
8. Raw escape hatch
Tool | Arguments | Description |
|
| Call any VyOS endpoint directly with a raw payload. Write endpoints respect read-only mode. |
Important VyOS Behavior
These are the rules the model (and you) must respect; the tool descriptions reinforce them.
Commit is immediate, save is not. Every
/configurerequest commits to the running config right away but does not write to disk. Usevyos_save_config(orsave=Trueon write tools) to persist across reboots.Validator-coupled fields must arrive together. VyOS validates each request as a complete commit. A firewall rule's
action+protocol+port, a NAT rule'stranslation, and a scheduler task'sinterval/crontab-specmust be sent in one request. Usevyos_configure_batchor the domain wrappers (which build complete transactions). Splitting them produces errors like "Protocol must be defined if specifying a port" or "Configuration path ... is not valid".Commit-confirm is your safety net. When reconfiguring a remote router, pass
confirm_time(minutes). The change auto-reverts unless you callvyos_confirm_commit. Great for firewall and interface changes that could lock you out.Empty paths aren't errors.
showConfigon a valid-but-unconfigured path returns a clean{"configured": false}so desired-state comparisons work on a fresh system.Bulk applies: prefer several moderate requests over one huge list;
geoip/remote-groupcommits are expensive — apply one per request; the request body limit isservice https request-body-size-limit(1 MB default).
Permissions & Safety
Write operations are enabled by default (VYOS_READONLY=false).
Set VYOS_READONLY=true to restrict the server to inspection: all modifying tools (vyos_set, vyos_delete, vyos_configure_batch, every wrapper, vyos_save_config/load/merge, vyos_reset, vyos_reconnect, vyos_reboot, vyos_poweroff, vyos_image_*, and write endpoints via vyos_raw_api_call) are blocked with a clear error, while read tools (vyos_show_config, vyos_show, vyos_get_info, status tools) stay available.
High-impact tools (vyos_reboot, vyos_poweroff, vyos_image_*) additionally require explicit confirm=True.
Secret redaction
VyOS returns secrets in clear text (PKI private keys, IPsec PSKs, WireGuard private/preshared keys, OpenVPN secrets, service https api keys, user password material). The server redacts them by default in both JSON config and flat set ... output. Pass include_secrets=true only when the value itself is required. vyos_generate is intentionally not redacted — generated keys are the point. Redaction is pattern-based.
Enabling the VyOS HTTP API
On the router:
set service https api keys id MY-ID key 'MY-HTTPS-API-PLAINTEXT-KEY'
set service https api rest
commit
saveUseful extras:
set service https api rest strict— reject deletes on non-existent paths (mirror withVYOS_REST_STRICT=true).set service https port 8443— custom port (put it inVYOS_URL).set service https allow-client address 192.0.2.0/24— restrict API clients.Bind a real certificate with
set service https certificates certificate <name>; otherwise VyOS self-signs (useVYOS_VERIFY_SSL=false).
See the HTTP API docs.
Installation & Setup
Prerequisites
Python 3.10+ (3.13 tested)
Network access to the VyOS API listener (HTTPS 443 or custom), and SSH (optional)
Local Python setup
git clone https://github.com/opentreecz/mcp-vyos.git
cd mcp-vyos
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
cp .env.example .env # edit with your router URL and API keyDocker
docker compose up -d # SSE endpoint at http://localhost:8000/sseConfiguration Variables (.env)
Variable | Description | Default |
| Base HTTPS URL of the API listener (e.g. |
|
| Plaintext API key configured on VyOS | Required |
| Verify TLS certificate ( |
|
| HTTP timeout in seconds |
|
| Block all modifying operations |
|
| Informational hint mirroring |
|
| Enable SSH operational fallback tools |
|
| SSH host (defaults to the host in | Auto |
| SSH port |
|
| SSH username |
|
| Path to a private SSH key |
|
| Passphrase for an encrypted key |
|
| SSH password (if not using a key) |
|
| SSH command timeout in seconds |
|
Client Integration
Claude Desktop
~/.config/Claude/claude_desktop_config.json (Linux) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"vyos": {
"command": "/path/to/mcp-vyos/.venv/bin/mcp-vyos",
"args": ["--transport", "stdio"],
"env": {
"VYOS_URL": "https://192.168.1.1",
"VYOS_API_KEY": "your_api_key_here",
"VYOS_VERIFY_SSL": "false",
"VYOS_READONLY": "false"
}
}
}
}Claude Code (CLI)
claude mcp add vyos -- /path/to/mcp-vyos/.venv/bin/mcp-vyos --transport stdioOpenCode
~/.config/opencode/config.json:
{
"mcp": {
"vyos": {
"type": "local",
"command": [
"/path/to/mcp-vyos/.venv/bin/mcp-vyos",
"--env-file",
"/path/to/mcp-vyos/.env"
],
"enabled": true,
"timeout": 30000
}
}
}Antigravity & Cursor
{
"mcpServers": {
"vyos": {
"command": "/path/to/mcp-vyos/.venv/bin/mcp-vyos",
"args": ["--env-file", "/path/to/mcp-vyos/.env"]
}
}
}Example: open the web/API port and a firewall rule
# 1. Create an allow rule for TCP 8443 on the input hook (action + protocol + port in one commit)
vyos_add_firewall_rule(
rule=10, action="accept", family="ipv4", hook="input",
fields={"protocol": "tcp", "destination port": "8443", "state": "new"},
description="Allow VyOS API",
)
# 2. Move the API listener to 8443, with commit-confirm as a safety net
vyos_set(path="service https port", value="8443", confirm_time=2)
# 3. Verify you can still reach it, then confirm
vyos_confirm_commit()
# 4. Persist
vyos_save_config()Testing & Development
.venv/bin/pytest -v # unit tests
.venv/bin/ruff check . # linterLicense
MIT
Available Tools
67 toolsvyos_add_destination_nat_ruleA
Create a destination NAT (DNAT / port-forward) rule in one commit.
The translation address is always included so the rule validates. If you specify a port, also specify protocol (tcp/udp).
Args: rule: Rule number. inbound_interface: Ingress interface, e.g. "eth0". translation_address: Internal host to forward to, e.g. "192.168.1.10". translation_port: Optional internal port. destination_port: Optional matched external port. protocol: Protocol, e.g. "tcp", "udp", "tcp_udp" (required if a port is set). destination_address: Optional external/matched destination address. extra_fields: Additional {space-separated path: value} settings. description: Optional description. save: Persist after commit (default False).
Inputs: rule (required), inbound_interface (required), translation_address (required), save, +6 more. Returns: result
vyos_add_firewall_ruleA
Create or update a firewall filter rule in a single commit.
The action is always included so the rule validates. Protocol-dependent fields
(destination/source port) require 'protocol' to be present in fields.
Args: rule: Rule number (lower numbers are evaluated first). action: "accept", "drop", "reject", "jump", "return", "continue". family: "ipv4" or "ipv6". hook: "forward", "input" or "output". fields: Map of rule setting to value, space-separated keys for nested nodes. Examples: {"protocol": "tcp", "destination port": "443", "state established": "enable"} {"source address": "192.0.2.0/24", "destination group address-group WEB": ""} {"log": "enable"} description: Optional rule description. save: Persist after commit (default False).
Inputs: rule (required), action (required), hook, save, +3 more. Returns: result
vyos_add_source_nat_ruleB
Create a source NAT (SNAT/masquerade) rule in one commit.
Args: rule: Rule number. outbound_interface: Egress interface, e.g. "eth0". translation_address: "masquerade" (default) or a specific/pool address. source_address: Optional source match, e.g. "192.168.0.0/24". destination_address: Optional destination match. protocol: Optional protocol match, e.g. "tcp", "udp", "tcp_udp". extra_fields: Additional {space-separated path: value} settings. description: Optional description. save: Persist after commit (default False).
Inputs: rule (required), outbound_interface (required), save, protocol, +5 more. Returns: result
vyos_add_static_routeA
Add a static route (IPv4 or IPv6) in one commit.
Provide a next_hop, an interface, or both.
Args: destination: Destination prefix, e.g. "10.0.0.0/8" or "::/0". next_hop: Gateway address, e.g. "192.0.2.1". interface: Egress interface for an interface route, e.g. "eth1". distance: Optional administrative distance. family: "ipv4" (default) or "ipv6". save: Persist after commit (default False).
Inputs: destination (required), save, family, distance, +2 more. Returns: result
vyos_commentA
Attach a comment to a configuration node.
Args: path: Configuration path to annotate. comment: Comment text (empty string removes the comment). save: Persist after commit (default False).
Inputs: path (required), comment (required), save. Returns: result
vyos_config_existsA
Check whether a configuration path currently exists.
Returns {"exists": bool}. Use this before a desired-state apply to avoid the "empty configuration" error on fresh systems.
Args: path: Configuration path (list or space-separated string).
Inputs: path (required). Returns: result
vyos_configure_batchA
Apply multiple set/delete/comment operations as a single commit transaction.
This is the workhorse for anything whose fields are validated together: a firewall rule (action + protocol + ports), a NAT rule (translation), a VXLAN or tunnel block, a scheduler task (executable + interval). Sending such fields in separate requests fails validation because each request commits on its own.
Args: operations: List of objects, each {"op": "set"|"delete"|"comment", "path": [...] or "a b c", optional "value": "..."}. The value, if given, is appended to the path. confirm_time: If > 0, commit-confirm for the whole transaction. save: Persist to /config/config.boot after a successful commit (default False).
A list is applied atomically per component: if one operation fails, nothing is committed for that component. The error names the component and missing field.
Inputs: operations (required), save, confirm_time. Returns: result
vyos_configure_bgpB
Configure BGP: local AS, global settings and neighbors in one commit.
Args: local_as: Local autonomous system number. settings: Global BGP settings as {space-separated path: value}, e.g. {"parameters router-id": "192.0.2.1", "address-family ipv4-unicast network": "203.0.113.0/24"}. neighbors: Map of neighbor IP -> settings map, e.g. {"192.0.2.2": {"remote-as": "65002", "address-family ipv4-unicast soft-reconfiguration": "inbound"}}. save: Persist after commit (default False).
Inputs: local_as (required), save, settings, neighbors. Returns: result
vyos_configure_dhcp_serverA
Configure a DHCP server shared-network subnet in one commit.
Args: shared_network: Shared-network name, e.g. "LAN". subnet: Subnet CIDR, e.g. "192.168.0.0/24". settings: {space-separated path: value} under the subnet, e.g. {"subnet-id": "1", "option default-router": "192.168.0.1", "option name-server": "192.168.0.1", "range 0 start": "192.168.0.100", "range 0 stop": "192.168.0.200"}. save: Persist after commit (default False).
Inputs: subnet (required), settings (required), shared_network (required), save. Returns: result
vyos_configure_dns_forwardingB
Configure the DNS forwarding service in one commit.
Args: settings: {space-separated path: value} under "service dns forwarding", e.g. {"listen-address": "192.168.0.1", "allow-from": "192.168.0.0/24", "name-server": "1.1.1.1", "cache-size": "10000"}. save: Persist after commit (default False).
Inputs: settings (required), save. Returns: result
vyos_configure_firewall_groupA
Create or extend a firewall group (address/network/port/interface/...).
Args: group_type: One of address-group, network-group, port-group, interface-group, mac-group, domain-group, ipv6-address-group, ipv6-network-group. name: Group name. members: List of members (addresses, networks, ports or interface names) added to the group. description: Optional group description. save: Persist after commit (default False).
Inputs: name (required), members (required), group_type (required), save, +1 more. Returns: result
vyos_configure_interfaceA
Configure an interface with a set of leaf settings in one commit.
All settings are applied together, so interdependent fields validate correctly.
Args: type: Interface type, e.g. "ethernet", "bridge", "bonding", "vxlan", "wireguard", "tunnel", "dummy", "loopback". name: Interface name, e.g. "eth1", "br0", "wg0". settings: Map of setting path (relative to the interface) to value. The key may be space-separated for nested nodes. Examples: {"address": "192.0.2.1/24", "mtu": "1500"} {"vni": "100", "remote": "203.0.113.9", "source-address": "198.51.100.1"} {"private-key": "...", "peer WG0 allowed-ips": "0.0.0.0/0"} A value of null/empty creates a valueless node. description: Optional interface description. save: Persist after commit (default False).
Inputs: name (required), type (required), settings (required), save, +1 more. Returns: result
vyos_configure_ipsec_site_to_siteA
Configure an IPsec site-to-site peer in one commit.
Args: peer: Peer identifier (name or address), e.g. "203.0.113.5". settings: {space-separated path: value} under "vpn ipsec site-to-site peer ", e.g. {"authentication mode": "pre-shared-secret", "authentication pre-shared-secret": "SECRET", "ike-group": "IKE-1", "connection-type": "initiate", "tunnel 0 local prefix": "192.168.0.0/24", "tunnel 0 remote prefix": "192.168.1.0/24", "tunnel 0 esp-group": "ESP-1"}. save: Persist after commit (default False).
Inputs: peer (required), settings (required), save. Returns: result
vyos_configure_ntpB
Configure NTP servers in one commit.
Args: servers: List of NTP server hostnames/IPs. settings: Additional {space-separated path: value} under "service ntp". save: Persist after commit (default False).
Inputs: servers (required), save, settings. Returns: result
vyos_configure_openvpnB
Configure an OpenVPN interface in one commit.
Args: interface: OpenVPN interface name, e.g. "vtun0". settings: {space-separated path: value} under "interfaces openvpn ", e.g. {"mode": "site-to-site", "protocol": "udp", "local-address": "10.255.0.1", "remote-address": "10.255.0.2", "shared-secret-key": "KEY"}. save: Persist after commit (default False).
Inputs: settings (required), interface (required), save. Returns: result
vyos_configure_ospfA
Configure OSPF settings in one commit.
Args: settings: {space-separated path: value} under "protocols ospf", e.g. {"parameters router-id": "192.0.2.1", "area 0 network": "192.0.2.0/24", "interface eth1 cost": "10"}. save: Persist after commit (default False).
Inputs: settings (required), save. Returns: result
vyos_configure_sshA
Enable/configure the SSH service in one commit.
Args: port: Optional listen port (default VyOS uses 22 when the service exists). settings: Additional {space-separated path: value} under "service ssh", e.g. {"disable-password-authentication": "", "listen-address": "192.168.0.1"}. save: Persist after commit (default False).
Inputs: port, save, settings. Returns: result
vyos_configure_task_schedulerA
Configure a scheduled task in one commit.
VyOS validators require the executable together with either interval OR crontab-spec in the same commit, so this tool bundles them.
Args: name: Task name. executable_path: Path to the executable to run. interval: Run interval, e.g. "1h" or "30m" (mutually exclusive with crontab_spec). crontab_spec: Crontab specification (mutually exclusive with interval). arguments: Optional arguments passed to the executable. save: Persist after commit (default False).
Inputs: name (required), executable_path (required), save, interval, +2 more. Returns: result
vyos_configure_userA
Create or update a login user in one commit.
Args: username: Login name. plaintext_password: Optional plaintext password (VyOS hashes it on commit). public_keys: Map of key identifier -> {"type": "ssh-ed25519"|"ssh-rsa"|..., "key": ""}. level: Optional privilege level, e.g. "admin" or "operator". save: Persist after commit (default False).
Inputs: username (required), save, level, public_keys, +1 more. Returns: result
vyos_configure_wireguardA
Configure a WireGuard interface and its peers in one commit.
Generate a key-pair first with vyos_generate(path="pki wireguard key-pair").
Args: interface: WireGuard interface name, e.g. "wg0". address: Interface address, e.g. "10.0.0.1/24". private_key: The interface private key. listen_port: UDP listen port. peers: Map of peer name -> settings, e.g. {"to-site-b": {"public-key": "...", "allowed-ips": "10.0.0.2/32", "address": "203.0.113.5", "port": "51820", "persistent-keepalive": "15"}}. "allowed-ips" accepts a single value; pass a list via extra batch calls for multiple. Nested keys may be space-separated. save: Persist after commit (default False).
Inputs: interface (required), save, peers, address, +2 more. Returns: result
vyos_confirm_commitA
Confirm a pending commit-confirm, stopping the auto-revert timer.
Call this after a change applied with confirm_time once you have verified the router is still reachable and behaving correctly.
Inputs: no named parameters. Returns: result
vyos_deleteA
Apply a single delete command and commit it immediately.
Args: path: Configuration path to delete (list or space-separated string). Include a trailing value to delete only one entry of a multi-valued node. confirm_time: If > 0, commit-confirm (reverts unless confirmed). save: Persist to /config/config.boot after a successful commit (default False).
Inputs: path (required), save, confirm_time. Returns: result
vyos_delete_firewall_ruleB
Delete a firewall filter rule.
Args: rule: Rule number to delete. family: "ipv4" or "ipv6". hook: "forward", "input" or "output". save: Persist after commit (default False).
Inputs: rule (required), hook, save, family. Returns: result
vyos_delete_interfaceB
Delete an interface or disconnect a physical interface's configuration.
Args: type: Interface type, e.g. "dummy", "wireguard", "vxlan". name: Interface name, e.g. "dum1", "wg0". save: Persist after commit (default False).
Inputs: name (required), type (required), save. Returns: result
vyos_delete_nat_ruleB
Delete a NAT rule.
Args: direction: "source" or "destination". rule: Rule number to delete. save: Persist after commit (default False).
Inputs: rule (required), direction (required), save. Returns: result
vyos_delete_static_routeA
Delete a static route.
Args: destination: Destination prefix to remove. family: "ipv4" (default) or "ipv6". save: Persist after commit (default False).
Inputs: destination (required), save, family. Returns: result
vyos_dns_lookupC
Resolve a hostname from the VyOS router.
Args: host: Hostname or IP to resolve. nameserver: Optional DNS server to query.
Inputs: host (required), nameserver. Returns: result
vyos_generateA
Run a generate command, e.g. a WireGuard key-pair or a self-signed cert.
Example path: "pki wireguard key-pair".
Args: path: The generate command tokens, WITHOUT the leading word "generate". Secrets in the output are NOT redacted — generated keys are the point.
Inputs: path (required). Returns: result
vyos_get_infoA
Get general system information from the public /info endpoint.
Returns the VyOS version, hostname and welcome banner. This endpoint does not require authentication and is a good connectivity check.
Inputs: no named parameters. Returns: result
vyos_get_interfaceA
Get the configuration of a single interface.
Args: type: Interface type, e.g. "ethernet", "wireguard", "bridge", "dummy". name: Interface name, e.g. "eth0", "wg0", "br0". include_secrets: Return keys unredacted (default False).
Inputs: name (required), type (required), include_secrets.
vyos_image_addA
Download and install a VyOS system image from a URL.
Args: url: HTTPS URL of the VyOS ISO image. confirm: Must be explicitly True to proceed (large, state-changing operation).
Inputs: url (required), confirm. Returns: result
vyos_image_deleteA
Delete an installed VyOS system image by name.
Args: name: Image name, e.g. "1.3-rolling-202006070117". confirm: Must be explicitly True to proceed.
Inputs: name (required), confirm. Returns: result
vyos_list_firewall_rulesB
List the rules of a firewall filter hook.
Args: family: "ipv4" or "ipv6". hook: "forward", "input" or "output".
Inputs: hook, family.
vyos_list_interfacesB
List all configured interfaces and their configuration subtree.
Args: include_secrets: Return WireGuard/tunnel keys unredacted (default False).
Inputs: include_secrets.
vyos_list_servicesA
Show the configured service subtree (DHCP, DNS, SSH, NTP, SNMP, ...).
Inputs: no named parameters.
vyos_load_configC
Replace the running configuration from a file or a config string.
Args: file: Path to a configuration file on the router (e.g. /config/test.config). string: A full configuration in curly-brace format (alternative to file).
Inputs: file, string. Returns: result
vyos_merge_configB
Merge a configuration file or string into the running configuration.
Args: file: Path to a configuration file on the router. string: A configuration fragment in curly-brace format. confirm_time: If > 0, commit-confirm (reverts unless vyos_confirm_commit runs).
Inputs: file, string, confirm_time. Returns: result
vyos_pingB
Ping a host from the VyOS router.
Args: host: Target IP address or hostname. count: Number of echo requests (1-20, default 4).
Inputs: host (required), count. Returns: result
vyos_poweroffA
Power off the VyOS router.
WARNING: the router must be powered back on manually. Requires confirm=True and write access.
Args: confirm: Must be explicitly True to proceed.
Inputs: confirm. Returns: result
vyos_raw_api_callA
Call any VyOS API endpoint directly with a raw operation payload.
Use this for anything the higher-level tools do not cover. Write endpoints (configure, config-file, reset, reconnect, reboot, poweroff, image, generate) are blocked when VYOS_READONLY=true.
Args: endpoint: Endpoint name without the leading slash, e.g. "retrieve", "configure", "show", "generate", "config-file", "reset", "image". data: The operation object (or list of objects for /configure), e.g. {"op": "showConfig", "path": ["firewall"]} or [{"op": "set", "path": ["interfaces","dummy","dum1","address","10.0.0.1/32"]}]. confirm_time: Optional commit-confirm window (minutes) for write endpoints. include_secrets: Return results unredacted (default False).
Returns the unwrapped "data" field of the VyOS response envelope.
Inputs: data (required), endpoint (required), confirm_time, include_secrets.
vyos_rebootA
Reboot the VyOS router.
WARNING: interrupts all traffic. Requires confirm=True and write access.
Args: confirm: Must be explicitly True to proceed. now: Reboot immediately (default True).
Inputs: now, confirm. Returns: result
vyos_reconnectB
Bring a connection-oriented interface down and up again (PPPoE, WWAN).
Args: interface: Interface name, e.g. "pppoe0".
Inputs: interface (required). Returns: result
vyos_resetA
Run an operational reset command (e.g. clear a BGP session, flush a table).
Example path: "ip bgp 192.0.2.11".
Args: path: The reset command tokens, WITHOUT the leading word "reset".
Inputs: path (required). Returns: result
vyos_return_valuesA
Return the value(s) of a multi-valued configuration node.
Example: path ["interfaces","dummy","dum0","address"] returns the list of configured addresses.
Args: path: Configuration path to the multi-valued node. include_secrets: Return values unredacted (default False).
Inputs: path (required), include_secrets.
vyos_save_configA
Save the running configuration to disk so it survives a reboot.
The /configure endpoint commits but never saves; call this to persist.
Args: file: Optional target path. Defaults to /config/config.boot.
Inputs: file. Returns: result
vyos_setA
Apply a single set command and commit it immediately.
Args: path: Configuration path (list or space-separated string), e.g. "interfaces dummy dum1 address". value: Optional final value appended to the path, e.g. "10.11.0.1/32". confirm_time: If > 0, commit-confirm: the change reverts after this many minutes unless vyos_confirm_commit is called. Use as a remote safety net. save: Persist to /config/config.boot after a successful commit (default False).
NOTE: fields validated together must be set in one request — use vyos_configure_batch for those. A single set that leaves a rule/object incomplete will fail validation.
Inputs: path (required), save, value, confirm_time. Returns: result
vyos_set_firewall_default_actionB
Set the default action of a firewall filter hook.
Args: action: "accept", "drop" or "reject". family: "ipv4" or "ipv6". hook: "forward", "input" or "output". save: Persist after commit (default False).
Inputs: action (required), hook, save, family. Returns: result
vyos_set_hostnameA
Set the system host name.
Args: hostname: New host name. save: Persist after commit (default False).
Inputs: hostname (required), save. Returns: result
vyos_set_interface_addressB
Assign an IP address (or "dhcp"/"dhcpv6") to an interface.
Args: type: Interface type, e.g. "ethernet", "dummy", "bridge". name: Interface name, e.g. "eth0". address: CIDR address like "192.0.2.1/24", or "dhcp"/"dhcpv6". save: Persist after commit (default False).
Inputs: name (required), type (required), address (required), save. Returns: result
vyos_set_name_serverA
Set system DNS name servers (replacing the configured list).
Args: name_servers: List of resolver IP addresses. save: Persist after commit (default False).
Inputs: name_servers (required), save. Returns: result
vyos_set_time_zoneB
Set the system time zone.
Args: time_zone: Zone identifier, e.g. "Europe/Prague" or "UTC". save: Persist after commit (default False).
Inputs: time_zone (required), save. Returns: result
vyos_showA
Run an operational-mode show command and return its text output.
Examples of path: "interfaces", "ip route", "system image", "vpn ipsec sa", "interfaces wireguard wg0".
Args: path: The show command tokens (list or space-separated string), WITHOUT the leading word "show". include_secrets: Return output unredacted (default False).
Inputs: path (required), include_secrets. Returns: result
vyos_show_bgp_summaryA
Show the operational BGP summary (neighbors and session states).
Inputs: no named parameters. Returns: result
vyos_show_configA
Retrieve the VyOS configuration tree (or a subtree) as structured JSON.
Args: path: Configuration path to read (list or space-separated string). Omit or pass an empty list to return the entire configuration. include_secrets: Return credential values unredacted (default False).
A valid path that holds no configuration returns {"configured": false} rather than raising, so desired-state comparisons work on a fresh system.
Inputs: path, include_secrets.
vyos_show_config_commandsA
Export the running configuration as flat set ... commands (backup/diff).
Equivalent to the operational command show configuration commands.
Args: include_secrets: Return secrets unredacted (default False).
Inputs: include_secrets. Returns: result
vyos_show_dhcp_leasesB
Show active DHCP server leases.
Inputs: no named parameters. Returns: result
vyos_show_firewallA
Show the firewall configuration tree (optionally a subsection).
Args: section: Optional subsection, e.g. "ipv4", "group", "ipv6 forward filter".
Inputs: section.
vyos_show_interfaces_statusA
Show live operational status of all interfaces (link, addresses, counters).
Inputs: no named parameters. Returns: result
vyos_show_logA
Show recent system log entries.
Args: count: Number of lines to return (1-1000, default 50). path: Optional log subtree, e.g. "firewall" or "image". Omit for the main log.
Inputs: path, count. Returns: result
vyos_show_natC
Show the NAT configuration tree.
Args: direction: Optional "source" or "destination" to narrow the view.
Inputs: direction.
vyos_show_ospf_neighborA
Show operational OSPF neighbor adjacencies.
Inputs: no named parameters. Returns: result
vyos_show_routesA
Show the operational routing table (FIB).
Args: family: "ip" for IPv4 (default) or "ipv6". prefix: Optional destination prefix to look up, e.g. "10.0.0.0/8".
Inputs: family, prefix. Returns: result
vyos_show_system_configA
Show the system configuration subtree (hostname, users, DNS, NTP, etc.).
Args: include_secrets: Return password hashes unredacted (default False).
Inputs: include_secrets.
vyos_show_system_infoA
Show operational system information (version, uptime, memory, storage).
Inputs: no named parameters. Returns: result
vyos_show_vpn_configA
Show VPN/WireGuard configuration (keys redacted by default).
Args: kind: One of "wireguard", "ipsec", "openvpn", "l2tp", "pptp", "sstp". Omit to show all VPN and WireGuard config. include_secrets: Return keys/PSKs unredacted (default False).
Inputs: kind, include_secrets.
vyos_show_vpn_statusA
Show live VPN status.
Args: kind: "ipsec" (security associations), "wireguard" (peer handshakes), or "openvpn" (sessions).
Inputs: kind. Returns: result
vyos_tracerouteB
Run a traceroute from the VyOS router to a destination.
Args: host: Target IP address or hostname.
Inputs: host (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 67 tools
The specific per-resource tools (e.g. vyos_add_firewall_rule, vyos_configure_interface) coexist with generic catch-alls (vyos_set, vyos_delete, vyos_configure_batch, vyos_raw_api_call) that can accomplish the same changes, so an agent must decide which layer to use. Similarly, read tools overlap (vyos_show_config vs vyos_show vs vyos_show_system_config vs vyos_list_interfaces vs vyos_get_interface), though descriptions do clarify most boundaries.
Nearly all tools use a consistent vyos_verb_noun pattern (vyos_get_interface, vyos_add_firewall_rule, vyos_configure_bgp). A few outliers break the pattern slightly (vyos_return_values, vyos_config_exists, vyos_raw_api_call), but overall the naming is predictable and readable.
67 tools is heavy for the surface, and much of the volume comes from per-feature wrappers duplicating what vyos_set/vyos_configure_batch already do. The VyOS domain is genuinely broad, so many tools earn a place, but the redundancy pushes the count beyond what is well-scoped.
Coverage spans interfaces, firewall, NAT, static/BGP/OSPF routing, DHCP/DNS/SSH/NTP services, WireGuard/IPsec/OpenVPN, system settings, images, and operational diagnostics, with vyos_raw_api_call as an escape hatch. Some areas (QoS/traffic policy, VRRP/HA, prefix-lists/route-maps, policy-based routing) lack dedicated tools but can be reached via the generic batch/raw tools.
Maintenance
Related MCP Connectors
Migrate and validate firewall, router and switch configurations from your AI assistant.
Manage Vozora VPS servers, SSH keys, firewalls, DNS and usage from an AI agent.
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
IP intelligence, network diagnostics, and AI service availability tools for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to manage and configure pfSense routers through the pfSense REST API, offering 240 tools across 17 modules with safety features like confirm gates, config backups, and read-only mode.-
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to audit, inspect, and safely configure MikroTik RouterOS v7 routers through tools for connection testing, system status, security audits, firewall mangle management, routing, DHCP leases, sanitized exports, containers, and adlist queries.39 npmGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to read, query, and safely modify RouterOS 7 devices over the REST API, covering firewall, routing, DHCP, DNS, interfaces, containers, files, and diagnostics, with confirmation gates and a scheduled rollback guard in front of disruptive changes.31 PyPIMIT
- AlicenseAqualityBmaintenanceEnables agents to search and call the full OPNsense core and plugin API, perform model-validated CRUD and settings operations, and use curated firewall, service, and network tools with optional auto-revert writes.141BSD 2-Clause "Simplified"