curfew-mcp
curfew-mcp lets an AI agent watch a NETGEAR router and cut the kids' devices off the internet — via guest Wi-Fi, router Access Control, schedules, or an instant ARP-based pause.
Monitor (read-only)
router_status,wifi_info,traffic_stats,check_firmware— model, firmware, uptime, WAN/LAN, bands and guest state, traffic totals, update checklist_devices,known_devices,scan_network,who_is_new,device_history— who's attached now, everything remembered (filter by owner/tag/online), what changed, first-seen after a window, join/leave sessionssystem_log,access_status,list_schedules,list_groups,list_paused— DHCP/attack logs, blocked devices and why, schedules with active/idle state, groups, current pauses
Organize
name_device— nickname, owner, tags, notes in a local registry (nothing changes on the router)set_group_membership— add/remove devices from groups likekidsoriot
Cut access
set_guest_wifi— turn the guest network on/off on 2.4, 5, or both; the README's core trick, though it briefly drops all Wi-Fiset_access— block/unblock a group, owner, or single device via the router's Access Controladd_schedule,list_schedules,remove_schedule,apply_schedules— daily/weekday/weekend block windows, enforced by a background watcher or on demandpause_device,resume_device,list_paused— instant cutoff for already-connected devices (ARP interception); device stays on Wi-Fi and reachable on the LAN
Destructive
reboot_router— takes everyone down for ~2 minutes; requiresconfirm=true
Provides local control of a NETGEAR Nighthawk CAX80 cable modem router over its SOAP API, with tools for router status, Wi-Fi info, device registry management, access control, schedules, traffic stats, firmware checks, guest Wi-Fi, reboots, and Eclipse Pause instant network cutoffs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@curfew-mcp cut my kid's iPad off the internet right now"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
curfew
A dinner bell for your home Wi-Fi.
curfew turns the internet off for the kids' devices and leaves the rest of the house alone: the servers, the cameras, the thermostat, and whatever else in your home has decided it needs Wi-Fi. The trick is not clever. Put the kids on the router's guest network, then switch that network off with one command, on a schedule, or by asking an AI agent. It talks to the router directly over the local network. No cloud account, no subscription.
How it got here, including the two weeks spent building the wrong thing first: The Case of the YouTube Shorts That Survived Every Parental Control.
Will it work on my router?
It is built and tested on a NETGEAR Nighthawk CAX80, firmware V5.1.1.8. Other NETGEAR routers speak the same kind of local API, so many commands may just work, but I have only tested mine. To see what yours supports, run the discovery script (see Hacking on it); it probes every action read-only and writes a report.
No NETGEAR? The idea still works: most routers' own apps can switch the guest network on and off. You just do it by hand.
You need Python 3.12+ and uv.
Related MCP server: archer-router-mcp
Try it in five minutes
git clone https://github.com/sergenes/curfew.git && cd curfew
uv sync
cp .env.example .env # set CURFEW_PASSWORD, your router's admin password
uv run curfew status # model, firmware, uptime: proof it can reach the router
uv run curfew wifi # both bands, including whether the guest network is onThen the main event. Warn the household first, because you will be asked questions:
uv run curfew guest off # guest Wi-Fi off on both bands
uv run curfew guest onHeads up: the main Wi-Fi blinks too. The router applies any guest network change by restarting its wireless radios, and the guest and main networks share those radios. So every
guest onorguest off, whether you run it or a schedule does, knocks everyone off Wi-Fi for 30 to 60 seconds, not just the kids. Devices reconnect on their own, but calls drop and streams stall. This is the router's firmware, not curfew: flipping the guest network in NETGEAR's own web page does the same. Wired devices are not affected.
The setup that works
Turn on the router's guest network and give it a name the kids will recognise.
Move the kids' phones, tablets, and laptops onto it. The TVs too, if screens in the living room count.
Keep everything else, the smart home included, on the main network.
Keep the main Wi-Fi password to yourself. This is the hardest step.
It does not care which device is which, so the private, rotating MAC addresses on iPhones and iPads cannot slip past it, and there is no device list to maintain.
Bedtime on a schedule
uv run curfew guest schedule --from 21:00 --to 07:00 --name kids-wifi-night
uv run curfew guest schedule --from 22:00 --to 06:30 --days weekdays --band 5
uv run curfew schedule list # shows "guest wifi off both 21:00-07:00", active or idle
uv run curfew schedule remove <id>Schedules fire from the watcher, so it has to be running:
uv run curfew watch in a terminal, uv run curfew watcher install to run it at login on a Mac, or a systemd service on an always-on Linux box (docs/linux-box.md).
A schedule acts only at the edges of its window.
If Friday is movie night and you run guest on at nine thirty, it stays on until the next boundary, and the schedule does not argue.
Ask an agent instead
curfew ships an MCP server, so any MCP-capable agent can run it for you.
.mcp.json registers it with Claude Code when you start Claude Code in this folder; elsewhere, run uv run curfew-mcp (stdio).
Then just say it: "turn off the kids' Wi-Fi", "no Wi-Fi for the kids after ten on school nights", "what schedules are set?"
The tools behind those are set_guest_wifi, add_guest_schedule, list_schedules, and remove_schedule, alongside read-only ones like router_status, wifi_info, and list_devices.
What it cannot do
Mobile data. A phone on a data plan switches to cellular when the Wi-Fi goes. The router has no say; your carrier might (on Google Fi, the plan owner can pause a member's data from the Fi app).
Downloaded video. Shorts already on the device keep playing until they run out. The internet is gone; the buffer is not. Give it a minute.
A leaked password. If the kids know the main Wi-Fi password, they know the way around. See step 4.
Poke around
uv run curfew status # model, firmware, uptime, WAN, LAN, Access Control
uv run curfew wifi # both bands, channels, security, guest state
uv run curfew devices # who is attached right now
uv run curfew log # DHCP leases, Access Control decisions, attack warnings
uv run curfew traffic # traffic meter totals
uv run curfew firmware # ask the router for updates (about 10 s)Every command takes --json, and every change curfew makes is appended to ~/.curfew/changes.log.
Local state lives in ~/.curfew/; set CURFEW_DATA_DIR to move it.
The detours
Before the guest network turned out to be the answer, curfew grew a device registry, per-device blocking at the router, an instant per-device pause, and a DNS website filter. They still work, and they are useful when you need to single out one device on the main network. Everything about them is in docs/detours.md.
Hacking on it
uv run ruff check . && uv run ruff format --check .
uv run mypy
uv run pytest # recorded router responses, no router needed
uv run pytest -m live # smoke test against the real router
uv run python scripts/discover.py # probe every router action read-only, write discovery/SUMMARY.md
uv run python scripts/make_fixtures.py # refresh sanitized fixtures from discovery dumpsThe tests run against real responses recorded from firmware V5.1.1.8, with MACs, SSIDs, serial and public addresses replaced by synthetic values, so you can change the code without touching a router.
The router updates its own firmware, and NETGEAR can change response layouts between versions.
When a command breaks after an update: re-run discover.py and diff discovery/SUMMARY.md, fix the parser in curfew/actions.py (errors include the raw XML), regenerate fixtures with make_fixtures.py, and run pytest until green.
The code, briefly:
curfew/soap.py async SOAP client: login, session refresh, config mode
curfew/actions.py one function per router action, typed results
curfew/registry.py SQLite device registry, groups, schedules, overrides
curfew/scheduler.py rule evaluation in local time, manual override precedence
curfew/services/ compositions: status, wifi, devices, control, and the detours
curfew/mcp_server.py MCP server (stdio)
curfew/cli.py typer CLI
scripts/ discovery and fixture tooling
tests/ fake router, recorded fixtures, temp registriesDesign notes and the roadmap are in PLAN.md; what the firmware supports is in discovery/SUMMARY.md.
Companion writing
LinkedIn post: coming soon
License and author
MIT, see LICENSE.
Sergey Neskoromny.
Reach me on LinkedIn.
Available Tools
24 toolsaccess_statusBRead-only
Whether Access Control is on, which devices are blocked and why, and which schedules are active.
Inputs: no named parameters. Returns: object
add_scheduleAIdempotent
Block a group, owner or device every day between start and end (local time, e.g. 21:00 to 07:00).
days: daily, weekdays, weekends, or a list like mon-fri or sat,sun.
Enforced by the background watcher or by apply_schedules.
Inputs: end (required), start (required), target (required), days, +1 more. Returns: object
apply_schedulesBIdempotent
Evaluate schedules and manual overrides now and push any needed allow/block changes to the router.
Inputs: no named parameters. Returns: object
check_firmwareARead-only
Ask the router whether a firmware update is available. Slow: about 10 seconds.
Inputs: no named parameters. Returns: object
device_historyCRead-only
Presence sessions for one device (MAC, nickname, router name or IP): when it joined and left.
Inputs: device (required), limit. Returns: object
known_devicesBRead-only
Everything the registry remembers, online or not. Filter by owner, tag, or online state.
Inputs: tag, owner, online_only. Returns: object
list_devicesBRead-only
Every device attached to the router right now, merged with nicknames, owners, tags and vendor.
Also records the sighting in the local registry. Takes a few seconds; the router is slow here.
Inputs: no named parameters. Returns: object
list_groupsBRead-only
Device groups (kids, parents, iot, ...) with their members and current access state.
Inputs: no named parameters. Returns: object
list_pausedARead-only
Devices currently held in Eclipse Pause, and whether the enforcement daemon is running.
Inputs: no named parameters. Returns: object
list_schedulesARead-only
All schedules with whether each is active right now.
Inputs: no named parameters. Returns: object
name_deviceAIdempotent
Assign a nickname, owner, tags or notes in the local registry (nothing changes on the router).
device: MAC, current nickname, router name or IP. Pass "" to clear a field; omit to leave it alone.
Inputs: device (required), tags, notes, owner, +1 more. Returns: object
pause_deviceAIdempotent
Instantly cut a group, owner or device off the internet via Eclipse Pause (ARP interception).
This is the immediate cutoff that works on already-connected devices, unlike the MAC block.
The device stays on wifi and reachable on the LAN. Records the pause; the eclipse daemon
(running as root) enforces it within a couple of seconds. Use resume_device to lift it.
Inputs: target (required), reason. Returns: object
reboot_routerADestructive
Reboot the router. Everyone loses internet for about two minutes. Requires confirm=true.
Inputs: confirm. Returns: object
remove_scheduleBIdempotent
Delete a schedule by id. Devices it blocked are released at the next apply.
Inputs: schedule_id (required). Returns: object
resume_deviceAIdempotent
Lift an Eclipse Pause for a group, owner or device, or all_devices=true for everyone.
Inputs: target, all_devices. Returns: object
router_statusCRead-only
Router model, firmware, uptime, CPU and memory, WAN state, LAN, Access Control, device count.
Inputs: no named parameters. Returns: object
scan_networkARead-only
Refresh the registry from the router and report what changed: new devices, returned, left.
Inputs: no named parameters. Returns: object
set_accessAIdempotent
Turn internet access on or off for a group (e.g. "kids"), an owner (e.g. "Sam") or one device.
Blocking uses the router's Access Control; it is enabled automatically the first time. A manual change lasts until the target's next scheduled change, or until flipped back if it has none.
Inputs: target (required), enabled (required), reason. Returns: object
set_group_membershipAIdempotent
Add a device to a group (member=true) or remove it (member=false). Groups are created on first use.
Inputs: group (required), device (required), member. Returns: object
set_guest_wifiAIdempotent
Turn the guest wifi network on or off. band: 2.4, 5, or both.
Inputs: enabled (required), band. Returns: object
system_logBRead-only
Recent router log entries, newest first: DHCP leases, Access Control decisions, attack warnings.
category filters by substring, e.g. 'DHCP' or 'Access Control'.
Inputs: limit, category. Returns: object
traffic_statsARead-only
Traffic meter totals for today, yesterday, week, month. Zero unless the meter is enabled.
Inputs: no named parameters. Returns: object
who_is_newARead-only
Devices first seen after since ('7d', '24h', '30m', or an ISO date). Runs a scan first.
Inputs: since. Returns: object
wifi_infoBRead-only
SSIDs, channels, security mode and guest network state for the 2.4 GHz and 5 GHz bands.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Several tools cluster around the same concepts: known_devices vs list_devices vs scan_network vs who_is_new all address device inventory, and set_access vs pause_device both cut internet access (distinguished only by a paragraph of prose about MAC vs ARP blocking). The descriptions do help, but an agent must read carefully to pick correctly between the two blocking mechanisms and the four discovery tools.
Verb prefixes are used consistently within families (list_*, set_*, add_/remove_*), but many tools are bare noun phrases (known_devices, device_history, system_log, wifi_info, traffic_stats, router_status, access_status), giving a mixed convention. It remains readable but there is no single predictable pattern.
24 tools is on the heavy side, but the domain is genuinely broad (device discovery, groups, two distinct blocking mechanisms, scheduling, wifi, diagnostics, reboot), so most tools earn their place. Slightly over-scoped rather than padded.
Coverage is strong: full lifecycle for schedules (add/list/remove/apply) and both pause and access-control paths, plus discovery, naming, status and diagnostics. Minor gaps exist, such as no schedule edit/update and no way to remove devices or groups from the local registry.
Maintenance
Related MCP Connectors
IP intelligence, network diagnostics, and AI service availability tools for AI agents.
Gives AI agents a public IPv6 identity, hostname, port forwarding, web fetch, team mesh. Free tier.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to monitor and control Nokia G-2425G-A GPON home routers (e.g., Airtel) via natural language, including listing connected devices, and blocking or unblocking internet access for specific devices.5MIT
- AlicenseNot gradedqualityBmaintenanceEnables LLM/MCP clients to read and, when explicitly allowed, modify TP-Link Archer AX53 router settings directly over the LAN using the router's own web protocol, without a browser or cloud account. It is read-first, write-gated, and lockout-aware, with tools for clients, DHCP, Wi-Fi, access control, presence history, and other router operations.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with Netgear Genie cable modems to retrieve hardware status, DOCSIS channel data, RF signal health diagnostics, and event logs, and to perform confirmed modem reboots or log clearing.MIT
- AlicenseAqualityBmaintenanceEnables LLM clients to inspect and manage a TP-Link Deco mesh Wi-Fi network, covering mesh nodes, connected devices, SSIDs and radio settings, internet status, blocked clients, and DHCP address reservations. Runs entirely against the router on the local network without any cloud account.15MIT