netmiko-mcp-linksys
Manage and monitor a single Linksys LGS-series switch via MCP over stdio, with read diagnostics, masked config access, and narrow dry-run-by-default write tools.
Run allow-listed
showcommands,port_overview, and parsed JSON reads: health summary, port status/counters/deltas, MAC table, LLDP neighbors, and PoE status.Read, back up, and diff the masked running config; inspect audit logs and explore CLI
showhelp.Perform narrow port/PoE writes: enable/disable ports and PoE, set descriptions, port security, storm control, rate limits, PoE cycle, cable diagnostics, and clear counters.
Configure syslog targets, management services (HTTP/HTTPS/Telnet), and system identity.
Create/remove restricted SNMP views, communities, and users when enabled and gated; some SNMP syntax is not live-confirmed.
Save running config to startup config with pre-save snapshots and diffs.
Safety features: dry run by default, protected/caution ports, fixed command sequences, secret redaction, host-key pinning, one SSH session, call budgets/cooldown, and audit logging; no free-form config, VLAN, reboot, or reset tools.
Provides tools for managing a Linksys LGS-series switch over SSH, including allow-listed show commands, port overviews, enabling/disabling ports, toggling PoE, setting port descriptions, and saving configuration.
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., "@netmiko-mcp-linksys show me the port overview on the switch"
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.
lgs-switch-mcp
stdio MCP server for a single Linksys LGS-series switch (developed against the
LGS328PC CLI). Previously published as netmiko-mcp-linksys. The GitHub
repository is WackEarl/lgs-switch-mcp
(the previous path redirects).
This project is a separate wrapper, based on netmiko
and netmiko-mcp by Kirk Byers. The show
tool reuses netmiko-mcp's command filter (netmiko_mcp.security.validate_command)
and the same allow/deny list format (commands.yml). Configuration tools send
only fixed command sequences built by this wrapper; the model never supplies
free-form config. See Credits.
This is 0.4.1, a fix so save_config no longer hangs on the
running-config dump (in #19). 0.4.0 renamed the package and GitHub
repository to lgs-switch-mcp, added GitHub Actions CI, and credited
upstream. The 0.3.2 session handling is included (see
What is new in 0.3.2).
0.3.1 fixed the first live check of 0.3.0 (see
What is new in 0.3.1). 0.3.0 added parsed JSON read tools (health_summary,
port_status, port_counters, counters_delta, mac_table,
lldp_neighbors, poe_status), masked config reads and backups
(config_read, config_backup, config_diff), audit_tail,
show_help, and narrow write tools (port security, storm control, rate
limit, PoE cycle, cable diagnostics, syslog target, management services,
clear counters, system identity). Every write tool defaults to
dry_run=true, takes a masked running-config snapshot before a real
write, checks device output for % and returns a before/after diff.
Device text is redacted fail-closed, line by line. Protected ports are
refused by every new port write tool; caution ports need an explicit
confirmation. See What is new in 0.3.0 and
Retest 0.3.2.
0.2.0 added the unlock-gated SNMP tools; 0.1.x was live-tested on an
LGS328PC with firmware 1.01.02.02 (SSH with ssh-rsa via paramiko 4.0.0;
login lands directly in privilege 15 with prompt LGS328PC#; no banner or
second login prompt). See Live-test status.
Install and run
The intended way to run this server is the packaged entrypoint, pinned to a tag:
uvx --from git+https://github.com/WackEarl/lgs-switch-mcp@v0.4.1 lgs-switch-mcpFrom a local checkout:
uvx --from /path/to/lgs-switch-mcp lgs-switch-mcpThe previous command name netmiko-mcp-linksys still works and prints a
deprecation warning.
The process speaks MCP over stdio. It does not open an SSH session at startup; a connection is made only when a tool is called.
paramiko==4.0.0 is intentional. The target switch speaks ssh-rsa with
SHA-1; paramiko 5.x rejects that host-key algorithm.
A compatibility shim, lgs_mcp.py, exists only for the older hub invocation
python /config/netmiko/lgs_mcp.py. That file is not a standalone
implementation: it imports lgs_switch_mcp (the previous
netmiko_mcp_linksys import still works as a deprecated alias). Prefer the
uvx --from ... lgs-switch-mcp entry above. If you must keep the old
command, add --with git+https://github.com/WackEarl/lgs-switch-mcp@v0.4.1
so the package is installed in that environment.
Related MCP server: cisco-mcp
Environment variables
Variable | Required | Description |
| yes (at tool call) | Switch IP or hostname. |
| yes (at tool call) | SSH username. |
| yes (at tool call) | SSH password. Never logged or returned. |
| yes before | SNMPv2c community string for the new, non-default community. Never a tool argument, never logged or returned (shown as |
| yes ( | Hard gate, off by default. SNMP write tools refuse unless this is exactly |
| no | netmiko device type. Default: |
| yes (at tool call) | Path to an OpenSSH |
| yes before any port write | Comma-separated ports (e.g. |
| no | Comma-separated ports (e.g. |
| yes before | Comma-separated IPv4 addresses that |
| no | Directory for masked config backups and pre-write snapshots. Default |
| no | Directory for small state files ( |
| no |
|
| yes for | Path to a |
| no (recommended) | If set, append JSON lines per tool call: a |
| no | Seconds without new output before a command is given up. Also passed to netmiko as |
| no | Wall-clock seconds one tool call may spend on the switch: waiting for the session lock, connecting and every command. Default |
| no | Seconds a clean SSH session is kept open for the next call, then logged out with |
| no | Seconds the switch gets to close the channel after |
| no | Reconnect protection. After a command timeout or a failed or slow connect, no new SSH connection is opened for this many seconds; the call answers |
| no | Ceiling of the doubling cooldown. Default |
| no | Limit in seconds for one background running-config dump ( |
| no |
|
| no | Debug only. If set, netmiko appends a session log there (mode |
Python 3.12 or newer is required.
mcp-hub entry snippet
Secrets stay in hub template variables. Write tools are gated by the hub
unlock feature (0.12+); maxMinutes: 0 means every call needs a fresh
approval. See Unlock classes for the
proposed per-tool classes; the snippet below gates every write tool with
maxMinutes: 0, which is the safe default for a hub that supports only
one unlock block per server. Keep SWITCH_SNMP_WRITE_ENABLED unset (the tools refuse)
until the community-create syntax has been confirmed live; only then set it to 1 in the
hub env (shown below as the value to use after that confirmation). Fill SWITCH_PROTECTED_PORTS after the first read test —
until it is set to a valid list, disable and PoE-off are refused.
The snippet below is the current production pin (@v0.4.1 and the new
command name). The previous command netmiko-mcp-linksys remains a
deprecated alias.
{
"switch": {
"command": "uvx",
"args": [
"--python", "3.12",
"--from", "git+https://github.com/WackEarl/lgs-switch-mcp@v0.4.1",
"lgs-switch-mcp"
],
"env": {
"SWITCH_HOST": "192.0.2.10",
"SWITCH_USER": "${SWITCH_USER}",
"SWITCH_PASSWORD": "${SWITCH_PASSWORD}",
"SWITCH_SNMP_COMMUNITY": "${SWITCH_SNMP_COMMUNITY}",
"SWITCH_SNMP_WRITE_ENABLED": "1",
"SWITCH_DEVICE_TYPE": "cisco_s300",
"SWITCH_KNOWN_HOSTS": "/config/netmiko/known_hosts",
"SWITCH_PROTECTED_PORTS": "<uplink and management ports, e.g. 0/24>",
"SWITCH_CAUTION_PORTS": "<ports that need confirm_caution_port, e.g. 0/15>",
"SWITCH_SYSLOG_ALLOWED": "<syslog receiver IPv4, e.g. 192.0.2.20>",
"SWITCH_BACKUP_DIR": "/data/netmiko/backups",
"SWITCH_STATE_DIR": "/data/netmiko/state",
"SWITCH_PRE_WRITE_SNAPSHOT": "required",
"NETMIKO_MCP_COMMAND_FILE": "/config/netmiko/commands.yml",
"SWITCH_AUDIT_LOG": "/data/netmiko/switch-audit.log",
"SWITCH_READ_TIMEOUT": "60",
"SWITCH_CALL_BUDGET": "45",
"SWITCH_SESSION_IDLE": "10",
"SWITCH_LOGOUT_TIMEOUT": "3",
"SWITCH_COOLDOWN_BASE": "30",
"SWITCH_COOLDOWN_MAX": "600",
"UV_CACHE_DIR": "/data/uv-cache",
"UV_PYTHON_INSTALL_DIR": "/data/uv-python",
"UV_TOOL_DIR": "/data/uv-tools",
"PATH": "/usr/local/bin:/usr/bin:/bin",
"HOME": "/home/node"
},
"unlock": {
"tools": [
"save_config",
"mgmt_services_set",
"snmp_view_create",
"snmp_write_view_create",
"snmp_community_create",
"snmp_community_remove",
"snmp_user_remove",
"port_disable",
"poe_disable",
"poe_cycle",
"port_security_set",
"storm_control_set",
"rate_limit_set",
"cable_diag",
"syslog_set",
"clear_counters",
"system_identity_set"
],
"maxMinutes": 0
}
}
}Paths under /config are read-only inside the hub container; put the audit
log, the backup and state directories (and an optional
SWITCH_SESSION_LOG) under /data.
Free (not gated): show, port_overview, all parsed read tools,
config_read, config_backup, config_diff, audit_tail, show_help,
port_set_description, port_enable, poe_enable.
Unlock classes (proposal)
The hub locks per tool, not per parameter; that is why 0.3.0 splits
port_set_admin_state / poe_set into enable and disable tools. Proposed
classes for the hub entry (needs a hub that supports more than one
unlock block per server; until then use maxMinutes: 0 for all):
Class | Tools |
Free | all read tools except |
Unlock, short slot (about 15 minutes) |
|
Unlock, |
|
A dry run of a gated tool also needs the unlock, because the hub cannot
see the dry_run parameter. That is intended: the dry run reads the
device.
Copy examples/commands.yml to NETMIKO_MCP_COMMAND_FILE. Create
SWITCH_KNOWN_HOSTS yourself from a verified host key; do not use
examples/known_hosts as-is (it is a placeholder, not a real key).
Tools
Tool | Effect | Saved? |
| Allow-listed show command via | n/a |
| Read-only bundle of | n/a |
|
| no |
|
| no |
|
| no |
|
| no |
| The LGS cannot show its startup-config. Dry run: masked diff from the running-config stored at the last save through this server to the current running-config, and the | yes |
| Add one included subtree from a fixed OID allowlist ( | no |
| Add one writable column to a write view: | no |
| Create a v2c community from | no |
| Remove | no |
| Remove | no |
All SNMP tools also take dry_run=True (default): the read-only
prechecks run and the commands of the first configuration step are
returned; nothing is sent.
New in 0.3.0, read-only (JSON output, include_raw=true adds the
redacted device text where offered):
Tool | Reads |
| One session: |
| Per port: link, speed, duplex, description, VLANs, PoE (W/class/status), LLDP neighbor. |
|
|
| Difference since the previous call (baseline in |
|
|
|
|
|
|
| Masked |
| Stores the masked running-config as |
| Masked diff from the running-config stored by the last |
| Last |
| Types |
New in 0.3.0, writes (all dry_run=True by default, none saves):
Tool | CLI (LGS ISS manual) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Privileged exec |
|
|
Port write tools take confirm_caution_port (see SWITCH_CAUTION_PORTS).
Single ports only; interface range is not supported.
There are no VLAN, reboot, or reset tools.
Port format: 0/1 … 0/28 (no leading zeros). PoE: 0/1 … 0/24.
The interface prefix the switch prints is accepted and normalised before
any check: Gi0/15, gi 0/15 and GigabitEthernet0/15 become 0/15
(protected and caution ports apply to the normalised port).
Descriptions: 1–32 characters from [A-Za-z0-9 ._-], with no leading or
trailing spaces. Quotes are not allowed in the input, so the wrapper's
own quoting cannot be broken out of.
Security model
Default deny for
show. Only commands listed inallowed_commandsrun;denied_commandsalways wins. The allow list does not expand abbreviations (sh sys infois notshow system information). See the netmiko-mcp 0.3.0 validator docs. The wrapper also rejects|,;, and newlines before that filter runs (allow_pipeis not honoured).No free-form config. Interface commands are built only by this package. The only other config sequence is the fixed best-effort
set cli pagination offat session start (see Paging).No VLAN, reboot, or reset tools.
Protected ports, fail-closed.
SWITCH_PROTECTED_PORTSblocksport_disableandpoe_disable, and every direction of the other port write tools (port security, storm control, rate limit, PoE cycle, cable diagnostics, clear counters on a named port) and, since 0.3.1,port_set_description.port_enableandpoe_enablestay allowed. If the variable is unset, empty, or contains an invalid port identifier, those tools refuse every port.Caution ports.
SWITCH_CAUTION_PORTSports needconfirm_caution_port=truefor every port write (the description included since 0.3.1); the flag is in the audit log.Dry run by default. Every write tool (including
save_configand the SNMP tools) defaults todry_run=true: it returns the exact CLI lines, the current state and the expected state, and sends nothing.Snapshot, error check, diff. A real write stores a masked running-config snapshot first (
SWITCH_PRE_WRITE_SNAPSHOT; not forpoe_cycle,cable_diagandclear_counters, which leave the config unchanged), sends with%as netmikoerror_pattern(it stops at the first rejected line), reads the state back and returns a before/after diff.Host-key pinning.
ssh_strict=True,system_host_keys=False,use_keys=False,allow_agent=False, key file fromSWITCH_KNOWN_HOSTS.No connection at startup. Missing or dummy environment is enough for
initializeandtools/list.One session per tool call, serialized with a process-wide lock.
No automatic save. Running-config changes die on reboot until
save_config. In the hub,save_configand the SNMP write tools must be gated byunlock.Audit log records time, tool, parameters, allow/deny, and a short result (
ok,dry run, or the error), plus a start line per call so a call cut off by a hub timeout or restart stays visible. Passwords are redacted from parameters, results, and error text (***). The SNMP community (SWITCH_SNMP_COMMUNITY) is redacted as[REDACTED], includingshow snmp communitylistings.Fail-closed redaction of device text (0.3.0). On top of the exact secrets above, all device output (tool results, config backups and snapshots, error text, session log) goes through line rules: PEM blocks and long key blobs are removed;
snmp community|targetparams|group|userlines keep only their keywords (SNMPv3 auth/priv keys masked);password|secret|key <value>is masked to the end of the line;Label : valuelines whose label names a secret keep only status vocabulary (Enabled, MD5, None, …). Any other line that still containspassword|key|secret|community|auth|privis replaced by[REDACTED-LINE].show radius serveris strict: onlyLabel : valuelines survive, other lines become[REDACTED-LINE](lines are replaced, never dropped, so an empty result means the device printed nothing). Parsers run on redacted text. Audit failures never abort a tool; they are reported on stderr and as anaudit_warning:line in the result.paramiko 4.0.0 for
ssh-rsa/SHA-1 host keys. Do not bump to 5.x without a live SSH check.
Paging
The LGS CLI (ISS-based firmware) pages long output. netmiko's cisco_s300
driver sends terminal datadump, which this firmware does not honour, and
set cli pagination off is rejected in privileged exec. This package
therefore:
Tries
set cli pagination offin Global Configuration mode (configure terminal…end) at the start of each session, best effort. A rejection only logs one warning. The setting is a CLI display option; it would only persist ifsave_configis run afterwards. SetSWITCH_PAGING_OFF=0to skip it.Runs every exec command (
show, read-backs,save) through its own read loop: when the last visible line is a pager prompt (--More--,-- More --,--More-- (NN%),More: <space>, Quit: q …,<--- More --->,Press any key to continue) it sends one space, and it finishes on the real prompt (<hostname>#). Pager text, backspaces, ANSI sequences, orphaned ESC bytes, other control characters, the command echo, and the trailing prompt are stripped. Blank lines directly before or after a page break (the pager's erase sequence, which netmiko turns into newlines, and trailing blanks at the end of a page) are dropped; blank lines elsewhere in the output are kept.Gives up after
SWITCH_READ_TIMEOUTseconds without new output. The error contains the last visible line, so an unknown pager prompt can be added.For
saveonly: if the last visible line ends in a Y/N confirmation ((y/n),[Y/N],(yes/no), optionally followed by:or?), it answersyonce. A second confirmation is not answered and fails. Any other prompt (for exampleAre you sure?or[confirm]) is not answered and runs into the timeout;save_configthen reports that whether startup-config was written is unknown.showand read-backs never answer a confirmation. The real LGS328PC save prompt is not live-confirmed (#4).
SNMP tools
These tools exist so Home Assistant can use a non-default SNMPv2c
community that is read-write (or read-only) but restricted to IF-MIB,
and so the default public / private communities and the default v3
user noAuthUser can be removed afterwards. They send only fixed
command sequences; there is no generic SNMP configure tool.
Creating a column in a write view (snmp view <view> <column> included) and reading it back from show snmp viewtree were confirmed
in the 0.2.0 live check. Community create/remove syntax and the SNMP
read/write path through an external client are not live-confirmed.
SWITCH_SNMP_WRITE_ENABLED should stay unset (or anything other than
1) until then; the tools fail closed. The
command templates live in src/lgs_switch_mcp/snmp_cli.py and
cite their source. The primary source is the official Linksys LGSXXX
CLI User Manual, chapter 19
(MAN_LGSXXX_LNKPG-00878_Rev_A00.pdf):
snmp view <ViewName> <OIDTree> included
snmp view <ViewName> <OIDTree> excluded
snmp group <GroupName> user <UserName> security-model v2c
snmp access <GroupName> v2c read <ReadView> write <WriteView|none> notify none
snmp community name <CommunityName> security <SecurityName>
no snmp community name <CommunityName>
no snmp user <UserName>
show snmp community
show snmp viewtree
show snmp group
show snmp group access
show snmp userView names are compared exactly (case-sensitive). A view name that
differs from an existing view only in letter case (for example wv and
WV) is refused, because it is not confirmed whether the switch treats
view names case-sensitively.
This is not Cisco IOS (snmp-server community X view V rw). Generic
Aricent ISS documentation (Super Micro SNMP Configuration Guide, Cisco
Skylight/Flex SNMP commands) often uses snmp community index <Index> name <Name> security <Security> and a volatile|nonvolatile storage
flag. The tools use the Linksys form without index and without
that flag. If the device rejects a command, stop and confirm the ISS
variant live; do not guess.
The community string is only read from SWITCH_SNMP_COMMUNITY (8–32
characters from [A-Za-z0-9_], not public/private). It is never a
tool argument and is not reused as the group or security name (those are
derived as <view>_grp / <view>_sec). It is replaced with [REDACTED]
in tool output, audit entries, and exceptions, including re.escape/repr
forms and a wrapped snmp community name … security span. An invalid env
value is not used for redaction (and is warned at startup). SNMP write
tools disable the netmiko session log for that session so a community
echo cannot sit in the log in the clear. The show tool also disables
the session log for show snmp community, show snmp viewtree, and
show snmp user. show snmp community output is redacted even when it
is run through the show tool; session-log Community Name fields are
masked by label even when the name is not the configured secret.
Validation failures never echo the secret.
Suggested order, each call unlock-gated:
snmp_view_create("<view>", "interfaces")— OID1.3.6.1.2.1.2snmp_view_create("<view>", "ifmib")— OID1.3.6.1.2.1.31snmp_view_create("<view>", "power-ethernet")— OID1.3.6.1.2.1.105, so HA can read PoE state and budgetFor
rwonly:snmp_write_view_create("<view>_w", "ifAdminStatus"),snmp_write_view_create("<view>_w", "ifAlias")and, for PoE switching,snmp_write_view_create("<view>_w", "pethPsePortAdminEnable")snmp_community_create("<view>", "rw", "<view>_w")(orsnmp_community_create("<view>", "ro"))snmp_community_remove("public")thensnmp_community_remove("private")— refused unless the configured community is present and mapped to a read view whose included subtrees are only on that allowlist (notiso/ the whole tree) and, if it has write access, to a separate write view that passes the write-view check belowsnmp_user_remove("noAuthUser")save_configwhen you are ready to persist
Read/write view split
A RW community never writes through its read view. snmp access names a
separate write view (manual p. 103: read <ReadView | none> write <WriteView | none>), so the read view holds whole MIB subtrees (IF-MIB,
ifMIB, POWER-ETHERNET-MIB) while the write view holds only the writable
columns. A write view passes the check (before
binding, after snmp_write_view_create, after snmp_community_create,
and before snmp_community_remove) only if, in show snmp viewtree:
every entry of the view has an explicit
included/excludedtype, an OID in a known format and an exact mask (see below);it includes at least one subtree, and its included subtrees are only the columns
1.3.6.1.2.1.2.2.1.7(ifAdminStatus),1.3.6.1.2.1.31.1.1.1.18(ifAlias) and1.3.6.1.2.1.105.1.1.1.3(pethPsePortAdminEnable), never a whole MIB such as1.3.6.1.2.1.2or1.3.6.1.2.1.105and never an instance;it is not the same view as the read view.
Excluded entries (for example from an older build) only narrow a view and are accepted, but none are required or sent.
snmp_write_view_create sends one line, snmp view <view> <column> included, with netmiko error_pattern="%" (ISS error lines start with
%), then reads show snmp viewtree back and runs the check above. If
the column was already there, nothing is sent. On any error after
sending, the column added by this call is removed again (no snmp view <view> <column>) and show snmp viewtree must match the state before
the call exactly; otherwise the result says ROLLBACK NOT VERIFIED and
the view must not be bound to a community. A column that existed before
the call is never removed. The rollback is the only place that sends
no snmp view.
OIDs from show snmp viewtree go through one normalization
(oid_arcs): whitespace, one leading dot, a leading iso (= 1, only
when followed by 3) and trailing dots are accepted, so .1.3.6.1…,
iso.3.6.1… and 1.3.6.1… are the same OID; iso.1.3.6.1…, a bare
iso and other variants are refused instead of reinterpreted. Prefixes are compared by whole arcs, so
1.3.6.1.2.1.105 is not below 1.3.6.1.2.1.10. Any other format makes
the check refuse (fail-closed), in the read-view precheck as well.
Masks follow RFC 3415: bit n belongs to sub-identifier n, a missing
or short mask is extended with ones, and bits beyond the OID length do
not matter. A mask is exact when every bit that covers an arc of the OID
is 1. Accepted spellings: empty / none / -, dotted bits (1,
1.1.1) and hex octets (ff, ff:e0, 0xffe0). The 0.2.0 live check
showed that after adding a column, the switch prints a mask with one 1
per arc (Subtree Mask : 1.1.1.1.1.1.1.1.1.1.1 for
1.3.6.1.2.1.105.1.1.1.3) and Storage Type : Non-volatile immediately.
The earlier read-only check printed Subtree Mask : 1 for OID 1. A
hex mask such as ff:e0 for an 11-arc column is also accepted, while a
mask with a 0 inside the OID (a wildcard, such as ff:c0 for an 11-arc
OID) is refused.
The viewtree parser reads the layout from the network admin's read-only check:
View Name : iso
Subtree OID : 1
Subtree Mask : 1
View Type : Included(no leading dot, no iso., with a mask; the views on the switch are
iso and restricted). Blocks are split on ----- lines and before
every View Name line, so blank-line separated blocks work too.
After a create, the access entry must name exactly the requested read and write views. A failed check before sending refuses; after sending it is reported as "Configuration was sent, verification failed". Read views are also refused if any of their entries has an unrecognised mask.
PoE over SNMP
Home Assistant reads bandwidth counters from IF-MIB / ifMIB and PoE
state (detection status, power budget) from POWER-ETHERNET-MIB
1.3.6.1.2.1.105, which is not inside IF-MIB, through the read view.
It switches ports with ifAdminStatus (1.3.6.1.2.1.2.2.1.7), sets
descriptions with ifAlias (1.3.6.1.2.1.31.1.1.1.18), and turns PoE
on or off with pethPsePortAdminEnable (1.3.6.1.2.1.105.1.1.1.3)
through the write view (decision in Vikunja task 48). Only that PoE
column is writable, never the whole PoE MIB.
pethPsePortTable is indexed by
pethPsePortGroupIndex.pethPsePortIndex, which need not equal the port
number or the ifIndex. Whether the LGS328PC implements
1.3.6.1.2.1.105 (or only a vendor MIB) is unconfirmed; if it does not,
the fallback is PoE read-only (no pethPsePortAdminEnable in the write
view).
Note on 0/15: 0/15 feeds a LINOVISION EoC converter that powers the Zigbee router at the far end over PoE. Do not turn PoE (or the port) off on 0/15, or the Zigbee router goes down. The owner decided against a hard lock (task 48, comment 69): 0/15 is not in
SWITCH_PROTECTED_PORTS. Since 0.3.0 it can be listed inSWITCH_CAUTION_PORTS, so the CLI port write tools needconfirm_caution_port=true; SNMP does not block it. In Home Assistant its PoE and port switches should be disabled.
SNMP and protected ports
The protected ports are only protected at tool level.
SWITCH_PROTECTED_PORTS (production: 0/10, which powers the Unraid
server through a PoE splitter, and 0/24, the uplink) is enforced by
the tools of this server: port_disable, poe_disable and the 0.3.0
port write tools refuse those ports, and refuse every port if the
variable is unset, empty or invalid (fail-closed). This server has no
tool that writes SNMP values itself.
There is no protection at SNMP level (the owner's decision of
2026-11-13; earlier builds excluded the protected ports in the write
view, which needed live ifIndex / PoE index mappings). The write view
makes ifAdminStatus, ifAlias and pethPsePortAdminEnable writable
for every port. Anyone who has the write community can switch off
0/10 or 0/24 (or cut their PoE) with a direct SNMP SET, past these tools;
the switch then needs local access to recover. Therefore:
keep the write community secret and use it only where it is needed (Home Assistant); give everything else a read-only community;
keep the write view to the columns that are really used (leave out
pethPsePortAdminEnableif PoE switching is not needed);restrict UDP/161 at the firewall to the hosts that need it (the network admin handles the ACL as a separate work package); these tools set no source-IP /
transporttagrestriction;disable the HA switches for 0/10, 0/24 and 0/15.
Live-test checklist (network admin)
Confirmed in the 0.2.0 live check (see Live-test status):
Refused config lines print an error starting with
%(% Invalid input detected at '^' marker).show snmp viewis an alias ofshow snmp viewtree.After
snmp_write_view_create,show snmp viewtreeprints the column OID as given (no leading dot), a mask of one1per arc (1.1.1.1.1.1.1.1.1.1.1for1.3.6.1.2.1.105.1.1.1.3),View Type : Included, andStorage Type : Non-volatileimmediately, withoutsave_config. The column is accepted without a mask in the create command.
Still unconfirmed:
Exact syntax: does
snmp community name … security …work, or is the ISSindexform required? (The switch lists communities under a Community Index, so theindexform may be needed.) Isnotify none/write noneaccepted?Storage type of a new group / community and whether
save_configactually persists them (new views are already Non-volatile).Whether
enable snmpagentis required first.Exact
show snmp community,show snmp group,show snmp group access, andshow snmp userlayouts (the parsers assume ISSKey: valueblocks separated by-----;show snmp viewtreeis confirmed, see above).Exact spelling of the default communities and of
noAuthUser.SET of
ifAliaswith the new view.That
no snmp view <view> <oid>removes exactly that entry (used for rollback; not triggered in the 0.2.0 check).That a GET/WALK of
1.3.6.1.2.1.105works with the community and a SET ofpethPsePortAdminEnableandifAdminStatusworks on a free port (e.g. 0/18) through an external SNMP client. If PoE SET fails, fall back to PoE read-only. Do not SET 0/10 or 0/24: nothing at SNMP level stops it.Confirm leftover
public/private/noAuthUserare gone, and that the session log and tool output never contain the community.Terminal width:
cisco_s300session_preparationalready sendsterminal width 511. Confirm that is in effect (no extra width command is sent by these tools) and thatsnmp communitylines do not wrap mid-secret in a way that a later live check would miss.
What is new in 0.3.0
Breaking:
port_set_admin_stateandpoe_setare replaced byport_enable/port_disableandpoe_enable/poe_disable, so the hub can lock the disabling direction only. Every write tool, includingport_set_description,save_configand the SNMP tools, now defaults todry_run=true; callers must passdry_run=falseto change anything. Write results are JSON.New read and write tools (see Tools).
New
commands.ymlentries (read-only):show logging-server,show security-suite,show access-lists [*],show port-isolation status,show monitor [*],show ip dns name-server,show clock properties,show dot1x [*],show radius server(strict redaction),show rmon [*],show qos global info,show priority-map,show class-policy,show scheduler,show ip igmp snooping [*],show ipv6 mld snooping [*],show voice vlan,show ipv6 interface,show ipv6 route,show cli,show history,show ip http secure server status.show running-config,show startup-config,show current*, cable diagnostics, othershow radiuscommands and the broad SNMP dumps stay denied forshow.Not included on purpose: port mirroring (an automatic removal after N minutes cannot be guaranteed by a stdio server that the hub stops when idle), management ACLs (lock-out risk; a click guide instead), TFTP config export (only needed if
show running-configdoes not exist on this firmware), environment / SFP values (no CLI command in the manual; find them withshow_helpfirst), speed/duplex, VLANs, users/passwords, reboot/reset, SSH off, Telnet on, LAG/STP,interface range, free-form config.
What is new in 0.3.2
Fixes from the read-only retest of 0.3.1. After that retest the switch's SSH service stopped answering; 0.3.2 rebuilds the session handling so the server cannot pile up SSH sessions on the switch:
SSH sessions: at most one SSH session to the switch at a time, shared by tool calls and the background config dump. A clean session is kept for
SWITCH_SESSION_IDLEseconds (default 10) and reused, then logged out withexit. A session that ends in a timeout is aborted (Ctrl-C, pager quit, output drained), logged out withexit(endfirst in config mode) withinSWITCH_LOGOUT_TIMEOUT, and only then is the transport closed hard. No session is ever left open.Connect leak: netmiko kept an authenticated SSH transport open when opening the shell channel failed during connect (the connection object never reached the caller). The connection is now opened in two steps so a failed connect is always closed.
Reconnect protection: after a command timeout or a failed or slow connect no new connection is opened for
SWITCH_COOLDOWN_BASEseconds (default 30, doubling per failure up toSWITCH_COOLDOWN_MAX, default 600; kept across restarts). Calls answerSwitch cooling down …; retry in Nsat once. Nothing retries automatically; the only exception ispoe_cycleswitching PoE back on once after a failed cycle.Shutdown: on process end (stdin closed, SIGTERM, SIGHUP) the kept session is logged out.
Timeouts and the session hang: a call that outlived the caller's request timeout (MCP
-32001) kept the session lock, and every later call queued behind it, also afterwake_server. Every call now has a wall-clock budget (SWITCH_CALL_BUDGET, default 45 s) for the lock wait, the connect and each command, also while a device keeps sending. The lock wait is bounded, so a hung call cannot block later calls.config_read / config_backup / config_diff: the running-config dump runs in the background; a slow dump answers
Pendinginstead of running into the caller's timeout, and the next call gets the result.PoE parser:
admin(columnState) andauto_class(from the Power Limit Type) are filled for the live LGS328PC layout.Ports:
Gi0/15-style ports are accepted everywhere a switch port is a parameter, normalised to0/15before the protected and caution port checks.health_summary: an environment show that is not on the allowlist is named in
environment_skippedinstead of being left out silently.audit_tail:
unfinishedentries carryage_ms.
What is new in 0.3.1
Fixes from the first live check of 0.3.0 on the LGS328PC (firmware 1.01.02.02, read tools only):
Config reads: the running-config is read with
show current running-config. The LGS has no show command for the startup-config:config_read("startup")/config_backup("startup")answerNot available:without sending anything. The pre-write snapshot uses the running-config, soSWITCH_PRE_WRITE_SNAPSHOT=requiredworks again.save_config / config_diff: a real
save_configstores the masked running-config it saves (tagpre-save); that copy is the baseline forconfig_diffand for the next save's diff. Saves done outside this server are not seen;Config Save Statusis always returned.PoE parser: the Port column holds
1–24; multi-word columns (Power Limit Type,Auto Class,Max Power(W)) no longer leak into the power, class or device fields. New fieldsmax_power_w,auto_class,limit_type.VLAN parser:
show vlankey/value blocks (Vlan ID : 1,Member Ports : …,Untagged Ports : …, wrapped lines,Poports);port_statusreports aparse_warningwhen nothing is recognised.Allowlist (
examples/commands.yml):show monitor allandshow monitor session *instead of the incompleteshow monitor;show priority-map in-priority-typeinstead ofshow priority-map;show versionmoved to the deny list (invalid on the LGS); newshow device temperature,show system fan,show system utilization, also read byhealth_summary. There is noshow authorized-manager(norshow env*,show cpu*,show memory*).show_help: a
snmp SNMP informationhelp line was hidden as[REDACTED-LINE](it looked like an SNMP config line). Help entries without a sensitive word are kept now; the other rules are unchanged.show radius server: returned an empty result live. Strict redaction replaces lines but never removes them, so the device printed nothing (no RADIUS server configured), even though 802.1X uses RADIUS.
Audit: every call writes a start line; a call that never returns (hub timeout
-32001, restart) shows up asunfinishedinaudit_tail. Result lines carrycall_idandduration_ms.port_set_description: refuses protected ports and needs
confirm_caution_port=trueon caution ports (behaviour change).Tool descriptions name the configured protected and caution ports (read from
SWITCH_PROTECTED_PORTS/SWITCH_CAUTION_PORTSat start).mac_table: the listing showed 54 entries (with the device's own total line),
show mac-address-table countreported 85 dynamic addresses. The listing is complete, so the gap is the device's counting;count_notereports it instead of guessing.
Retest 0.3.2 (network admin)
config_read(): masked running-config, orPendingfirst and the result on the next call. No hub timeout. Thenconfig_backup()andconfig_diff().show users: a result or a tool error within about 45 s, no-32001; right after itshow clockworks.health_summary:environment.fanpresent (deployedcommands.ymlneedsshow system fan status), orenvironment_skippedsays why.poe_status:adminandauto_classfilled.port_counters(port="Gi0/15")works likeport="0/15"; write tools withdry_run=truerefuseGi0/10andGi0/24as protected ports.audit_tail: finished calls withduration_ms, cut-off ones asunfinishedwithage_ms.Sessions: restart the MCP server once after the update so SSH sessions left by 0.3.1 are gone, and check in the switch's web UI that no old SSH sessions remain. Two read calls within 10 s use one login (audit log, switch log); about 10 s after the last call the session is gone again.
Cooldown: one
show usersthat runs into the call budget is followed bySwitch cooling down …; retry in 30sfor the next call, without a new login. After the cooldown one call works again.
Retest 0.3.1 (network admin)
config_read()returns the masked running-config;config_read("startup")answersNot available. No secret visible in the config.config_backup(), thenconfig_diff()(no baseline yet: only the status).poe_status,health_summary,port_statuswithinclude_raw=true: PoE ports, VLANs andenvironmentfilled,parse_warningsempty.show monitor all,show priority-map in-priority-type vlanPri(andipDscp),show device temperature,show system fan status,show system utilization;show versionis refused.show_help(""): no[REDACTED-LINE]betweensecurity-suiteandsnmp-server.audit_tail: start and result lines folded,duration_mspresent.The write checks 7–13 of the 0.3.0 list below (not run yet), including
save_config(now: stored copy and diff to the previous save).
Live test 0.3.0 (network admin)
Results of the first check (read tools only) are in "What is new in 0.3.1"; points 7–13 are still open. The original list, in this order:
show running-configandshow startup-configexist (config_readfor both). Result: onlyshow current running-configexists, no startup show (fixed in 0.3.1).config_readoutput: no secret is visible (communities, SNMPv3 keys, user passwords, RADIUS key, certificates); structure stays readable.Parsers against real output:
health_summary,port_status,port_counters,mac_table,lldp_neighbors,poe_statuswithinclude_raw=true;parse_warningsshould be empty.New
showentries from the list above, one by one; especially thatshow radius serverhides the key.show_help(""),show_help("interfaces"): help listing comes back, the prompt is clean afterwards, nothing is executed. Then look forshow env*,show cpu*,show memory*,show storm-control*,authorized-manager.counters_deltatwice (baseline, then delta).Dry runs of every write tool; then on a free port (e.g. 0/18), with
dry_run=false:port_security_set(limit, then off),storm_control_set(then off),rate_limit_set(then off),poe_cycle,cable_diag,clear_counters("0/18"). Confirm the read-backs and the interface block of the running-config.syslog_setto the allow-listed receiver, thenenabled=false: doesno logging-server …with the full arguments remove the entry?system_identity_set(location=…, contact=…); quoting of values with spaces.nameonly if a prompt change is acceptable (the prompt is re-detected; a broken session afterwards would show here).mgmt_services_set(https=true), check HTTPS in a browser, thenmgmt_services_set(http=false); read-back wording ofshow ip http secure server status(Enabled/Disabled).clear_counters()without port: does it ask for a confirmation?save_config(dry_run=true), thendry_run=false: stored copy of the saved running-config, diff andConfig Save Status; the save prompt (#4).Protected ports: every port write tool except
port_enableandpoe_enablerefuses the protected ports (port_set_descriptionincluded since 0.3.1); caution ports needconfirm_caution_port=true.audit_tailshows the calls above, without secrets.
Live-test status
Confirmed on LGS328PC, firmware 1.01.02.02, in the 0.2.0 live check (network admin, commit 177dc84, 2026-11-13):
Device error lines start with
%(example:% Invalid input detected at '^' marker).snmp view <view> <column> included(no mask) is accepted for a write-view column such as1.3.6.1.2.1.105.1.1.1.3or1.3.6.1.2.1.2.2.1.7.show snmp viewtreeprintsSubtree OID : 1.3.6.1.2.1.105.1.1.1.3/Subtree Mask : 1.1.1.1.1.1.1.1.1.1.1(one1per arc),View Type : Included,Storage Type : Non-volatileimmediately (nosave_config),Row Status : Active.show snmp viewis an alias ofviewtree.port_set_admin_stateandpoe_set(CLI, not SNMP; 0.3.0 replaces them withport_enable/port_disable/poe_enable/poe_disablethat send the same commands) worked on a free port (0/18) and were reversed.
Not verified in that check:
The SNMP read/write path through an external client (GET/WALK of
1.3.6.1.2.1.105, SET ofpethPsePortAdminEnable/ifAdminStatus/ifAlias).Community create/remove syntax (the switch lists communities under a Community Index, so the ISS form with
indexmay be required).no snmp view <view> <oid>removing exactly one entry.
Confirmed on LGS328PC, firmware 1.01.02.02 (0.1.0 and 0.1.1 live tests):
paramiko 4.0.0 negotiates
ssh-rsa/SHA-1; strict host-key check works.Login lands directly in privilege 15 (
LGS328PC#); no enable needed, no banner, no second login prompt.show versiondoes not exist; useshow system information.Read-back
show power inline gigabitethernet 0/Nworks.Read-back
show interfaces gigabitethernet 0/Nworks; output starts with e.g.Gi0/24 up, line protocol is up (connected).The pager loop completes long outputs (
show interfaces status,show power inline,show interfaces gigabitethernet 0/24), tested withSWITCH_PAGING_OFF=0.Error heuristic: after ANSI/control stripping, a line is a failure if it contains
%anywhere (including a same-line prompt such asLGS328PC(config-if)#% Invalid input), or if — after removing a leading prompt (hostname, optional(config…), then#or>) — the remainder is not empty, is not one of the commands just sent (compared after dropping double quotes and collapsing whitespace), and contains the wordErrororInvalid(case-insensitive). Echoed commands such asdescription "Error LED"or the unquoted echodescription Error LEDare skipped. Invalid commands on this firmware return% Invalid input detected(confirmed live).description <two words>unquoted is rejected (% Invalid input detectedat the second word); fixed in 0.1.2 by quoting.
Still to confirm with 0.1.2:
Quoted
description "<text>"is accepted and shown without quotes inshow interfaces description. The exact table layout of that command is assumed (Cisco/ISS-style fixed-widthDescriptioncolumn,Gi0/Nrows) and should be confirmed live.Page breaks without leftover ESC bytes or blank lines.
Whether
set cli pagination offin config mode is accepted.The other interface tools (
shutdown,power inline …) and the output ofsave, including whether it asks for a confirmation and its exact text (#4).Hub
unlockbehaviour forsave_config.
Credits
This repository's own code is licensed under the MIT License (LICENSE).
It is not a fork of the projects below. It depends on them at runtime and
follows netmiko-mcp's commands.yml format; their sources are not vendored
here. Copyright notices are also in NOTICE.
netmiko by Kirk Byers, MIT License
netmiko-mcp by Kirk Byers, Apache License 2.0
Development
uv sync --extra dev
uv run --extra dev pytestPinned runtime dependencies: netmiko==4.8.0, paramiko==4.0.0,
netmiko-mcp==0.3.0, mcp==2.3.0.
Available Tools
34 toolsaudit_tailA
Last n (1..500) audit log entries (JSON lines), redacted again on read. A call that has a start record but no result (hub timeout, restart) is listed with result 'unfinished' and age_ms since its start; finished calls carry duration_ms.
Inputs: n. Returns: result
cable_diagA
Run the cable diagnostic (TDR) on one port. Active test: it can drop the link for a few seconds. Protected ports are refused. The command stays denied for the show tool and only runs here. dry_run=true by default.
SWITCH_PROTECTED_PORTS is unset or invalid: port writes that check it are refused on every port (fail-closed). Caution ports (SWITCH_CAUTION_PORTS): none.
Inputs: port (required), dry_run, confirm_caution_port. Returns: result
clear_countersA
Reset interface counters for one port or all ports (port omitted). Protected ports are refused when named. Also resets the counters_delta baseline. dry_run=true by default.
SWITCH_PROTECTED_PORTS is unset or invalid: port writes that check it are refused on every port (fail-closed). Caution ports (SWITCH_CAUTION_PORTS): none.
Inputs: port, dry_run, confirm_caution_port. Returns: result
config_backupA
Store the masked running-config under SWITCH_BACKUP_DIR as YYYY-MM-DD_HHMM_running[_tag].cfg; returns path, SHA256 and the diff to the previous running backup. source='startup' is not available on this device. Like config_read, a slow dump answers 'Pending' first.
Inputs: tag, source. Returns: result
config_diffA
Unsaved changes, as far as this device allows: the startup-config cannot be read, so the masked running-config is diffed against the copy save_config stored at the last save through this server (tag pre-save in SWITCH_BACKUP_DIR). Also returns the Config Save Status from show system information. Saves done outside this server are not seen.
Inputs: no named parameters. Returns: result
config_readA
Return the masked running-config ('show current running-config'; secrets replaced by [REDACTED] / [REDACTED-LINE]). source='startup' answers 'Not available': the LGS CLI cannot show the startup-config. The show tool keeps both denied. The dump runs in the background: if it takes longer than one call, the answer is 'Pending' and the next call returns it (with read_at and age_seconds).
Inputs: source. Returns: result
counters_deltaA
Difference of the interface counters since the last counters_delta call (state kept in SWITCH_STATE_DIR). The first call stores the baseline. Detects new errors without clear counters.
Inputs: port. Returns: result
health_summaryA
Daily health view in one session, as JSON: uptime, config save status, PoE budget/consumption, ports up/down with speed/duplex, only ports with error/discard counters > 0, the last log entries, and temperature, fan and CPU/memory load (show device temperature, show system fan status, show system utilization) when the allowlist has them.
Inputs: include_raw, log_entries. Returns: result
lldp_neighborsB
LLDP neighbors as JSON (local port, device id, port id, capability).
Inputs: include_raw. Returns: result
mac_tableB
MAC address table as JSON (show mac-address-table and its count), optionally filtered by port or MAC address.
Inputs: mac, port, include_raw. Returns: result
mgmt_services_setA
Harden management services: HTTP on/off, HTTPS on/off, Telnet off. SSH cannot be changed and Telnet cannot be enabled. HTTP is only disabled after HTTPS was read back as Enabled (in the same session, after an HTTPS enable from this call). dry_run=true by default. Does not save.
Inputs: http, https, dry_run, disable_telnet. Returns: result
poe_cycleA
Power-cycle the device on a PoE port: PoE off, wait off_seconds (2..60), PoE on. PoE is switched on again even if the wait or the session fails (finally, then one retry in a new session). Protected ports are refused hard. dry_run=true by default. Does not save.
SWITCH_PROTECTED_PORTS is unset or invalid: port writes that check it are refused on every port (fail-closed). Caution ports (SWITCH_CAUTION_PORTS): none.
Inputs: port (required), dry_run, off_seconds, confirm_caution_port. Returns: result
poe_disableA
Disable PoE on a copper port. Protected ports are refused (fail-closed). dry_run=true (default) only shows commands and current state. Does not save.
SWITCH_PROTECTED_PORTS is unset or invalid: port writes that check it are refused on every port (fail-closed). Caution ports (SWITCH_CAUTION_PORTS): none.
Inputs: port (required), dry_run, confirm_caution_port. Returns: result
poe_enableA
Enable PoE on a copper port (0/1..0/24). Allowed on protected ports. dry_run=true (default) only shows commands and current state. Does not save.
SWITCH_PROTECTED_PORTS is unset or invalid: port writes that check it are refused on every port (fail-closed). Caution ports (SWITCH_CAUTION_PORTS): none.
Inputs: port (required), dry_run, confirm_caution_port. Returns: result
poe_statusB
PoE as JSON: budget, consumption and per-port admin/status/W/class.
Inputs: include_raw. Returns: result
port_countersC
Interface counters as JSON for all ports or one port.
Inputs: port, include_raw. Returns: result
port_disableA
Disable a switch port (shutdown). Protected ports are refused (fail-closed). dry_run=true (default) only shows commands and current state. Does not save.
SWITCH_PROTECTED_PORTS is unset or invalid: port writes that check it are refused on every port (fail-closed). Caution ports (SWITCH_CAUTION_PORTS): none.
Inputs: port (required), dry_run, confirm_caution_port. Returns: result
port_enableB
Enable a switch port (no shutdown). Allowed on protected ports. dry_run=true (default) only shows commands and current state. Does not save.
SWITCH_PROTECTED_PORTS is unset or invalid: port writes that check it are refused on every port (fail-closed). Caution ports (SWITCH_CAUTION_PORTS): none.
Inputs: port (required), dry_run, confirm_caution_port. Returns: result
port_overviewA
Read a bundle of allow-listed status commands in a single session.
Read-only: runs only the hardcoded show commands through the same netmiko-mcp command filter as the show tool. Never sends config.
Inputs: no named parameters. Returns: result
port_security_setA
Set port security (max learned MACs 1..256) or turn it off (limit omitted). Protected ports are refused. dry_run=true by default. Does not save.
SWITCH_PROTECTED_PORTS is unset or invalid: port writes that check it are refused on every port (fail-closed). Caution ports (SWITCH_CAUTION_PORTS): none.
Inputs: port (required), limit, dry_run, confirm_caution_port. Returns: result
port_set_descriptionA
Set an interface description, or clear it when text is omitted.
Refused on protected ports (SWITCH_PROTECTED_PORTS; unset or invalid list refuses every port); caution ports (SWITCH_CAUTION_PORTS) need confirm_caution_port=true. dry_run=true (default) only shows the commands and current state. Does not save.
SWITCH_PROTECTED_PORTS is unset or invalid: port writes that check it are refused on every port (fail-closed). Caution ports (SWITCH_CAUTION_PORTS): none.
Inputs: port (required), text, dry_run, confirm_caution_port. Returns: result
port_statusB
Per port as JSON: link, speed, duplex, description, VLANs, PoE (W/class/status) and LLDP neighbor. One session, read-only.
Inputs: include_raw. Returns: result
rate_limit_setB
Set an input or output rate limit in kbps (1..80000000), or remove it (kbps omitted). Protected ports are refused. dry_run=true by default.
SWITCH_PROTECTED_PORTS is unset or invalid: port writes that check it are refused on every port (fail-closed). Caution ports (SWITCH_CAUTION_PORTS): none.
Inputs: port (required), direction (required), kbps, dry_run, +1 more. Returns: result
save_configA
Copy running-config to startup-config (privileged exec 'save').
The LGS CLI cannot show the startup-config. dry_run=true (default): masked diff from the running-config stored at the last save through this server to the current running-config, plus the Config Save Status; nothing is saved. dry_run=false: stores the masked running-config that is saved (SWITCH_BACKUP_DIR, tag pre-save; required unless SWITCH_PRE_WRITE_SNAPSHOT=best-effort/off), saves, returns the diff to the previous save copy and the Config Save Status. The running-config copy uses the same background dump as config_read: a slow dump answers Pending first; the next call saves. Gate with hub unlock.
Inputs: dry_run. Returns: result
showA
Run an allow-listed show command on the switch (no TextFSM parsing).
Inputs: command (required). Returns: result
show_helpA
List CLI completions for 'show ?' (to find undocumented show commands). The line is typed, '?' lists options, then Ctrl-U clears the line: nothing is executed. Only show prefixes ([a-z0-9-] words).
Inputs: prefix. Returns: result
snmp_community_createA
Create a v2c community from SWITCH_SNMP_COMMUNITY, bound to views.
view_name is the read view. access is 'ro' or 'rw'; 'rw' requires a separate write_view built with snmp_write_view_create (only the writable columns, no per-port exclusions). The secret is never a tool argument and is redacted as [REDACTED] in all output. Does not save. Gate with hub unlock. The CLI syntax is not live-confirmed; see the README.
dry_run=true (default) runs the read-only prechecks and returns the commands the
first configuration step would send; nothing is sent.Inputs: access (required), view_name (required), dry_run, write_view. Returns: result
snmp_community_removeA
Remove an allow-listed default community (public or private).
Refuses unless the configured SWITCH_SNMP_COMMUNITY community is present and mapped to a restricted allow-listed view. Never removes the configured community itself. Does not save. Gate with hub unlock.
dry_run=true (default) runs the read-only prechecks and returns the commands the
first configuration step would send; nothing is sent.Inputs: name (required), dry_run. Returns: result
snmp_user_removeA
Remove an allow-listed SNMP user (noAuthUser). Does not save.
Gate this in the hub with unlock. The CLI syntax is not live-confirmed.
dry_run=true (default) runs the read-only prechecks and returns the commands the
first configuration step would send; nothing is sent.Inputs: name (required), dry_run. Returns: result
snmp_view_createA
Add one allow-listed included subtree to an SNMP read view. Does not save.
Gate this in the hub with unlock. subtree must be an OID or alias from the fixed allowlist (interfaces / ifmib / power-ethernet). Refused for any view used as a write view, holding a writable column or an excluded entry; build write views with snmp_write_view_create. The CLI syntax is not live-confirmed; see the README.
dry_run=true (default) runs the read-only prechecks and returns the commands the
first configuration step would send; nothing is sent.Inputs: subtree (required), view_name (required), dry_run. Returns: result
snmp_write_view_createA
Add one writable column to an SNMP write view. Does not save.
Gate this in the hub with unlock. subtree must be ifAdminStatus
(1.3.6.1.2.1.2.2.1.7), ifAlias (1.3.6.1.2.1.31.1.1.1.18) or
pethPsePortAdminEnable (1.3.6.1.2.1.105.1.1.1.3, PoE on/off); whole
MIB subtrees are never allowed in a write view. There are no per-port
exclusions: anyone with a community bound to this view can write
these columns for every port, including SWITCH_PROTECTED_PORTS. The
command is sent with a "%" error check and verified in show snmp
viewtree; on any failure the column is removed again
(no snmp view <view> <oid>) and the viewtree must equal the state
before. The CLI syntax is not live-confirmed.
dry_run=true (default) runs the read-only prechecks and returns the commands the
first configuration step would send; nothing is sent.Inputs: subtree (required), view_name (required), dry_run. Returns: result
storm_control_setA
Set storm control (broadcast | unknown-multicast | dlf) in packets per second, or remove it (level_pps omitted). Read-back from running-config. Protected ports are refused. dry_run=true by default. Does not save.
SWITCH_PROTECTED_PORTS is unset or invalid: port writes that check it are refused on every port (fail-closed). Caution ports (SWITCH_CAUTION_PORTS): none.
Inputs: port (required), storm_type (required), dry_run, level_pps, +1 more. Returns: result
syslog_setA
Add (enabled=true) or remove (enabled=false) a syslog server. The target must be listed in SWITCH_SYSLOG_ALLOWED. Severity uses the ISS keywords (emergencies, alerts, critical, errors, warnings, notification, informational, debugging). dry_run=true by default. Does not save.
Inputs: server_ip (required), port, dry_run, enabled, +2 more. Returns: result
system_identity_setA
Set system location, contact and/or switch name. Values: [A-Za-z0-9 ._-] (name without spaces, it becomes the CLI prompt). dry_run=true by default. Does not save.
Inputs: name, contact, dry_run, location. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 34 tools
Most tools have a clearly distinct resource+action pairing (port_enable/port_disable, poe_enable/poe_disable/poe_cycle, snmp_view_create vs snmp_write_view_create, config_read/config_backup/config_diff). The main soft spot is the read-only bundle family: port_overview, port_status, health_summary, port_counters and show all return status data and an agent must read descriptions closely to pick the right one. Descriptions do differentiate them well enough (bundle vs per-port JSON vs daily health vs raw allow-listed show), so overlap is manageable.
Nearly everything is snake_case with an area_action or action_noun shape (port_status, poe_cycle, storm_control_set, snmp_community_create, config_read). A few deviate in verb position (save_config vs config_read, port_set_description) but the vocabulary stays predictable and greppable. No camelCase or mixed-case chaos.
34 tools is above the comfortable band and reflects very granular decomposition (separate enable/disable pairs for ports and PoE, plus distinct set-tools per feature). The domain is genuinely broad (read monitoring, port/PoE writes, SNMP, config lifecycle, security hardening), so each tool roughly earns its place. Still, the surface feels heavy and could be consolidated (e.g. status bundles, generic port-setting tools).
Read/monitoring and the config lifecycle are thoroughly covered (config_read, config_backup, config_diff, save_config, counters_delta, health_summary). There are notable asymmetries and gaps: snmp_user_remove exists with no snmp_user_create, snmp_view_create has no view-remove counterpart, and there is no VLAN configuration, speed/duplex set, NTP, or reboot/reset tool. Agents can partly work around via the raw 'show' tool but not for writes.
Maintenance
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Remote.It hosted MCP: inventory devices, open connections, manage services and run scripts.
Secure and manage MCP servers through the Speakeasy AI Control Plane from your agent.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables SSH interactive session management through MCP, supporting commands, menus, and session lifecycle operations.1-
- FlicenseAqualityDmaintenanceEnables LLMs to run read-only show commands on Cisco IOS/IOS-XE and Nexus switches over SSH, with a two-account model for privilege separation and a fail-closed allowlist for safety.25-
- FlicenseNot gradedqualityCmaintenanceEnables MCP-capable AI agents to observe, troubleshoot, and configure Aruba CX (AOS-CX) switches through REST and SSH, with safety controls, inventory management, and verification workflows.-
- AlicenseAqualityBmaintenanceEnables MCP agents to run RouterOS commands on MikroTik routers over SSH, with configurable profiles, secure authentication, and a read-only safety guard.315 npmMIT