Metadata-Version: 2.5
Name: netgear-mcp
Version: 0.1.0
Summary: MCP server for Netgear routers: read and change router settings via Claude, catalog-driven across models.
Project-URL: Homepage, https://github.com/emlama/netgear-mcp
Project-URL: Issues, https://github.com/emlama/netgear-mcp/issues
License-Expression: MIT
License-File: LICENSE
Keywords: claude,mcp,netgear,nighthawk,orbi,router
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Networking
Requires-Python: >=3.12
Requires-Dist: mcp[cli]>=2.3.0
Requires-Dist: pynetgear>=0.10.10
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: requests>=2.34.2
Description-Content-Type: text/markdown

# netgear-mcp

<!-- mcp-name: io.github.emlama/netgear-mcp -->

> [!WARNING]
> **Experimental.** netgear-mcp has been tested end to end on **one router, a NETGEAR MR80**. Support for the other 114 models is *expected* from the shared API but **not verified on real hardware**. Changing router settings can drop your connection or lock devices out. Use at your own risk, and please [report how it goes](#help-us-support-your-router).

An [MCP](https://modelcontextprotocol.io) server that lets Claude (or any MCP client) read and change settings on NETGEAR routers. You can ask "who's on the Wi-Fi?", "block the kids' tablet", "is guest Wi-Fi on?" or "run a speed test" instead of clicking through the router's web UI.

*Unofficial. Not affiliated with, endorsed by, or supported by NETGEAR. "NETGEAR", "Nighthawk" and "Orbi" are trademarks of NETGEAR, Inc.*

## Supported routers

| Status | Models | What works |
|---|---|---|
| **Verified** | MR80 | All 25 reads and 11 writes, confirmed live on firmware V1.1.7.12 |
| **Expected, unverified** | 114 other models: Nighthawk, Orbi, Nighthawk mesh, cable-modem routers, Orbi Pro | The same 25 reads. Writes are disabled until someone confirms them on that model |
| **Not supported** | Mobile hotspots (Nighthawk M-series), anything off the NETGEAR SOAP API | — |

Reads use NETGEAR's standard SOAP API (the one the Nighthawk app and [pynetgear](https://github.com/MatMaul/pynetgear) use), which is shared across the lineup, so they *should* work everywhere. Some older or cheaper models lack some features, and those reads will fail cleanly. The full list is in [docs/supported-models.md](https://github.com/emlama/netgear-mcp/blob/main/docs/supported-models.md).

**Have one of the 114?** Run `netgear-mcp diagnose` and [open a compatibility report](https://github.com/emlama/netgear-mcp/issues/new?template=model-report.yml). That's how models move from "expected" to "verified".

## What it can do

**Reads (all models):** attached devices, mesh satellites, router/system info, WAN/LAN info and link status, 2.4/5 GHz Wi-Fi settings, guest-network state, WPS, access-control / parental-controls / QoS status, traffic meter and usage, speed-test results, port-forwarding rules, NTP / time zone / uptime, remote management, and the system log.

**Writes (MR80 only, for now):**

| Tool | What it does |
|---|---|
| `set_device_access` | Allow or block a device by MAC |
| `set_access_control` | Turn the block-list feature on/off |
| `set_parental_controls` | Turn parental controls on/off |
| `set_guest_wifi_2g` / `set_guest_wifi_5g` | Turn the guest networks on/off (restarts the radios, 30–60 s drop) |
| `set_qos` | Turn QoS on/off |
| `set_traffic_meter` | Turn the traffic meter on/off |
| `run_speed_test` | Start an internet speed test |
| `rename_device` | Rename an attached device (keeps its icon) |
| `rename_router` | Rename the router itself |
| `reboot` | Reboot the router (~1–2 min outage) |

Safety rails:

- Every write needs `confirm=true`. Without it, the tool only describes what it *would* do.
- Writes that aren't verified on your model are never registered as tools at all.
- Reads redact secret-looking fields (Wi-Fi keys, passphrases) unless you pass `reveal_secrets=true`.

Known gap: `forward_port` (adding a port-forward rule) is disabled everywhere. On the MR80 the router reports success but never saves the rule. See [the validation log](https://github.com/emlama/netgear-mcp/blob/main/docs/dev/plans/mr80-validation-log.md).

## Install

Requires Python 3.12+ and [uv](https://docs.astral.sh/uv/).

**1. Store your router admin password.**

On macOS, use the Keychain (the default):

```sh
security add-generic-password -a admin -s netgear-<model> -w   # e.g. netgear-mr80; prompts for the password
```

On Linux and Windows, use the env store instead (see [Configuration](#configuration)).

**2. Check that it can talk to your router** (read-only):

```sh
NETGEAR_MODEL=mr80 uvx netgear-mcp diagnose
```

**3. Register it with your MCP client.** For Claude Code:

```sh
claude mcp add netgear -s user \
  -e NETGEAR_MODEL=mr80 \
  -- uvx netgear-mcp
```

For Claude Desktop, add the equivalent `command`/`args`/`env` entry to `claude_desktop_config.json`. Restart the client, then ask Claude "what devices are on my network?"

## Configuration

| Variable | Default | Purpose |
|---|---|---|
| `NETGEAR_MODEL` | `mr80` | Model profile to load: a file name in [`netgear_mcp/profiles/`](https://github.com/emlama/netgear-mcp/blob/main/netgear_mcp/profiles/) |
| `NETGEAR_HOST` | `192.168.1.1` | Router address |
| `NETGEAR_SECRET_STORE` | `keychain` | `keychain` (macOS) or `env` |
| `NETGEAR_USER` | `admin` | Admin account name (keychain store) |
| `NETGEAR_KEYCHAIN_SERVICE` | `netgear-<model>` | Keychain service name (keychain store) |
| `NETGEAR_PASSWORD_ENV` | `NETGEAR_ROUTER_PASSWORD` | Name of the env var that holds the password (env store) |

Env-store example:

```sh
claude mcp add netgear -s user \
  -e NETGEAR_MODEL=r7000 -e NETGEAR_SECRET_STORE=env -e NETGEAR_ROUTER_PASSWORD='…' \
  -- uvx netgear-mcp
```

The legacy `NIGHTHAWK_HOST`, `NIGHTHAWK_USER` and `NIGHTHAWK_KEYCHAIN_SERVICE` names still work.

## Caveats

- The router allows **one admin session at a time**. Using the server can log out an open web-UI session, and the other way round.
- The router uses a self-signed certificate, so TLS verification is off for the router connection. Run this only on a network you trust.
- Toggling guest Wi-Fi restarts the radios.

## Help us support your router

1. Run `netgear-mcp diagnose` (step 2 above). It's read-only, and the report holds no values, just the model, the firmware, and which reads pass.
2. [Open a compatibility report](https://github.com/emlama/netgear-mcp/issues/new?template=model-report.yml) and paste it in.
3. An automated triage bot labels it and replies with the next step. A maintainer then fixes it or hands it to an AI fix agent, which opens a pull request. Every PR gets human review before merge.
4. For writes, we may ask you to run one specific no-op test on your router (setting something to the value it already has). Writes can't be confirmed without real hardware.

Bugs and feature ideas go through the other [issue templates](https://github.com/emlama/netgear-mcp/issues/new/choose). The full process is in [CONTRIBUTING.md](https://github.com/emlama/netgear-mcp/blob/main/CONTRIBUTING.md). Please report security issues [privately](https://github.com/emlama/netgear-mcp/blob/main/SECURITY.md).

## How it works

Hexagonal (ports and adapters) design:

- **Core:** a capability engine that gates writes (verification tier + `confirm`) and redacts secrets.
- **Adapters:** a SOAP transport (pynetgear methods plus a raw-envelope writer for firmware-specific actions), a web-UI transport, Keychain and env secret stores, and a YAML model catalog.
- **Profiles:** `_netgear_base.yaml` holds the portable reads. Each `<model>.yaml` inherits them and adds that model's verified writes and quirks.
- **Verification tiers:** *Tier-0* capabilities are known (from pynetgear, community work or firmware disassembly) but unconfirmed, and they ship disabled. *Tier-1* capabilities are confirmed live on real hardware and are enabled.

Design spec: [docs/dev/specs/2026-11-18-netgear-router-mcp-design.md](https://github.com/emlama/netgear-mcp/blob/main/docs/dev/specs/2026-11-18-netgear-router-mcp-design.md).

## Development

```sh
uv sync --group dev
uv run pytest
```

See [CONTRIBUTING.md](https://github.com/emlama/netgear-mcp/blob/main/CONTRIBUTING.md) and [CLAUDE.md](https://github.com/emlama/netgear-mcp/blob/main/CLAUDE.md).

## License

[MIT](https://github.com/emlama/netgear-mcp/blob/main/LICENSE)
