mcp-fritzbox
Click on "Install 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., "@mcp-fritzboxlist my smart home devices"
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.
mcp-fritzbox
A Model Context Protocol (MCP) server for interfacing with AVM FRITZ!Box routers (FRITZ!OS 8.20+). Control smart home devices, monitor network status, and administer your router through any MCP-compatible client.
Design Architecture
MCP Client (Claude Desktop, Claude Code, etc.)
│ stdio or HTTP/SSE
MCP Server (server.ts)
│ routes tool calls
├── SmartHomeClient ──→ REST API (/api/v0/smarthome/)
├── TR064Client ──────→ SOAP (TR-064 UPnP)
└── AuthProvider ─────→ SID login (login_sid.lua) + HTTP DigestComponents
Component | File | Responsibility |
AuthProvider |
| MD5 challenge-response SID login, HTTP digest credentials for TR-064, lazy re-auth on session expiry |
SmartHomeClient |
| REST calls to the FRITZ!Box Smart Home API for thermostats and switches |
TR064Client |
| SOAP calls for router administration (WAN status, bandwidth, guest WiFi, etc.) |
HTTP Client |
| Shared axios instance with 403 interceptor for automatic SID renewal |
MCP Server |
| Tool registration and error handling — maps MCP tool calls to client methods |
Related MCP server: flamerobin-mcp-server
Tools
Smart Home
Tool | Arguments | Output |
| none |
|
|
| Updated thermostat state (target temp, current temp, battery) |
|
| Updated switch state with current power reading (mW) and total energy (Wh) |
|
| Temperature history or energy consumption statistics |
Router Administration (TR-064)
Tool | Arguments | Output |
| none |
|
| none |
|
| none |
|
|
|
|
|
| Array of recent system log lines (default: 20) |
| none |
|
Setup Guide
1. Create a FRITZ!Box User
Open your FRITZ!Box web UI at
http://fritz.boxNavigate to System → FRITZ!Box Users → Add User
Set a username and password
Enable these permissions:
Smart Home — required for thermostat/switch control
FRITZ!Box Settings — required for TR-064 (WAN status, guest WiFi, etc.)
Access from the Internet — only if you need remote access
Click Apply
2. Install
From GitHub:
git clone https://github.com/ghbalf/mcp-fritzbox.git
cd mcp-fritzbox
npm install
npm run build3. Configure
Set environment variables:
export FRITZBOX_HOST=fritz.box # default, or use IP: 192.168.178.1
export FRITZBOX_USERNAME=your_user
export FRITZBOX_PASSWORD=your_passOr pass CLI flags:
node dist/index.js --host 192.168.178.1 --user admin --pass secretCLI flags override environment variables.
4. Connect to an MCP Client
Claude Code — add a .mcp.json to your project root:
{
"mcpServers": {
"fritzbox": {
"command": "node",
"args": ["/path/to/mcp-fritzbox/dist/index.js"],
"env": {
"FRITZBOX_HOST": "fritz.box",
"FRITZBOX_USERNAME": "your_user",
"FRITZBOX_PASSWORD": "your_pass"
}
}
}
}Claude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"fritzbox": {
"command": "node",
"args": ["/path/to/mcp-fritzbox/dist/index.js"],
"env": {
"FRITZBOX_HOST": "fritz.box",
"FRITZBOX_USERNAME": "your_user",
"FRITZBOX_PASSWORD": "your_pass"
}
}
}
}HTTP/SSE mode (for remote clients):
node dist/index.js --http --port 3000
# SSE endpoint: http://localhost:3000/sse
# Message endpoint: http://localhost:3000/messages5. Verify Connection
FRITZBOX_USERNAME=your_user FRITZBOX_PASSWORD=your_pass npm run test:integrationDevelopment
npm run start:dev # Run with tsx (no build needed)
npm run build # Compile TypeScript
npm test # Run unit tests
npm run test:watch # Watch mode
npm run test:integration # Live FRITZ!Box connection testTroubleshooting
Error | Cause | Fix |
| Wrong username or password | Verify credentials in FRITZ!Box UI under System → FRITZ!Box Users |
| FRITZ!Box unreachable | Check |
| Network issue or wrong port | Ensure you're on the same LAN; check no firewall blocks port 80/49000 |
| User lacks permissions | Enable "Smart Home" and "FRITZ!Box Settings" in the user's FRITZ!Box permissions |
| Invalid AIN | Run |
| Out of range | Temperature must be 8.0–28.0°C, or |
SOAP fault on guest WiFi | No guest network configured | Set up a guest network in FRITZ!Box UI first (WiFi → Guest Access) |
TR-064 401 Unauthorized | Digest auth rejected | User needs "FRITZ!Box Settings" permission; some models require explicit TR-064 access |
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ghbalf/mcp-fritzbox'
If you have feedback or need assistance with the MCP directory API, please join our Discord server