Skip to main content
Glama
AsusWRT MCP Server

AsusWRT MCP Server

by teefloo

AsusWRT MCP Server

Python 3.11+ MIT License Project Status: Active

mcp-name: io.github.teefloo/asuswrt-mcp

Model Context Protocol (MCP) server for secure, controlled administration of AsusWRT and AsusWRT-Merlin routers via SSH.

Overview

This MCP server provides AI assistants (like Claude, Cursor, etc.) with a safe interface to monitor and manage AsusWRT routers. It operates exclusively over SSH using allowlisted operations—no arbitrary command execution, no firmware modifications, and no factory resets.

Related MCP server: OpenWRT SSH MCP Server

Features

Read-Only Monitoring (42 tools)

Category

Tools

Identity & Health

Router model, firmware version, uptime, load, memory

Network

LAN/WAN details, DNS config, IPv6 status, routing table

Clients

Connected clients, DHCP leases, ARP neighbors

Wireless

Radio status, SSIDs, guest networks, client counts per band

Services

Running processes, open ports, cron jobs

Storage

USB devices, mounts, partitions, filesystem usage

Security

UPnP, DDNS, Samba status, conntrack usage

VPN

OpenVPN server, WireGuard, VPN client profiles

Administration

Web admin ports, SSH/telnet access settings

Diagnostics

SSH TCP/banner/auth diagnostics, config snapshot

Mutation Tools (with safety guards)

All mutation tools require:

  • confirm: true parameter

  • ASUSWRT_ALLOW_MUTATIONS=true environment variable

  • Support for dry_run: true to preview changes

Tool

Description

asuswrt_restart_service

Restart allowlisted services (httpd, firewall, wireless, dnsmasq, etc.)

asuswrt_dhcp_server

Enable/disable DHCP server

asuswrt_upnp

Enable/disable UPnP

asuswrt_radio

Enable/disable Wi-Fi radio bands

asuswrt_guest_wifi

Enable/disable guest Wi-Fi

asuswrt_guest_lan_access

Toggle LAN access for guest Wi-Fi

asuswrt_port_forwarding

List, add, remove, enable/disable port forwarding rules

asuswrt_vpn_server

Enable/disable OpenVPN server

asuswrt_parental_access

List, block, unblock, remove parental control rules

asuswrt_parental_block_all

Toggle block-all mode

asuswrt_dhcp_reservation

List, add, remove DHCP static reservations

Safety Model

  • No arbitrary SSH: Only allowlisted commands are executed via NVRAM and service calls

  • No firmware operations: No flash, reset, or bootloader access

  • Secret redaction: Passwords and sensitive data are never exposed in tool responses

  • Dry-run support: Every mutation can be previewed before applying

  • Confirmation required: Mutations require explicit confirm=True

  • SSH-only transport: No exposure of the router's web API

Prerequisites

  • Python 3.11+

  • An AsusWRT or AsusWRT-Merlin router with SSH access enabled

  • Network connectivity from the MCP client to the router

Installation

1. Clone and setup

git clone https://github.com/Teeflo/asuswrt-mcp.git
cd asuswrt-mcp

# Create virtual environment
python -m venv .venv

# Activate (Linux/macOS)
source .venv/bin/activate

# Activate (Windows)
.venv\Scripts\activate

# Install dependencies
pip install -e .

2. Configure environment

# Copy example configuration
cp .env.example .env

# Edit with your router credentials
# Use your favorite editor:
notepad .env        # Windows
nano .env           # Linux/macOS

3. Configure .env

# Required: Router connection
ASUSWRT_HOST=192.168.1.1
ASUSWRT_SSH_USERNAME=admin
ASUSWRT_SSH_PASSWORD=your_password

# Optional: SSH key authentication
# ASUSWRT_SSH_KEY_FILE=~/.ssh/id_rsa

# Optional: Enable mutations (disabled by default)
# ASUSWRT_ALLOW_MUTATIONS=true

# Optional: Connection settings
# ASUSWRT_SSH_PORT=22
# ASUSWRT_TIMEOUT_SECONDS=10

Usage

Run the MCP server

# Standard stdio mode
python -m asuswrt_mcp.server

# Or use the entry point
asuswrt-mcp

Configure in Claude Desktop / Cursor

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "asuswrt-mcp": {
      "command": "C:\\path\\to\\asuswrt-mcp\\.venv\\Scripts\\python.exe",
      "args": ["-m", "asuswrt_mcp.server"],
      "env": {
        "ASUSWRT_HOST": "192.168.1.1",
        "ASUSWRT_SSH_USERNAME": "admin",
        "ASUSWRT_SSH_PASSWORD": "your_password"
      }
    }
  }
}

Using with npx Inspector (development)

npx @modelcontextprotocol/inspector python -m asuswrt_mcp.server

Development

Run tests

pip install -e ".[dev]"
pytest

Run with live router integration tests

ASUSWRT_TEST_ROUTER=1 pytest

Project Structure

asuswrt-mcp/
├── src/asuswrt_mcp/
│   ├── server.py          # FastMCP entrypoint & tool definitions
│   ├── service.py         # Business logic & router operations
│   ├── config.py          # Settings management
│   ├── clients/
│   │   └── ssh.py         # SSH client wrapper
│   ├── nvram.py           # NVRAM parsing utilities
│   ├── ssh_parsers.py     # Output parsers for SSH commands
│   ├── security.py        # Mutation guards & redaction
│   ├── validators.py      # Input validation
│   ├── responses.py       # Tool response formatting
│   ├── errors.py          # Custom exceptions
│   └── serialization.py   # Safe serialization
├── tests/                 # Test suite (69 tests)
├── .env.example           # Example configuration
├── pyproject.toml         # Project metadata
└── README.md              # This file

License

MIT License - see LICENSE for details.

Acknowledgments

Available Tools

47 tools
asuswrt_admin_accessA

Inspect web, SSH, and telnet administrative access settings.

Inputs: no named parameters.

asuswrt_arp_neighborsA

List ARP/IP neighbor entries known by the router.

Inputs: no named parameters.

asuswrt_capabilitiesB

Return server capabilities, guardrails, and safe settings.

Inputs: no named parameters.

asuswrt_clientsB

List connected clients reported by the router.

Inputs: no named parameters.

asuswrt_config_snapshotA

Fetch a redacted read-only configuration snapshot.

Inputs: no named parameters.

asuswrt_conntrack_statusA

Inspect conntrack table usage and limits.

Inputs: no named parameters.

asuswrt_cron_jobsA

Inspect scheduled cron jobs reported by cru.

Inputs: no named parameters.

asuswrt_ddns_statusA

Inspect Dynamic DNS enablement and current provider settings.

Inputs: no named parameters.

asuswrt_dhcp_configA

Inspect DHCP server pool settings and static reservations.

Inputs: no named parameters.

asuswrt_dhcp_leasesB

List active DHCP leases from dnsmasq.

Inputs: no named parameters.

asuswrt_dhcp_reservationC

List, add, or remove DHCP static reservations via SSH NVRAM.

Inputs: action (required), mac, ip, name, +2 more.

asuswrt_dhcp_serverC

Enable or disable the DHCP server.

Inputs: enabled (required), confirm, dry_run.

asuswrt_dns_configA

Inspect WAN and LAN DNS settings reported by NVRAM.

Inputs: no named parameters.

asuswrt_guest_lan_accessC

Toggle LAN access for a guest Wi-Fi slot.

Inputs: band (required), slot (required), allow_lan (required), confirm, +1 more.

asuswrt_guest_networksB

List guest Wi-Fi networks and LAN-access state.

Inputs: no named parameters.

asuswrt_guest_wifiC

Enable or disable a guest Wi-Fi slot.

Inputs: band (required), slot (required), enabled (required), confirm, +1 more.

asuswrt_healthA

Fetch router identity and basic health data.

Inputs: no named parameters.

asuswrt_identityB

Fetch router model and firmware identity.

Inputs: no named parameters.

asuswrt_interface_statsA

Inspect per-interface RX/TX counters from /proc/net/dev.

Inputs: no named parameters.

asuswrt_ipv6_statusA

Inspect IPv6 service, prefix, and router address details.

Inputs: no named parameters.

asuswrt_kernel_modulesA

Inspect loaded kernel modules reported by lsmod.

Inputs: no named parameters.

asuswrt_lan_detailsA

Inspect LAN interface, addressing, and DHCP presence.

Inputs: no named parameters.

asuswrt_mountsA

Inspect mounted filesystems and mount options.

Inputs: no named parameters.

asuswrt_network_overviewA

Fetch LAN, WAN, and routing overview details.

Inputs: no named parameters.

asuswrt_open_portsA

Inspect listening TCP/UDP sockets reported by netstat.

Inputs: no named parameters.

asuswrt_parental_accessC

List or manage AsusWRT parental access rules.

Inputs: action (required), mac, name, confirm, +1 more.

asuswrt_parental_block_allC

Toggle parental-control block-all mode.

Inputs: enabled (required), confirm, dry_run.

asuswrt_partitionsA

Inspect block-device partitions reported by the router kernel.

Inputs: no named parameters.

asuswrt_policy_routingB

Inspect policy-routing rules reported by ip rule.

Inputs: no named parameters.

asuswrt_port_forwardingC

List, enable/disable, add, or remove port forwarding rules.

Inputs: action (required), name, ip, port, +5 more.

asuswrt_radioC

Enable or disable a main Wi-Fi radio band.

Inputs: band (required), enabled (required), confirm, dry_run.

asuswrt_restart_serviceC

Restart an allowlisted AsusWRT service.

Inputs: service (required), confirm, dry_run.

asuswrt_route_tableA

Inspect the router IPv4 route table.

Inputs: no named parameters.

asuswrt_samba_statusA

Inspect Samba/SMB status and related processes.

Inputs: no named parameters.

asuswrt_service_processesA

List key allowlisted router processes and services.

Inputs: no named parameters.

asuswrt_ssh_diagnosticsA

Diagnose SSH TCP reachability, banner exchange, and authentication.

Inputs: no named parameters.

asuswrt_storage_usageB

Inspect storage/filesystem usage reported by the router.

Inputs: no named parameters.

asuswrt_system_statsA

Fetch router uptime, load, and memory statistics.

Inputs: no named parameters.

asuswrt_time_syncA

Inspect timezone and NTP synchronization settings.

Inputs: no named parameters.

asuswrt_upnpC

Enable or disable UPnP.

Inputs: enabled (required), confirm, dry_run.

asuswrt_upnp_statusA

Inspect UPnP enablement and housekeeping settings.

Inputs: no named parameters.

asuswrt_usb_overviewA

Inspect USB/storage-related partitions, mounts, and filesystems.

Inputs: no named parameters.

asuswrt_vpn_overviewB

Inspect configured VPN modes and related processes.

Inputs: no named parameters.

asuswrt_vpn_serverC

Enable or disable the OpenVPN server toggle.

Inputs: enabled (required), confirm, dry_run.

asuswrt_wan_detailsA

Inspect WAN protocol, IP, gateway, DNS, and interface details.

Inputs: no named parameters.

asuswrt_web_adminB

Inspect web admin ports and related web processes.

Inputs: no named parameters.

asuswrt_wireless_overviewB

Inspect wireless radios, SSIDs, and connected band counts.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 47 tools

    Disambiguation5/5

    All 47 tools have distinct names and clearly separated purposes, from inspecting specific subsystems (ARP, DNS, DHCP) to controlling actions (enable/disable, toggle). Even closely related tools like guest_networks, guest_wifi, and guest_lan_access target different aspects of guest Wi-Fi management.

    Naming Consistency5/5

    Every tool follows the consistent pattern 'asuswrt_<noun_or_noun_verb>' with snake_case. The prefix unifies the set, and the suffixes are descriptive and predictable (e.g., _status, _config, _details, _enable, _disable).

    Tool Count2/5

    47 tools is excessive for a single MCP server. While the domain of router management is broad, many tools are highly granular (separate tools for DHCP config, leases, reservations, and server), leading to bloat. The server would benefit from consolidation or splitting into sub-servers.

    Completeness4/5

    The tool set covers an extensive range of router features: network configuration, wireless, guest networks, VPN, port forwarding, parental controls, system health, and more. Minor gaps exist (e.g., no firmware update or QoS control), but the surface is comprehensive for routine monitoring and administration.

    Maintenance

    ActivityInactive
    ResponsivenessMostly unanswered

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to manage OpenWRT routers remotely via SSH, supporting system monitoring, network management, OpenThread Border Router configuration, and package management through natural language commands.
      19
      17
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to securely execute remote SSH commands, perform file transfers, and monitor system status through a standardized interface. It features robust security controls including command whitelisting, blacklisting, and credential isolation to prevent unauthorized operations.
      10
      20 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to read-only monitor iStoreOS/OpenWRT routers via SSH or HTTP/ubus API, providing 31 tools for system status, network info, logs, and plugin status (OpenClash, Passwall, AdGuardHome, etc.).
      31
      MIT