Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OPENWRT_URLNoThe router's ubus endpoint; https:// works too.http://192.168.1.1/ubus
OPENWRT_USERNoThe rpcd login username.mcp
MCP_HTTP_BINDNoHTTP bind address (HTTP only).127.0.0.1
MCP_HTTP_PORTNoHTTP port (HTTP only).8765
MCP_TRANSPORTNoTransport mode: stdio or http (streamable HTTP).stdio
MCP_BEARER_TOKENNoBearer token for HTTP transport. Required when MCP_TRANSPORT=http.
OPENWRT_PASSWORDNoThe password for the rpcd login. Required.
OPENWRT_VERIFY_TLSNoSet to false, or a CA file, for a self-signed router certificate.true
MCP_HTTP_ALLOWED_HOSTSNoExtra Host names accepted over HTTP, e.g. example-host.
OPENWRT_SETTLE_SECONDSNoWait after apply before the check (0 to 20).5
OPENWRT_ROLLBACK_TIMEOUTNoSeconds before an unconfirmed change is rolled back.30

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Reads an OpenWrt router's status and configuration through ubus (rpcd), and changes DHCP static leases, port forwards and firewall rules. Secrets (Wi-Fi keys, passwords) are always shown as ***. Every change is two steps: call without confirm to get a preview, show it to the user, and only call again with confirm=true once they agree. Changes are applied with rollback, so a change that cuts the router off undoes itself.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
router_infoB

Router model, firmware release, kernel, uptime, load and memory (ubus system board/info).

interfacesC

Logical network interfaces (lan, wan ...): up/down, protocol, device, addresses, gateway, DNS.

dhcp_leasesA

Active DHCPv4 and DHCPv6 leases: hostname, IP, MAC and time left (as LuCI shows them).

wifi_statusC

Each Wi-Fi interface: SSID, mode, channel, frequency, TX power, signal/noise, encryption type.

wifi_clientsA

Associated Wi-Fi stations on every radio, with signal, rates, and hostname/IP from DHCP.

firewall_configA

Firewall UCI config grouped as defaults, zones, forwardings, rules and redirects (port forwards).

uci_showA

One UCI config as a list of sections. config: network, dhcp, firewall, system or wireless. Secret options (key, password, psk ...) are shown as ***.

system_logA

The last lines lines of the system log (1-1000, default 100). With contains, only the lines containing that text (case-insensitive), searched in the last 1000.

static_lease_addA

Reserve an IPv4 address for a device (a DHCP static lease). mac: aa:bb:cc:dd:ee:ff; ip: a free address in the LAN; name: a hostname (letters, digits, hyphens). Without confirm=true this only returns a preview of the UCI changes and changes nothing. With confirm=true it applies them with the router's rollback timer, checks the router still answers, and confirms; if the check fails, the router restores the old config by itself.

static_lease_removeA

Remove a static lease, by section id (see uci_show dhcp) or by MAC. Only leases this server created are removed unless force=true. Without confirm=true this only returns a preview of the UCI changes and changes nothing. With confirm=true it applies them with the router's rollback timer, checks the router still answers, and confirms; if the check fails, the router restores the old config by itself.

port_forward_addA

Forward a port (or range like 8000-8010) from the src zone (default wan) to a LAN host. proto: tcp, udp or "tcp udp". dest_port defaults to src_dport. Without confirm=true this only returns a preview of the UCI changes and changes nothing. With confirm=true it applies them with the router's rollback timer, checks the router still answers, and confirms; if the check fails, the router restores the old config by itself.

port_forward_removeA

Remove a port forward, by section id or name. Only ones this server created unless force=true. Without confirm=true this only returns a preview of the UCI changes and changes nothing. With confirm=true it applies them with the router's rollback timer, checks the router still answers, and confirms; if the check fails, the router restores the old config by itself.

firewall_rule_addA

Add a traffic rule. src/dest: zone names or "*" (dest omitted = traffic to the router itself). target: ACCEPT, REJECT or DROP. proto: tcp, udp, "tcp udp", icmp or all. family: ipv4, ipv6 or any. Without confirm=true this only returns a preview of the UCI changes and changes nothing. With confirm=true it applies them with the router's rollback timer, checks the router still answers, and confirms; if the check fails, the router restores the old config by itself.

firewall_rule_removeA

Remove a firewall rule, by section id or name. Only ones this server created unless force=true. Without confirm=true this only returns a preview of the UCI changes and changes nothing. With confirm=true it applies them with the router's rollback timer, checks the router still answers, and confirms; if the check fails, the router restores the old config by itself.

pending_changesA

UCI changes this server has staged but not applied (normally none: every tool cleans up).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 15 tools

Disambiguation4/5

Most tools have clearly distinct targets: DHCP leases, Wi-Fi status, Wi-Fi clients, interfaces, firewall config, and router info are separable. The main overlap is that uci_show exposes raw configs that partially duplicate firewall_config, interfaces, and DHCP lease views, but its generic raw-UCI purpose is still clear.

Naming Consistency3/5

All names use snake_case, but there are mixed conventions: read tools are noun phrases such as wifi_status and router_info, while mutating tools use entity_action order such as static_lease_add and port_forward_remove. The pattern is readable and semantically grouped, but it is not a single predictable verb_noun convention.

Tool Count5/5

Fifteen tools is well-scoped for a router-management MCP server, with a balanced set of read-only inspection tools and paired add/remove operations. Each tool appears to earn its place without excessive surface area.

Completeness4/5

The set covers the core lifecycle well: inspect router/network/Wi-Fi/firewall state, add and remove static leases, port forwards, and firewall rules, with preview/confirm safety. Minor gaps remain, such as updating existing rules or leases in place and broader Wi-Fi or DHCP server configuration changes.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues