vyos-mcp
Manage and monitor VyOS routers via the HTTPS REST API, plus search live VyOS documentation.
Read, retrieve, and check VyOS configuration paths and multi-valued nodes.
Inspect config revision history and show diffs for committed revisions.
Run operational
showcommands and diagnostics: ping, traceroute, interface stats, system resources, route table, firewall/NAT counters, and BGP summary.Validate, apply, confirm, save, load, merge, generate, and reset configuration changes.
Reboot, power off, add system images, and delete system images.
Search and read VyOS documentation pages with caching.
Use optional read-only mode to register only non-mutating tools.
Fetches and searches live VyOS documentation from the vyos-documentation repository on GitHub to provide documentation lookup tools.
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., "@vyos-mcp show me the current interfaces and the active routing table"
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-vyos
MCP server for VyOS router management via the HTTPS REST API. Provides both router management tools and live VyOS documentation lookup.
Installation
Install with uv:
uv tool install mcp-server-vyosUpgrade to the latest release:
uv tool upgrade mcp-server-vyosAlternatively, skip the install and let uvx fetch the server on demand -- see
Claude Code below.
Related MCP server: OPNsense MCP Server
Configuration
Set environment variables:
VYOS_URL— Router API endpoint (e.g.,https://vyos.example.com)VYOS_API_KEY— API key for authenticationVYOS_READ_ONLY— Set totrueto disable all mutating tools (config changes, reboot, poweroff, etc.)
VyOS Router Setup
Enable the HTTPS API on your VyOS router:
configure
set service https api keys id my-mcp-key key <your-api-key>
set service https api rest
commit
saveClaude Code
Add to your MCP client configuration:
{
"mcpServers": {
"vyos": {
"command": "mcp-server-vyos",
"env": {
"VYOS_URL": "https://vyos.example.com",
"VYOS_API_KEY": "your-api-key"
}
}
}
}Without installing first, run it through uvx instead -- replace the command
line above with:
"command": "uvx",
"args": ["mcp-server-vyos"],Read-Only Mode
For safe, query-only access (monitoring, investigation, documentation lookup), enable read-only mode:
{
"mcpServers": {
"vyos": {
"command": "mcp-server-vyos",
"env": {
"VYOS_URL": "https://vyos.example.com",
"VYOS_API_KEY": "your-api-key",
"VYOS_READ_ONLY": "true"
}
}
}
}This registers only non-mutating tools: vyos_info, vyos_retrieve, vyos_return_values, vyos_exists, vyos_config_diff, vyos_config_history, vyos_show, vyos_traceroute, vyos_ping, vyos_interface_stats, vyos_system_resources, vyos_route_table, vyos_firewall_stats, vyos_bgp_summary, vyos_docs_search, and vyos_docs_read.
Tools
Router Management
Tool | Description |
| System info (no auth required) |
| Read configuration at a path |
| Get multi-valued config node values |
| Check if a config path exists |
| Show what a commit revision changed (default: most recent) |
| List config revision history (number, timestamp, user, method) |
| Run operational show commands |
| Validate config syntax (temporary apply with auto-rollback) |
| Apply config with commit-confirm (safe default) |
| Confirm a pending commit-confirm |
| Save running config to disk |
| Load a configuration file |
| Merge config file or string into running config |
| Generate keys, certificates, etc. |
| Reset operations |
| Reboot the router |
| Power off the router |
| Add a system image from URL |
| Delete a system image |
Diagnostics
Tool | Description |
| Traceroute to a host (structured mtr report), optionally from a VRF |
| Ping a host, optionally from a VRF (count 1-10; needs VyOS rolling 2026.08.18+) |
| Interface RX/TX counters, errors, and link state |
| CPU, memory, storage, and uptime snapshot |
| Routing table (RIB) by family/protocol ( |
| Firewall and NAT rule hit counters |
| BGP neighbor summary (state, prefixes received) |
Documentation
Tool | Description |
| Search VyOS docs by topic and page content (returns snippets) |
| Read a specific documentation page |
Documentation is fetched live from the vyos-documentation repository, so it stays in sync with the latest VyOS releases. Results are cached for 1 hour.
Safety
Configuration changes use
commit-confirmby default -- changes auto-revert after 5 minutes unless confirmed withvyos_confirmvyos_configureaccepts a list of operations applied atomically in one commit-confirm -- batch related changes into a single call so they commit or roll back togetherIf the router commits without arming a rollback (a VyOS version without API commit-confirm, or another commit-confirm still pending), the tool raises an error saying the changes were committed -- confirm or let a pending window expire before the next change
Destructive operations (
vyos_reboot,vyos_poweroff,vyos_image_delete) include warning descriptionsAPI keys are never logged or included in tool outputs
Self-signed TLS certificates are accepted by default (common on VyOS)
Development
uv sync --extra dev
uv run pytest
uv run ruff check .Dependencies are pinned in the committed uv.lock. Add --locked to uv sync to
fail rather than re-resolve when the lock is out of date with pyproject.toml, which
is how CI installs.
License
MIT
Available Tools
28 toolsvyos_bgp_summaryA
Show the BGP neighbor summary (show bgp summary).
Neighbor state, uptime, and prefixes received per peer across all
address families. Most useful on routers running BGP; if BGP is not
running, the router returns an error response ("success": false).
Inputs: no named parameters.
vyos_config_diffA
Show what a commit revision changed (not a running-config comparison).
Returns a unified diff of revision rev+1 -> rev, i.e. what that
commit changed. Defaults to the most recent commit (rev 0). Revision
numbers are the `revision` values listed by vyos_config_history.
Note: the VyOS HTTP API cannot compare the running config against
the saved config, so this tool only diffs committed revisions.
Args:
rev: Commit revision number (omit or 0 = most recent)
Inputs: rev.
vyos_config_historyA
List configuration revision history.
Returns the numbered config revisions VyOS retains, newest first,
each with its timestamp, the user who committed it, the method
(e.g. cli, vyos-http-api), and an optional comment. Pair with
vyos_config_diff(rev) to inspect what changed in a given revision.
Note: VyOS exposes no rollback endpoint over the HTTP API, so this
server can report revision history but cannot revert to a revision.
Inputs: no named parameters. Returns: result
vyos_configureA
Apply a list of VyOS config changes atomically with commit-confirm.
Every operation in `commands` is applied in a single commit-confirm
window — the whole batch commits or rolls back together, never
partially. Prefer batching all related set/delete changes into one
call rather than making several sequential calls; this is faster and
keeps related changes atomic.
This is the safe default — changes auto-revert after 5 minutes unless
confirmed with vyos_confirm. Confirm or let a pending window expire
before calling again: a call while one is pending commits WITHOUT its
own rollback and raises. An error saying changes were COMMITTED means
they are live; do not retry blindly. A `warning` key in the result
means auto-rollback could not be verified (`service https` changes).
Args:
commands: List of config operations, each with 'op'
('set'/'delete') and 'path' (list of strings). Pass as many
as belong together. Example:
[{"op": "set", "path": ["firewall", "group",
"network-group", "MY_GROUP", "network", "10.0.0.0/8"]},
{"op": "set", "path": ["firewall", "group",
"network-group", "MY_GROUP", "network", "192.168.0.0/16"]}]
Inputs: commands (required).
vyos_confirmA
Confirm a pending commit-confirm, making changes permanent.
Inputs: no named parameters.
vyos_docs_readA
Read a VyOS documentation page.
Fetches the raw RST content from the VyOS docs repository.
Use vyos_docs_search to find the path for a topic.
Args:
path: Doc path, e.g. "docs/configuration/firewall/groups.rst"
Inputs: path (required). Returns: result
vyos_docs_searchA
Search VyOS documentation by topic (path and page content).
Ranks matching doc pages by how many query terms appear in the path
and body. Each result is a dict with 'path', 'title', and 'snippet'
(a context excerpt when the query matches the page body, else None).
Use vyos_docs_read to fetch the full content of a result.
Args:
query: Search terms, e.g. "firewall group" or "nat hairpin"
max_results: Maximum number of results to return (default 10).
Capped internally at ~30 (only fetched pages can rank).
Inputs: query (required), max_results. Returns: result
vyos_existsA
Check if a VyOS configuration path exists.
Returns true/false in the data field.
Args:
path: Configuration path to check,
e.g. ["service", "https", "api"]
Inputs: path (required).
vyos_firewall_statsA
Show firewall and NAT rule hit counters.
Returns a dict keyed by 'firewall', 'nat_source', and
'nat_destination', each holding the corresponding `show` output. On
partial failure the affected key holds an error dict with
"success": false and "error" set — check "success" before using
"data"; the commands that succeeded are still returned. Most useful
on routers with complex rulesets.
Inputs: no named parameters.
vyos_generateC
Run a VyOS generate command (keys, certificates, etc.).
Args:
path: Command path, e.g. ["pki", "wireguard", "key-pair"]
Inputs: path (required).
vyos_image_addA
Add a VyOS system image from a URL.
Downloads and installs a new system image. This does not
reboot — the new image will be used on next boot.
The call blocks until the router finishes downloading and installing,
which can take several minutes for a full ISO (it waits up to 30
minutes). On a timeout error the install may still be running: check
vyos_show(["system", "image"]) before retrying.
Args:
url: URL to the VyOS ISO image
Inputs: url (required).
vyos_image_deleteA
Delete a VyOS system image.
WARNING: Cannot delete the currently running image.
Args:
name: Image name, e.g. "1.4-rolling-202102280559"
Inputs: name (required).
vyos_infoA
Get VyOS system info (no authentication required).
Inputs: no named parameters.
vyos_interface_statsA
Show interface statistics: RX/TX counters, errors, link state.
With no argument, returns the summary table for all interfaces.
Pass an interface spec as path elements (e.g. ["ethernet", "eth0"])
to get detailed byte/packet/error counters for a single interface.
Args:
interface: Optional interface path elements, e.g. ["ethernet", "eth0"]
Inputs: interface.
vyos_loadC
Load a VyOS configuration file.
Args:
file: Path to config file on the router,
e.g. "/config/test.config"
Inputs: file (required).
vyos_mergeA
Merge a configuration into the running config.
Provide either a file path on the router or an inline
config string (VyOS curly-brace format).
Args:
file: Path to config file on the router
string: Inline config in VyOS format, e.g.
'interfaces { ethernet eth1 { description "test" } }'
Inputs: file, string.
vyos_pingA
Ping a host from the router.
Returns the API response with the ping output (per-reply RTTs and a
loss/latency summary) in its data field. If no reply arrives the
router reports failure, so the tool errors with the ping output.
Requires VyOS rolling 2026.08.18 or later; older routers lack the
/ping endpoint and this tool reports so.
Args:
host: Destination hostname or IP, e.g. "8.8.8.8"
count: Number of echo requests, 1-10 (default 5)
vrf: Optional VRF to ping from
Inputs: host (required), vrf, count.
vyos_poweroffA
Power off the VyOS router immediately.
WARNING: This will shut down the router. The router will
need physical or out-of-band access to power back on.
Inputs: no named parameters.
vyos_rebootA
Reboot the VyOS router immediately.
WARNING: This will reboot the router. All active sessions
and traffic will be interrupted.
Inputs: no named parameters.
vyos_resetC
Run a VyOS reset command.
Args:
path: Command path, e.g. ["ip", "bgp", "192.0.2.11"]
Inputs: path (required).
vyos_retrieveB
Read VyOS configuration at a given path.
Args:
path: Configuration path as list of strings, e.g. ["firewall", "group"]
Inputs: path (required).
vyos_return_valuesA
Get values of a multi-valued VyOS config node as a list.
Use this instead of vyos_retrieve when a node has multiple
values (e.g. addresses on an interface).
Args:
path: Configuration path, e.g.
["interfaces", "dummy", "dum0", "address"]
Inputs: path (required).
vyos_route_tableA
Show the routing table / RIB (show ip route / show ipv6 route).
Raises ValueError (propagated to the caller) if family or protocol is
not one of the documented values.
Args:
family: Address family — "ip" (IPv4, default) or "ipv6".
protocol: Optional source filter — one of bgp, ospf, ospfv3,
static, connected, kernel, rip, isis. Omit for all routes.
Inputs: family, protocol.
vyos_saveA
Save running VyOS configuration to disk.
Inputs: no named parameters.
vyos_showB
Run a VyOS operational show command.
Args:
path: Command path as list of strings, e.g. ["interfaces", "ethernet"]
Inputs: path (required).
vyos_system_resourcesA
Get router system resources: CPU, memory, storage, and uptime.
Returns a dict keyed by resource (cpu, memory, storage, uptime),
each holding the corresponding `show system ...` output. Handy for
a quick health snapshot of the router.
Inputs: no named parameters.
vyos_tracerouteA
Traceroute to a host from the router.
Returns the API response with an mtr report (per-hop loss and
latency) in its data field. Useful for diagnosing reachability and
path issues from the router's perspective. The host must be a valid
hostname or IP address.
Args:
host: Destination hostname or IP, e.g. "8.8.8.8"
vrf: Optional VRF to trace from. Needs VyOS rolling 2026-08-24 or
later; older routers silently ignore it and use the default VRF.
Inputs: host (required), vrf.
vyos_validateA
Validate VyOS configuration syntax without persisting changes.
Applies commands with a 1-minute commit-confirm window and does NOT
confirm, so the router automatically rolls back. This is not a true
dry-run — the configuration is temporarily applied for up to 1 minute.
A successful response means the syntax is valid. An HTTP error means the
commands contain invalid syntax or paths — unless it says the changes were
COMMITTED, in which case they persist and must be reviewed.
Args:
commands: List of config operations, each with 'op'
('set'/'delete') and 'path' (list of strings).
Example: [{"op": "set", "path": ["firewall",
"group", "network-group", "MY_GROUP"]}]
Inputs: commands (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 28 tools
Most tools have clearly distinct purposes (e.g., vyos_ping vs vyos_traceroute, vyos_retrieve vs vyos_return_values). A few pairs could be confused, such as vyos_show vs vyos_retrieve, but descriptions clarify the distinction. vyos_config_diff is clearly differentiated from a running-config comparison.
Almost all tools use a consistent vyos_ prefix with a verb or noun pattern. Minor deviations like vyos_info, vyos_return_values, and vyos_config_history break the strict verb_noun pattern but remain readable and predictable.
With 28 tools, the set is heavy for a router management server. While each tool covers a distinct operation, the volume increases cognitive load and the risk of misselection.
The surface covers essential config lifecycle (retrieve, validate, configure, confirm, save) and many operational commands. Minor gaps exist: no direct rollback tool (though noted as unavailable) and no explicit interface configuration tool, but agents can work around these.
Maintenance
Related MCP Connectors
MCP server for network documentation, generated by doc2mcp.
MCP server for Vonage API documentation, code snippets, tutorials, and troubleshooting.
MCP gateway and cloud hosting for MCP servers, agents and apps like RAG, managed from your agent.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for managing VyOS routers via the VyOS HTTP API, allowing AI assistants to read config, set interfaces, firewall rules, VPNs, and more.172MIT
- AlicenseAqualityBmaintenanceA secure MCP server for managing OPNsense firewalls through AI assistants. Provides 81 tools across system, firewall, network, DNS, DHCP, VPN, HAProxy, services, diagnostics, and security domains.81395 PyPI21MIT
- AlicenseAqualityDmaintenanceA comprehensive MCP server for network device management via SSH/Telnet. Supports multiple vendors such as Cisco IOS and BDCOM, enabling AI assistants to execute commands and manage routers, switches, and firewalls.4MIT
- AlicenseNot gradedqualityDmaintenanceEnables managing VyOS appliances through their HTTP API, providing tools for configuration, operational commands, and interactive troubleshooting.MIT