Skip to main content
Glama

icx-mcp

An MCP server that gives an AI agent live, structured access to a Ruckus ICX 7450 running FastIron 09.0.10k, so it can explain switch state and recommend configuration changes. It has no write tools: recommended changes come back as FastIron CLI for a person to review and apply.

  • RESTCONF first (async httpx), SSH fallback (Netmiko, allowlisted show commands only).

  • Transports: stdio for local use and streamable HTTP for Kubernetes, plus /health.

  • Every result includes source: "restconf" | "ssh" so you know which backend answered.

Tools

Tool

What it returns

Primary

Fallback

list_devices

Configured switch, enabled backends (no secrets)

local

–

discover_restconf

Reachability, auth check, YANG modules exposed

RESTCONF

–

get_system_info

Model, serial, version, hostname, uptime, CPU, memory

RESTCONF

show version, show cpu-utilization, show memory

get_interfaces

Admin/oper state, speed, duplex, description, errors (filterable)

RESTCONF

show interfaces brief

get_poe_status

PoE budget, per-port power, class, PD type, priority, faults

RESTCONF

show inline power

get_stp_status

STP/RSTP/MSTP per instance: root, root port, port roles and states, edge ports

RESTCONF

show 802-1w, show span

get_vlans

VLANs and tagged/untagged membership

RESTCONF

show vlan

get_running_config

CLI text (filter by section/match) or YANG JSON (yang_path), secrets redacted

SSH (cli) / RESTCONF (yang)

the other one

run_show_command

Raw output of one allowlisted show command

SSH

–

Related MCP server: MCP-Telecom

Switch preparation (FastIron)

  1. Create a dedicated privilege-0 account for the server. FastIron only lets privilege-0 users use RESTCONF; a privilege-5 (read-only) user gets HTTP 401.

    username mcp privilege 0 password <strong-password>

    This is an admin account. The server itself only sends RESTCONF GETs and allowlisted show commands, but anyone holding the password has full control of the switch. Keep it in .env / a Kubernetes Secret and keep the MCP endpoint private.

  2. Enable RESTCONF. It shares TCP 443 with the HTTPS web UI (aaa authentication web-server default local must be set):

    configure terminal
     restconf enable
     exit
    write memory

    Until RESTCONF is enabled, the web UI answers every /restconf/... URL with 200 text/html; discover_restconf then reports restconf_detected: false.

  3. Keep SSH enabled (aaa authentication login default local). Some data is not in FastIron's RESTCONF API at all (see below).

What comes from where (verified on 09.0.10k)

Data

RESTCONF

SSH (only what RESTCONF lacks)

Interfaces

/restconf/data/interfaces: status, speed, duplex, counters

–

VLANs

.../network-instance/default-vrf/vlans + each port's switched-vlan

–

PoE

power used and allocated (mW → W), priority

oper state, PD type, class, chassis budget (show inline power)

STP

/restconf/data/stp: per-VLAN priority, edge-port, BPDU guard (config only)

root bridge, port roles and states (show 802-1w)

System

hostname; model, temperatures, PSU and fan status (/components)

version, serial, uptime, CPU, memory

Running config

YANG config datastore (default)

CLI text when section, match or list_sections is used

RESTCONF port names (ethernet 1/1/1, ve 98, management 1) are converted to CLI style (1/1/1, ve98, mgmt1) so both backends name ports the same way. Results that combine backends have source: "restconf+ssh" and list ssh_supplemented_fields. Each SSH-backed call adds about 10 s (SSH login on the ICX); RESTCONF-only calls take about 1 s.

Run locally (stdio)

uv venv && uv pip install -e '.[dev]'
cp .env.example .env        # set ICX_HOST, ICX_USERNAME, ICX_PASSWORD
.venv/bin/icx-mcp           # or: python -m icx_mcp.server

Claude Code:

claude mcp add icx --env ICX_HOST=192.168.1.2 --env ICX_USERNAME=mcp \
  --env ICX_PASSWORD=... --env ICX_VERIFY_TLS=false -- /path/to/.venv/bin/icx-mcp

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "icx": {
      "command": "/path/to/fastiron-mcp-server/.venv/bin/icx-mcp",
      "env": {"ICX_HOST": "192.168.1.2", "ICX_USERNAME": "mcp",
              "ICX_PASSWORD": "...", "ICX_VERIFY_TLS": "false"}
    }
  }
}

First connectivity test

Ask the agent to call discover_restconf, then get_system_info, then get_interfaces. Or test without an agent:

npx @modelcontextprotocol/inspector .venv/bin/icx-mcp

If discover_restconf shows auth_ok: false, check the credentials and that the account is privilege 0. After a 401 the server stops trying RESTCONF for 5 minutes, so failed logins don't pile up. If a tool reports "No RESTCONF path for 'stp' answered 200", it has already fallen back to SSH. Its restconf_errors[].attempts list every path it tried. Use discover_restconf to find the right module and pin it, for example:

ICX_RESTCONF_PATH_STP=/restconf/data/openconfig-spanning-tree:stp

Run in Kubernetes (streamable HTTP)

# released images: quay.io/carobb/fastiron-mcp-server:<version> (amd64 + arm64)
# or build your own: podman build -f docker/Dockerfile -t <registry>/fastiron-mcp-server:dev .
kubectl create secret generic icx-mcp-credentials \
  --from-literal=ICX_USERNAME=mcp --from-literal=ICX_PASSWORD='...'
# edit k8s/deployment.yaml: ICX_HOST in the ConfigMap (and the image tag if needed)
kubectl apply -f k8s/deployment.yaml -f k8s/service.yaml
  • MCP endpoint: http://icx-mcp.<ns>.svc:8000/mcp (stateless streamable HTTP).

  • Probes: GET /health is cheap and does not contact the switch. GET /health?deep=1 also checks that RESTCONF is reachable (503 if not).

  • The container runs as UID 10001 with a read-only root filesystem and all capabilities dropped.

  • The MCP endpoint has no authentication of its own. Keep the Service as ClusterIP, restrict it with a NetworkPolicy, or put an authenticating proxy in front before exposing it.

  • Use 1 replica. The switch has a small session limit.

Run the HTTP transport locally: ICX_TRANSPORT=streamable-http ICX_HTTP_HOST=127.0.0.1 icx-mcp.

Configuration

All settings are ICX_* environment variables (or a .env file). See .env.example. Credentials only come from env vars or Kubernetes Secrets. The optional YAML inventory (ICX_INVENTORY_FILE) is refused if it contains secrets.

Defaults and design decisions

Decision

Default and reason

RESTCONF paths

FastIron exposes mostly OpenConfig models. Its documented examples use un-prefixed paths such as /restconf/data/lldp. Each resource has an ordered list of candidate paths, prefixed and un-prefixed (see CANDIDATE_PATHS in restconf_client.py). The first one that returns 200 is cached for the life of the process. Override any of them with ICX_RESTCONF_PATH_<RESOURCE>.

PoE source

RESTCONF icx-openconfig-if-poe-aug for per-port state, with power-used read as milliwatts. Fields RESTCONF lacks are added from show inline power; pass include_cli_details=false to skip that. If RESTCONF has no PoE data, everything comes from SSH.

STP on ICX

FastIron usually runs 802.1w per VLAN, so results are a list of instances keyed by VLAN.

Running config

YANG JSON via RESTCONF by default (REST first). CLI text over SSH for section / match / list_sections or format="cli", which is what change recommendations are written in. Secrets are always redacted, including the AAA password hashes inside /restconf/data/system.

TLS

ICX_VERIFY_TLS=true by default. The ICX uses a self-signed cert, so either give it a CA bundle path (preferred) or set false.

Retries

2 retries with exponential backoff on connection errors, timeouts and 5xx. 401/403 fail fast. 400/404/405/501 move on to the next candidate path.

SSH

A short-lived session per call (always disconnected), calls serialized, ruckus_fastiron driver (it sends skip-page-display). Commands must match a show allowlist. ; | & $ and newlines are rejected.

Logging

Goes to stderr (stdout is the stdio protocol). Passwords are scrubbed by a log filter. httpx, paramiko and netmiko are kept at WARNING unless ICX_DEBUG=true.

MCP SDK

Pinned to mcp<2. SDK v2 renamed FastMCP to MCPServer, so migrating is a separate, deliberate step.

Python

3.12+ (the container uses 3.12).

Development

.venv/bin/pytest -q          # RESTCONF is mocked with respx; SSH with canned CLI output
.venv/bin/ruff check src tests

The SSH parsers are tested against representative FastIron 09.0.x output. If your switch prints something different, paste the real output into tests/test_tools.py and adjust the regexes in src/icx_mcp/tools/*.py.

Releasing

CI (.github/workflows/ci.yml) runs ruff, pytest (Python 3.12 and 3.13) and a container build on every push and PR. To release:

  1. Bump version in pyproject.toml and __version__ in src/icx_mcp/__init__.py.

  2. Commit, then git tag v<version> && git push origin v<version>.

.github/workflows/release.yml then tests, checks the tag matches the version, pushes quay.io/carobb/fastiron-mcp-server:<version>, :<major>.<minor> and :latest (amd64 + arm64), and creates a GitHub Release with the wheel and sdist. It needs the repository secrets QUAY_USERNAME and QUAY_PASSWORD (a Quay robot account with write access to the repository).

Roadmap (not in v1)

get_lldp_neighbors and get_logs as structured tools (use run_show_command for now). Multi-switch inventory, caching, and write tools. Write tools would only come with dry-run and explicit human approval.

Available Tools

9 tools
discover_restconfA
Read-onlyIdempotent

Diagnose RESTCONF connectivity and list the YANG modules the switch exposes.

Probes /.well-known/host-meta, /restconf, RESTCONF capabilities and the YANG library. Use this to (1) verify reachability and credentials, and (2) find the correct data paths when another tool reports that no RESTCONF path worked. Output: reachable, auth_ok, modules [{name, revision}], per-probe HTTP status.

Inputs: no named parameters. Returns: object

get_interfacesA
Read-onlyIdempotent

List switch ports and their state: admin/oper status, speed, duplex, description, MTU, MAC and error counters (in/out errors, discards, FCS).

Use filters to keep output small on the 48-port ICX 7450.

Args: name_filter: Substring or glob matched against port name OR description, e.g. "1/1/5", "1/2/", "ethernet1/1/1", "uplink". Case-insensitive. status: "up" = only operationally up ports, "down" = only non-up ports. only_with_errors: Only ports with non-zero error/discard counters (RESTCONF only; SSH fallback lacks counters). include_counters: Add full traffic counters (octets, unicast/broadcast/ multicast packets, carrier transitions).

Returns {source, total_interfaces, returned, interfaces:[...]}.

Inputs: status, name_filter, include_counters, only_with_errors. Returns: object

get_poe_statusA
Read-onlyIdempotent

Get Power over Ethernet (PoE/PoE+) status: chassis power budget and, per port, admin state, operational state, power consumed and allocated (watts), PD type (802.3af/at/bt/legacy), power class, priority, and faults.

Use this to answer: which ports power APs/cameras/phones, how close the switch is to its PoE budget, which ports have PoE faults, or why a device isn't getting power.

Args: port_filter: Substring or glob on port name, e.g. "1/1/1", "1/1/*". only_powered: Only ports currently delivering power. only_faults: Only ports reporting a PoE fault/error. include_cli_details: Add the fields RESTCONF lacks (chassis budget, allocated power, PD type, priority, faults) from show inline power over SSH. Set False for a faster RESTCONF-only answer.

Returns {source, summary:{powered_ports, total_power_used_w, total_w, free_w, allocated_pct_of_budget, ports_with_faults}, ports:[...]}. Summary is always computed over ALL PoE ports, regardless of filters.

Inputs: only_faults, port_filter, only_powered, include_cli_details. Returns: object

get_running_configA
Read-onlyIdempotent

Read the switch's running configuration, filtered to what you need. Secrets (passwords, keys, SNMP communities) are always redacted.

Formats:

  • "cli": FastIron CLI text (show running-config over SSH). Best for recommending config changes, since it matches what an admin would type.

  • "yang": structured JSON from the RESTCONF config datastore.

  • "auto" (default): YANG via RESTCONF, unless you pass a CLI-only option (section, match, list_sections), which uses CLI.

YANG workflow: call with no args to get top-level subtree sizes if large, then pass yang_path (e.g. "interfaces", "openconfig-spanning-tree:stp" -> use "stp"). CLI workflow: list_sections=true to see block headers, then fetch only the blocks you need with section or match. Prefer CLI when writing a change recommendation, since it matches what an admin types.

Args: section: CLI only. Comma-separated block-header prefixes, e.g. "interface ethernet 1/1/5", "vlan 20", "vlan", "spanning-tree", "interface ethernet 1/1/1,interface ethernet 1/1/2". match: CLI only. Case-insensitive regex; returns whole blocks with any matching line, e.g. "inline power", "802-1w", "port-name .*AP". list_sections: CLI only. Return just the block headers (cheap overview). yang_path: YANG only. Dotted path to a subtree, e.g. "interfaces" or "stp.global". max_lines: CLI output line cap (default 400, max 5000). max_chars: YANG output size cap (default 60000).

Inputs: match, format, section, max_chars, +3 more. Returns: object

get_stp_statusA
Read-onlyIdempotent

Get spanning-tree state (STP 802.1D, RSTP 802.1w, rapid-PVST or MSTP).

FastIron usually runs one 802.1w instance PER VLAN. For each instance returns: bridge priority/address, root bridge priority/address, whether this switch is root, root port, root path cost, timers, topology-change count, and per-port role (ROOT/DESIGNATED/ALTERNATE/BACKUP/DISABLED), state (FORWARDING/ DISCARDING/LEARNING/BLOCKING), cost, priority, edge-port and BPDU guard.

Use this to find blocked ports, unexpected root bridges, missing edge-port config on access ports, or loop/topology-change problems.

Args: vlan: Only this VLAN's instance (per-VLAN STP/RSTP). port_filter: Substring or glob on port name, e.g. "1/1/4*" or "lg1". only_non_forwarding: Only ports NOT in forwarding state.

On FastIron, RESTCONF only has STP configuration; live state comes from show 802-1w and is merged (source "restconf+ssh"). port_config lists the per-port edge-port / BPDU-guard / root-guard config for ALL ports (also ones not currently in an STP instance), handy for spotting access ports missing edge-port.

Returns {source, enabled_protocols, summary:{root_bridge_for, distinct_root_bridges, blocked_or_discarding_ports, ...}, instances:[...], port_config:{port: {...}}}. Summary covers all instances regardless of filters.

Inputs: vlan, port_filter, only_non_forwarding. Returns: object

get_system_infoA
Read-onlyIdempotent

Get switch identity and health: model, serial, FastIron version, hostname, uptime/boot time, CPU utilization and memory usage.

Uses RESTCONF (openconfig-system/platform) first and falls back to show version / show cpu-utilization / show memory over SSH. The source field says which backend answered.

Args: include_raw: Also return the unmodified backend payload (large; only use when a field you need is missing from the normalized output).

Inputs: include_raw. Returns: object

get_vlansA
Read-onlyIdempotent

List VLANs with ID, name, status and port membership (tagged/untagged).

Use to answer "which VLANs exist", "what VLANs is port 1/1/12 in", or "which ports carry VLAN 30 tagged". FastIron port names look like "1/1/12" (unit/module/port); LAGs look like "lg1".

Args: vlan_id: Only this VLAN. port: Only VLANs containing this port (substring/glob, e.g. "1/1/12"). include_members: Set False for a compact list of VLAN IDs and names only.

Inputs: port, vlan_id, include_members. Returns: object

list_devicesA
Read-onlyIdempotent

List the switches this server can query (currently exactly one ICX 7450).

Returns the device name, management host, and which backends (RESTCONF, SSH) are enabled. Never returns credentials. Call this first if unsure what device is configured or whether the server is set up.

Inputs: no named parameters. Returns: object

run_show_commandA
Read-onlyIdempotent

Run ONE read-only FastIron show command over SSH and return its raw text.

Use this only when no structured tool covers what you need (e.g. "show lldp neighbors detail", "show log", "show mac-address ethernet 1/1/5", "show interfaces ethernet 1/1/5", "show media", "show errdisable recovery"). Only allowlisted show prefixes are accepted; pipes, semicolons and configuration commands are rejected. Secrets in output are redacted.

Args: command: e.g. "show lldp neighbors detail ports ethernet 1/1/1". max_chars: Output cap (default 20000).

Inputs: command (required), max_chars. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 9 tools

    Disambiguation4/5

    Each structured getter targets a distinct domain (system, interfaces, PoE, STP, VLANs, config), and descriptions give explicit guidance on when to prefer one over another. The only real overlaps are list_devices vs discover_restconf (both framed as 'call first if unsure') and get_running_config vs run_show_command, though the latter's 'use only when no structured tool covers this' rule mitigates confusion.

    Naming Consistency5/5

    Uniform snake_case with a predictable verb_noun shape: list_devices, discover_restconf, get_* family, run_show_command. No camelCase or vague bare verbs anywhere.

    Tool Count5/5

    Nine tools for a single-switch diagnostic server is well scoped — one tool per major operational area plus two meta/escape-hatch tools, each earning its place.

    Completeness4/5

    Covers the core read-only surface an agent needs (identity, ports, PoE, STP, VLANs, config) plus run_show_command as a general escape hatch for LLDP, MAC tables, logs, and transceivers. No write/change tools exist, but that appears to be an intentional read-only scope rather than a gap, leaving at most minor holes like structured LAG/LLDP data.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to interact with Cisco IOS-XE network devices over SSH using structured tools. Provides read and write capabilities for network management with built-in validation and security.
      -
    • A
      license
      A
      quality
      D
      maintenance
      Provides read-only SSH access to network devices (routers, switches, firewalls) with command allow/deny policies, nt-templates output parsing, and an audit trail, enabling an AI agent to query device state securely.
      10
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an AI agent to read-only inspect Extreme Networks switches over SNMPv3 and optional SSH, retrieving health, interface, VLAN, routing, DHCP, ARP/MAC, logging and fabric-topology data for monitoring and troubleshooting. No write path exists, so agents can look at approved inventory switches without being able to change configuration.
      1
      Apache 2.0