{
  "markdown": "# AsusWRT MCP Server\n\n[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)\n[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n[![Project Status: Active](https://img.shields.io/badge/status-active-green.svg)](https://github.com/Teeflo/asuswrt-mcp)\n\nmcp-name: io.github.teefloo/asuswrt-mcp\n\nModel Context Protocol (MCP) server for secure, controlled administration of AsusWRT and AsusWRT-Merlin routers via SSH.\n\n## Overview\n\nThis 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.\n\n## Features\n\n### Read-Only Monitoring (42 tools)\n\n| Category | Tools |\n|----------|-------|\n| **Identity & Health** | Router model, firmware version, uptime, load, memory |\n| **Network** | LAN/WAN details, DNS config, IPv6 status, routing table |\n| **Clients** | Connected clients, DHCP leases, ARP neighbors |\n| **Wireless** | Radio status, SSIDs, guest networks, client counts per band |\n| **Services** | Running processes, open ports, cron jobs |\n| **Storage** | USB devices, mounts, partitions, filesystem usage |\n| **Security** | UPnP, DDNS, Samba status, conntrack usage |\n| **VPN** | OpenVPN server, WireGuard, VPN client profiles |\n| **Administration** | Web admin ports, SSH/telnet access settings |\n| **Diagnostics** | SSH TCP/banner/auth diagnostics, config snapshot |\n\n### Mutation Tools (with safety guards)\n\nAll mutation tools require:\n- `confirm: true` parameter\n- `ASUSWRT_ALLOW_MUTATIONS=true` environment variable\n- Support for `dry_run: true` to preview changes\n\n| Tool | Description |\n|------|-------------|\n| `asuswrt_restart_service` | Restart allowlisted services (httpd, firewall, wireless, dnsmasq, etc.) |\n| `asuswrt_dhcp_server` | Enable/disable DHCP server |\n| `asuswrt_upnp` | Enable/disable UPnP |\n| `asuswrt_radio` | Enable/disable Wi-Fi radio bands |\n| `asuswrt_guest_wifi` | Enable/disable guest Wi-Fi |\n| `asuswrt_guest_lan_access` | Toggle LAN access for guest Wi-Fi |\n| `asuswrt_port_forwarding` | List, add, remove, enable/disable port forwarding rules |\n| `asuswrt_vpn_server` | Enable/disable OpenVPN server |\n| `asuswrt_parental_access` | List, block, unblock, remove parental control rules |\n| `asuswrt_parental_block_all` | Toggle block-all mode |\n| `asuswrt_dhcp_reservation` | List, add, remove DHCP static reservations |\n\n### Safety Model\n\n- **No arbitrary SSH**: Only allowlisted commands are executed via NVRAM and service calls\n- **No firmware operations**: No flash, reset, or bootloader access\n- **Secret redaction**: Passwords and sensitive data are never exposed in tool responses\n- **Dry-run support**: Every mutation can be previewed before applying\n- **Confirmation required**: Mutations require explicit `confirm=True`\n- **SSH-only transport**: No exposure of the router's web API\n\n## Prerequisites\n\n- Python 3.11+\n- An AsusWRT or AsusWRT-Merlin router with SSH access enabled\n- Network connectivity from the MCP client to the router\n\n## Installation\n\n### 1. Clone and setup\n\n```bash\ngit clone https://github.com/Teeflo/asuswrt-mcp.git\ncd asuswrt-mcp\n\n# Create virtual environment\npython -m venv .venv\n\n# Activate (Linux/macOS)\nsource .venv/bin/activate\n\n# Activate (Windows)\n.venv\\Scripts\\activate\n\n# Install dependencies\npip install -e .\n```\n\n### 2. Configure environment\n\n```bash\n# Copy example configuration\ncp .env.example .env\n\n# Edit with your router credentials\n# Use your favorite editor:\nnotepad .env        # Windows\nnano .env           # Linux/macOS\n```\n\n### 3. Configure `.env`\n\n```env\n# Required: Router connection\nASUSWRT_HOST=192.168.1.1\nASUSWRT_SSH_USERNAME=admin\nASUSWRT_SSH_PASSWORD=your_password\n\n# Optional: SSH key authentication\n# ASUSWRT_SSH_KEY_FILE=~/.ssh/id_rsa\n\n# Optional: Enable mutations (disabled by default)\n# ASUSWRT_ALLOW_MUTATIONS=true\n\n# Optional: Connection settings\n# ASUSWRT_SSH_PORT=22\n# ASUSWRT_TIMEOUT_SECONDS=10\n```\n\n## Usage\n\n### Run the MCP server\n\n```bash\n# Standard stdio mode\npython -m asuswrt_mcp.server\n\n# Or use the entry point\nasuswrt-mcp\n```\n\n### Configure in Claude Desktop / Cursor\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"asuswrt-mcp\": {\n      \"command\": \"C:\\\\path\\\\to\\\\asuswrt-mcp\\\\.venv\\\\Scripts\\\\python.exe\",\n      \"args\": [\"-m\", \"asuswrt_mcp.server\"],\n      \"env\": {\n        \"ASUSWRT_HOST\": \"192.168.1.1\",\n        \"ASUSWRT_SSH_USERNAME\": \"admin\",\n        \"ASUSWRT_SSH_PASSWORD\": \"your_password\"\n      }\n    }\n  }\n}\n```\n\n### Using with npx Inspector (development)\n\n```bash\nnpx @modelcontextprotocol/inspector python -m asuswrt_mcp.server\n```\n\n## Development\n\n### Run tests\n\n```bash\npip install -e \".[dev]\"\npytest\n```\n\n### Run with live router integration tests\n\n```bash\nASUSWRT_TEST_ROUTER=1 pytest\n```\n\n## Project Structure\n\n```\nasuswrt-mcp/\n├── src/asuswrt_mcp/\n│   ├── server.py          # FastMCP entrypoint & tool definitions\n│   ├── service.py         # Business logic & router operations\n│   ├── config.py          # Settings management\n│   ├── clients/\n│   │   └── ssh.py         # SSH client wrapper\n│   ├── nvram.py           # NVRAM parsing utilities\n│   ├── ssh_parsers.py     # Output parsers for SSH commands\n│   ├── security.py        # Mutation guards & redaction\n│   ├── validators.py      # Input validation\n│   ├── responses.py       # Tool response formatting\n│   ├── errors.py          # Custom exceptions\n│   └── serialization.py   # Safe serialization\n├── tests/                 # Test suite (69 tests)\n├── .env.example           # Example configuration\n├── pyproject.toml         # Project metadata\n└── README.md              # This file\n```\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## Acknowledgments\n\n- [asusrouter](https://pypi.org/project/asusrouter/) for the underlying Python library\n- [MCP](https://modelcontextprotocol.io/) for the protocol specification\n- [AsusWRT-Merlin](https://asuswrt-merlin.net/) for the firmware",
  "bytes": 6102,
  "sha": "c7703b76fc262cb17b27ab97596ebeb48dace533dfbe35dd76d1b7110c301849",
  "repo_slug": "teefloo/asuswrt-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_teefloo_asuswrt_mcp_2917b2cd/readme"
}