fritzbox-mcp
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., "@fritzbox-mcp show me the devices on my FRITZ!Box and which ones are active"
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.
fritzbox-mcp
An MCP server for a FRITZ!Box router. It talks TR-064 (SOAP over HTTPS on port 49443, with digest auth) and gives a model ten tools: reads for the line, devices, mesh, Wi-Fi and port forwards, and a two-step plan and apply for changes. It runs over stdio for a local client such as Claude Code, or over streamable HTTP behind an MCP gateway.
Tools
Tool | What it returns |
| Model, firmware, uptime, internet connection, public IP, line rate, DHCP range |
| Every device the box knows: IP, MAC, name, active, LAN or Wi-Fi, guest, internet blocked |
| Mesh nodes and their links |
| Wi-Fi interfaces by index: SSID, on or off, channel, security, client count (never the keys) |
| Port forwards from the internet |
| The box's TR-064 services |
| One service's actions, which of them are reads, and each input argument with its type, allowed values, range and default |
| Any read action, with arguments |
| Changes, in two steps |
Reads are actions named Get*, X_AVM-DE_Get* or X_Get*. Answer fields that look secret (passwords, Wi-Fi keys, PSKs, PINs) come back as <hidden>, and so does the configured password wherever it appears.
On fiber models, GetCommonLinkProperties reports the line as 1 Mbit/s. fritzbox_status reads the provisioned rate from X_AVM-DE_GetOnlineMonitor instead and falls back to the Layer 1 fields on boxes without it.
Related MCP server: fritz-mesh-mcp
Changes
fritzbox_plan writes nothing. It returns what would change and an expect text such as 1 change, 0 delete. fritzbox_apply(plan_id, expect) makes the change once. Plans are signed with a key that lives only in the running process, expire after 15 minutes, and are refused if what they touch has changed since.
Op | What it does |
| Adds a forward to a LAN address. If the port already forwards somewhere else, the old mapping is removed first, which counts as a removal |
| Removes a forward |
| Turns a Wi-Fi interface on or off |
| Cuts one device off the internet; the LAN keeps working |
| Wake-on-LAN |
| Drops and redials the line |
| Restarts the box; the home network is down for about 3 minutes |
| Any other TR-064 action, checked against the service's own action list. Actions named Delete or Remove count as removals |
Removals need FRITZ_MCP_DELETE=1. Everything else needs only the apply, which a client like Claude Code asks you to approve. The plan warns when a change can cut the model's own connection (reboot, reconnect, Wi-Fi off) or hits a device listed in FRITZ_MCP_KEY_HOSTS. Every plan and apply goes to an audit log in the state directory.
FRITZ!Box user
Make a separate user in the box (System > FRITZ!Box Users) with the right to change FRITZ!Box settings, and turn on "Allow access for applications" under Home Network > Network > Network Settings. Adding port forwards through TR-064 can also need the box's setting that lets applications change port sharing.
Settings
Variable | Meaning |
| Default |
| The FRITZ!Box user. The password is never printed |
| Allows removals |
| Seconds, default 30 |
| Optional text added to the server's instructions, for what the model should know about your network ("the NAS at .20 runs the VPN; the repeater in the attic carries the office") |
| Optional |
| Where plans and the audit log go |
On Windows, a variable set with setx is read from the registry, so a running client picks it up without a restart.
Running it locally
With uv, in Claude Code:
claude mcp add fritzbox --env FRITZ_USER=mcp --env FRITZ_PASSWORD=... -- uvx --from git+https://github.com/androsmeda/fritzbox-mcp fritzbox-mcpOr in a client's JSON config:
"fritzbox": {
"command": "uvx",
"args": ["--from", "git+https://github.com/androsmeda/fritzbox-mcp", "fritzbox-mcp"],
"env": {"FRITZ_USER": "mcp", "FRITZ_PASSWORD": "..."}
}Behind a gateway
With MCP_TRANSPORT=http the server listens on MCP_HTTP_HOST:MCP_HTTP_PORT (default 0.0.0.0:8000) at /mcp. It refuses to start unless these are set:
MCP_HTTP_TOKEN: at least 32 printable characters. Every request needs exactly oneAuthorization: Bearer <token>header.MCP_HTTP_ALLOWED_HOSTS: the host names the gateway uses, such asfritzbox-mcp:8000.
MCP_HTTP_TOOLS=read (the default) serves only the read tools and removes plan and apply before the server starts. MCP_HTTP_TOOLS=all serves all ten, and the gateway decides who reaches them. Either way, only initialize, ping, tools/list and tools/call are answered. The server speaks plain HTTP, so keep its port on the gateway's internal network.
The image is ghcr.io/androsmeda/fritzbox-mcp, tagged with the commit SHA:
docker run -d --name fritzbox-mcp --network gateway-net \
-e FRITZ_URL=https://192.168.178.1:49443 -e FRITZ_USER=mcp -e FRITZ_PASSWORD=... \
-e MCP_HTTP_TOKEN=... -e MCP_HTTP_ALLOWED_HOSTS=fritzbox-mcp:8000 \
-v /path/to/state:/state ghcr.io/androsmeda/fritzbox-mcp:<sha>It runs as uid 99, gid 100, so the state folder must be writable by that user.
Tests
uv run pytestThe tests run against a fake box (tests/fake_fritz.py) that speaks digest auth, the TR-064 description and SCPDs, SOAP, and the host and mesh list files, so they never call a real box.
License
MIT
Available Tools
10 toolsfritzbox_actionsCRead-only
The actions of one TR-064 service with their in/out arguments, and which ones are reads.
Inputs: service (required).
fritzbox_applyADestructive
Apply a plan from fritzbox_plan, once. expect must be its exact text, e.g. '1 change, 0 delete'. Refuses if the plan is old, used or altered, removes things while FRITZ_MCP_DELETE is off, or what it touches changed.
Inputs: expect (required), plan_id (required).
fritzbox_getARead-only
Run one read action (Get* or X_AVM-DE_Get*) with NewName arguments, e.g. service 'Hosts', action 'GetGenericHostEntry', args {'NewIndex': 0}. Secret-looking answer fields are masked.
Inputs: action (required), service (required), args.
fritzbox_hostsBRead-only
Every device the box knows: IP, MAC, name, active, LAN/Wi-Fi, port, speed, guest, internet blocked. active_only, query (matches any field).
Inputs: query, active_only.
fritzbox_meshBRead-only
Mesh nodes (box, repeaters, clients) with their links and current rates.
Inputs: no named parameters.
fritzbox_planARead-only
Plan changes; writes nothing. changes = list of {op:'port-forward', external_port, protocol:'TCP'|'UDP', internal_client, internal_port?, description?, enabled?}, {op:'port-forward-delete', external_port, protocol} (a removal), {op:'wifi', index, enable}, {op:'block-internet', ip, blocked}, {op:'wake', mac}, {op:'reconnect'}, {op:'reboot'}, {op:'call', service, action, args} (any other TR-064 action). Returns a plan_id valid 15 minutes.
Inputs: changes (required).
fritzbox_port_forwardsBRead-only
Port forwards from the internet to LAN devices (TR-064 port mappings).
Inputs: no named parameters.
fritzbox_servicesARead-only
The box's TR-064 services (for fritzbox_actions / fritzbox_get).
Inputs: no named parameters.
fritzbox_statusBRead-only
Model, firmware, uptime, internet connection and public IP, line rates, DHCP range.
Inputs: no named parameters.
fritzbox_wifiBRead-only
Wi-Fi interfaces by index: SSID, on/off, channel, standard, security, connected clients. Keys are never shown.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct FRITZ!Box area or phase of the plan/apply workflow, so most boundaries are clear. The only mild overlap is fritzbox_get, whose generic TR-064 read capability can duplicate specific readers like fritzbox_hosts, though the descriptions give enough guidance to choose.
All tools share the fritzbox_ prefix and use consistent snake_case, with readable noun names for readers and verb-like names for action tools. There are no mixed conventions or casing inconsistencies.
Ten tools is well-scoped for a router management server: a compact set of focused readers, three TR-064 introspection tools, and a safe plan/apply pair for writes. Nothing feels redundant or missing at the count level.
The surface covers status, hosts, mesh, Wi-Fi, port forwards, raw TR-064 discovery/read, and a broad write path via plans including port forwards, Wi-Fi, internet blocking, wake, reconnect, reboot, and arbitrary actions. This gives both targeted convenience tools and a generic escape hatch for less common operations.
Maintenance
Related MCP Connectors
BYOK AI router & FinOps control plane: audit token waste, check tool safety, and rank models.
Zero-trust gateway for AI agents: score tool calls, verify agent cards, enforce policy, audit.
Tailscale device, route, DNS, key, user, and ACL management over MCP and CLI.
Permission checks, human approval cards, and signed audit trails for AI agent tool calls.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server for interfacing with AVM FRITZ!Box routers. Control smart home devices, monitor network status, and administer your router through any MCP-compatible client.10MIT
- AlicenseBqualityCmaintenanceEnables management of a FRITZ!Box mesh over stdio, including band steering, radio and backhaul settings, DHCP IPv4 reservations, router status, guest Wi-Fi, port forwards, Wake-on-LAN, smart home switches, and reboot operations across a master and adopted repeaters.22MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI copilots and autonomous agents to inspect, diagnose, and safely manage TP-Link 4G/LTE gateways and broadband routers through typed MCP tools for status, signal, clients, Wi-Fi, DNS, SMS/USSD, and guarded mutations. It provides session leasing and confirmation safeguards to avoid locking out admins or disconnecting active sessions.MIT
- AlicenseBqualityBmaintenanceEnables MCP clients to read FRITZ!Box data over TR-064, including mesh, Wi-Fi, devices, logs, DSL, call lists, and voicemail, with optional guarded write actions for configuration changes.10MIT