Oxidized MCP
v0.3.0MCP server for Oxidized network device configuration backups
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_nodes List Nodes
List nodes (network devices) managed by Oxidized. Returns each node's name, full name (group/name), IP, group, model, last run status and time, and last run details. Node vars are redacted unless redaction is disabled in the server configuration. Pass a group or model on large installations: they are filtered by Oxidized itself, so only matching nodes are transferred. The group must match exactly; use find_nodes when unsure of the name.
| Parameter | Type | Description |
|---|---|---|
group | Only nodes in this group - exact, case-sensitive name as shown by list_nodes (e.g. 'core'); 'default' selects nodes without a group | |
limit | integer | Maximum nodes to return |
model | Only nodes of this Oxidized model (e.g. 'IOS', 'JunOS', 'RouterOS'); built-in model names are case-insensitive | |
name_contains | Only nodes whose name, full name or IP contains this text (case-insensitive) | |
offset | integer | Number of matching nodes to skip |
status | Only nodes whose last run had this status (e.g. 'success', 'no_connection', 'fail', 'never') |
get_node Get Node
Get details of a single Oxidized node. Returns the node's name, full name, IP, group, model, vars and details of its last backup run (start, end, status, duration).
| Parameter | Type | Description |
|---|---|---|
node * | string | Node name or IP address (e.g. 'core-sw01') |
find_nodes Find Nodes
Find nodes by partial name, full name or IP address. Useful to resolve an ambiguous device name before calling other tools. Exact matches are listed first, then prefix matches, then other substring matches (all case-insensitive).
| Parameter | Type | Description |
|---|---|---|
query * | string | Part of a node name, full name (group/name) or IP address |
limit | integer | Maximum nodes to return |
get_backup_stats Get Backup Stats
Summarise backup health across Oxidized nodes. Computed from the node list (oxidized-web's own stats JSON is not usable): counts per last-run status, per group and per model, the success rate, and lists of failed nodes, nodes never backed up and stale nodes. Optionally limited to one group or model, filtered by Oxidized itself. "Stale" means Oxidized has not *attempted* a backup within the threshold (e.g. it is not polling the node); nodes that are attempted but keep failing are listed under failed_nodes instead. Oxidized does not expose the time of the last *successful* backup, and its run…
| Parameter | Type | Description |
|---|---|---|
group | Only include nodes in this group (exact, case-sensitive name) | |
max_listed | integer | Maximum nodes listed in each of the failed/never/stale lists |
model | Only include nodes of this Oxidized model (e.g. 'IOS') | |
stale_hours | integer | Report nodes whose last backup attempt (successful or not) is older than this many hours |
get_node_config Get Node Config
Get the latest backed-up configuration of a node. Large configurations are paged by lines: when 'truncated' is true, call again with offset set to 'next_offset' to read the rest.
| Parameter | Type | Description |
|---|---|---|
node * | string | Node name or IP address (e.g. 'core-sw01') |
group | Node group, to disambiguate nodes with the same name in different groups | |
max_lines | integer | Maximum lines to return (0 = whole configuration) |
offset | integer | Zero-based first line to return |
search_configs Search Configs
Search the latest configurations of all nodes for a pattern. oxidized-web first finds the nodes whose configuration matches, then those configurations are fetched to return the matching lines with line numbers. Use this to answer questions such as "which devices still have telnet enabled" or "where is VLAN 42 configured". The pattern must be valid in both Ruby (oxidized-web) and Python regular expressions - stick to common syntax. Lines are matched one at a time, so patterns spanning several lines find nodes but no lines.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | Regular expression (or literal text with literal=true) to search for, e.g. 'snmp-server community' |
case_sensitive | boolean | Match case-sensitively |
context_lines | integer | Lines of context to include before and after each match |
group | Only search nodes in this group - exact, case-sensitive name as shown by list_nodes; 'default' selects nodes without a group | |
literal | boolean | Treat the pattern as literal text |
max_matches | integer | Maximum matching lines to return in total |
max_nodes | integer | Maximum matching nodes whose configurations are searched (nodes without a stored configuration are skipped and not counted) |
list_node_versions List Node Versions
List the stored configuration versions of a node, newest first. Each version has its git oid, date, author and commit message. Requires the Oxidized 'git' (or 'gitcrypt') output.
| Parameter | Type | Description |
|---|---|---|
node * | string | Node name or IP address (e.g. 'core-sw01') |
group | Node group; looked up automatically when omitted | |
limit | integer | Maximum versions to return |
get_node_version Get Node Version
Get the configuration of a node as it was at a specific version. Large configurations are paged by lines: when 'truncated' is true, call again with offset set to 'next_offset' to read the rest.
| Parameter | Type | Description |
|---|---|---|
node * | string | Node name or IP address (e.g. 'core-sw01') |
oid * | string | Version oid from list_node_versions (full or unique prefix) |
group | Node group; looked up automatically when omitted | |
max_lines | integer | Maximum lines to return (0 = whole configuration) |
offset | integer | Zero-based first line to return |
diff_node_versions Diff Node Versions
Show what changed in a node's configuration between two versions. Returns a unified diff from 'base_oid' (older) to 'oid' (newer). With no arguments besides the node it shows the most recent change.
| Parameter | Type | Description |
|---|---|---|
node * | string | Node name or IP address (e.g. 'core-sw01') |
base_oid | Older version oid to compare against; defaults to the version before 'oid' | |
context_lines | integer | Unchanged lines of context around each change |
group | Node group; looked up automatically when omitted | |
max_lines | integer | Maximum diff lines to return (0 = whole diff) |
offset | integer | Zero-based first diff line to return |
oid | Newer version oid (full or prefix); defaults to the latest version |
trigger_node_backup Trigger Node Backup
Queue an immediate configuration backup of a node. Oxidized moves the node to the head of its queue; the backup itself runs asynchronously. Check get_node afterwards for the run result, and list_node_versions for a new version if the configuration changed. Oxidized picks the node by name or IP only (no group), so node names must be unique - otherwise the first node with that name is queued.
| Parameter | Type | Description |
|---|---|---|
node * | string | Node name or IP address (e.g. 'core-sw01') |
message | Commit message recorded if this backup produces a new version | |
user | Author name recorded if this backup produces a new version |
reload_nodes Reload Nodes
Reload the Oxidized node list from its source (router.db, SQL, HTTP, ...). Use after devices were added, removed or changed in the source so Oxidized picks up the change without waiting for its next refresh. Always reloads every node: oxidized-web's per-node reload (/reload?node=X) replaces the whole in-memory node list with just the matching nodes, so it is deliberately not offered.