Skip to main content
Glama

snmp-mcp

An MCP server that wraps the IETF SNMP standard so AI agents (Claude Code, Claude Desktop, IDE assistants) can poll any SNMP-speaking device on the network without rediscovering each MIB's quirks on every task.

Status: beta. Feature-complete v0 — 9 tools (4 generic primitives, 5 MIB-specific convenience wrappers) covering read-only inspection across switches, routers, printers, and host-resources targets. 66 unit tests + 9 live integration tests passing against two device classes (a managed RouterOS switch and an Epson print server with full PRINTER-MIB support). API is stable. See DESIGN.md for the full architecture, tool surface, and MIB-to-tool mapping.

Why

Mixed-vendor networks need a vendor-neutral read-side abstraction:

  • A managed switch (MikroTik, Cisco, Aruba, Omada) exposes interface counters via IF-MIB. Use HC counters (ifHCInOctets/ifHCOutOctets) on any link >=1 Gbps — the 32-bit ifInOctets/ifOutOctets saturate at ~4.29 Gbps.

  • A network printer (HP, Brother, Canon, OKI, Epson) exposes toner / ink / drum levels via PRINTER-MIB (RFC 3805). The MIB is identical across vendors; the wrapper returns one schema for all of them.

  • A Linux host running net-snmp exposes CPU, memory, and disk via HOST-RESOURCES-MIB (RFC 2790). Same wrapper, same schema.

  • Generic SNMP get/walk/bulkwalk/table primitives are also exposed so you can talk to anything else without writing vendor-specific code paths.

snmp-mcp is the read-side counterpart to vendor-specific MCPs that already handle writes for one device (e.g., synology-mcp for DSM).

Related MCP server: NetMCP

Scope

MVP (v0)

Generic primitives (4):

  1. snmp_get — fetch one or more OIDs (numeric or symbolic).

  2. snmp_walk — walk a subtree via GETNEXT.

  3. snmp_bulk_walk — walk a subtree via GETBULK (faster for large tables).

  4. snmp_table — fetch and tabularize an SNMP table.

MIB-specific convenience wrappers (5):

  1. system_info — SNMPv2-MIB::system group (sysDescr / sysName / sysLocation / sysUpTime / ...).

  2. interfaces_list — IF-MIB::ifTable + IF-MIB::ifXTable, with HC counters preferred where exposed.

  3. host_resources — HOST-RESOURCES-MIB (CPU load, memory, storage).

  4. printer_status — PRINTER-MIB (supplies, trays, alerts, status).

  5. device_detect — probe sysObjectID + a handful of well-known root OIDs to report which standard MIBs the device supports.

Out of scope (v0)

  • SNMP SET (writes). Read-only by design.

  • SNMP trap receiver (long-running daemon, different process model).

  • Loading random vendor MIBs at runtime — standard IETF MIBs only.

  • MIB browser GUI. Stick to the programmatic tool surface.

  • Custom polling schedules or time-series storage. That belongs in Home Assistant, Prometheus, or similar.

See DESIGN.md §11 for rationale.

Multi-host

Every tool accepts a host parameter. Credentials and connection settings come from a config file or environment variables — there are no hardcoded hosts in this codebase. See examples/config.toml.

Quickstart

# Install from PyPI (when published)
uv tool install snmp-mcp

# Or run from source
git clone https://github.com/acato/snmp-mcp
cd snmp-mcp
uv sync
uv run snmp-mcp

Windows: avoid Microsoft Store Python

If uv picks Microsoft Store Python (path under \WindowsApps\PythonSoftwareFoundation...) when creating the venv, the MCP runs fine from a terminal but fails to launch from GUI hosts like the Claude desktop app, IDE extensions, or scheduled tasks. You will see:

Unable to create process using "...\WindowsApps\PythonSoftwareFoundation.Python.3.12_...\python.exe"

The Store-Python app-execution alias requires an interactive user context that GUI-spawned children do not get. Pin uv to a non-Store interpreter — uv's managed Python is easiest:

uv python install 3.12
uv venv --python 3.12 --python-preference only-managed --clear
uv sync

Verify: Get-Content .venv\pyvenv.cfg — the home = line should point under AppData\Roaming\uv\python\..., not \WindowsApps\. A python.org installer or winget install Python.Python.3.12 also works.

Wire into Claude Code

claude mcp add snmp-mcp -- uv run --directory /path/to/snmp-mcp snmp-mcp

Configuration

Copy examples/config.toml to ~/.config/snmp-mcp/config.toml and fill in your hosts. Or set per-host env vars (see DESIGN.md §6).

Compatibility

  • SNMPv1 — supported (legacy devices).

  • SNMPv2c — first-class target (community-based; most common).

  • SNMPv3 — supported with auth (MD5/SHA/SHA2-family) and priv (DES/3DES/AES128/192/256).

License

Apache License 2.0. See NOTICE for attributions.

Trademarks

This project is not affiliated with, endorsed by, or sponsored by any vendor whose devices it polls.

Available Tools

9 tools
device_detectA

Probe which standard MIBs a device implements. Issues 5 GETs (sysObjectID, sysDescr, ifNumber, hrSystemUptime, prtGeneralPrinterStatus.1.1) and reports a vendor hint (decoded from the sysObjectID enterprise number) plus a list of supported_mibs. Useful as a smoke test before calling heavier tools.

Inputs: host (required).

host_resourcesA

HOST-RESOURCES-MIB (RFC 2790) summary: CPU load per core (hrProcessorLoad), memory (hrMemorySize + derived swap), uptime, process count, and storage table (filesystems + RAM + swap). Raises 'unsupported' if the agent does not implement the MIB at all (typical on bare network switches).

Inputs: host (required).

interfaces_listA

List network interfaces via IF-MIB (RFC 2863). Merges ifTable + ifXTable per ifIndex. HC counters (ifHCInOctets / ifHCOutOctets) are returned alongside 32-bit counters. ifSpeed saturation at ~4.29 Gbps is handled automatically — ifSpeed_bps falls back to ifHighSpeed*1e6 with ifSpeed_source='ifHighSpeed' and a warning.

Inputs: host (required).

printer_statusC

PRINTER-MIB (RFC 3805) status: supplies (toner / ink / drum levels with percent computed when capacity is known), input trays, output bins, and active alerts. Works across HP, Brother, Canon, OKI, Epson, Lexmark. Sentinel values (-2 unknown, -3 not measured) are handled per RFC 3805.

Inputs: host (required).

snmp_bulk_walkA

Walk an OID subtree via GETBULK (SNMPv2c+). Faster than snmp_walk for large tables; falls back to GETNEXT with a warning on v1 hosts. max_repetitions defaults to 25.

Inputs: host (required), root_oid (required), max_repetitions.

snmp_getA

Fetch one or more OIDs in a single SNMP GET-Request. Accepts numeric (e.g. 1.3.6.1.2.1.1.5.0) and a small set of symbolic forms (e.g. SNMPv2-MIB::sysName.0). Returns a dict keyed by OID with {value, type} per varbind.

Inputs: host (required), oids_in (required).

snmp_tableA

Walk and tabularize an SNMP table. Returns {table_oid, rows: [{index, <col_name>: value, ...}, ...]}. Column-name mapping is best-effort: unknown columns are keyed by numeric OID.

Inputs: host (required), table_oid (required).

snmp_walkA

Walk an OID subtree via GETNEXT chain. Terminates on endOfMibView or when the next OID leaves the subtree. Returns a list of {oid, value, type} rows.

Inputs: host (required), root_oid (required).

system_infoB

Fetch the SNMPv2-MIB::system group (RFC 3418): sysDescr, sysObjectID, sysUpTime (centiseconds and seconds), sysContact, sysName, sysLocation, sysServices.

Inputs: host (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 9 tools

    Disambiguation4/5

    Tools are largely distinct, but snmp_walk and snmp_bulk_walk share the same purpose (walking an OID subtree) differing only in method, which could cause confusion. Additionally, snmp_table is a specialized walk. However, descriptions clarify the differences.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., device_detect, snmp_get, interfaces_list), making it easy for agents to predict and select the correct tool.

    Tool Count5/5

    With 9 tools, the server covers core SNMP operations (get, walk, bulk walk, table) and common MIB groups (system, interfaces, host resources, printer). The count is well-balanced for its scope.

    Completeness5/5

    The tool set provides both low-level SNMP access and high-level summaries for common device types. It includes detection (device_detect), system info, interfaces, resources, and printer status. The only notable gap is lack of SNMP SET, but that aligns with the server's focus on read-only monitoring.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for network operations that lets AI assistants interact with Cisco/Juniper network devices through safe, well-defined tools like compliance audits and configuration backups.
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Universal MCP server for industrial PLC communication, enabling AI agents to read sensors, alarms, status, setpoints, and write setpoints via adapters for Modbus, S7, or custom PLCs.
      6
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that exposes live network monitoring data as Resources and diagnostic capabilities as Tools, letting AI assistants query network health conversationally.
      6
      MIT