a mcp server for watch your lan
447
MCP server for WatchYourLAN — exposes your network monitoring instance as tools that any MCP-compatible client (Claude Desktop, Claude Code, custom agents) can call.
Source: github.com/lordraw77/watchyourlan-mcp
The image ships two Python scripts:
| File | Role |
|---|---|
server.py | MCP server — 10 tools, stdio and SSE transports |
agent.py | Interactive CLI agent powered by OpenRouter |
The active mode is selected by environment variables passed to docker run.
MODE 1 — MCP server, stdio (default CMD)
──────────────────────────────────────────────────────────
MCP client (Claude Desktop / SDK)
│ stdin / stdout (JSON-RPC 2.0)
▼
[ lordraw/watchyourlan-mcp ]
│ HTTP
▼
WatchYourLAN :8840
MODE 2 — MCP server, SSE (MCP_TRANSPORT=sse)
──────────────────────────────────────────────────────────
MCP client (Claude Desktop / Code / SDK)
│ HTTP GET /sse
▼
[ lordraw/watchyourlan-mcp :8080 ]
│ HTTP
▼
WatchYourLAN :8840
MODE 3 — interactive agent (override CMD to agent.py)
──────────────────────────────────────────────────────────
terminal
│ stdin / stdout
▼
[ lordraw/watchyourlan-mcp → agent.py ]
│ stdio subprocess │ HTTPS
▼ ▼
[ server.py ] OpenRouter LLM
│ HTTP
▼
WatchYourLAN :8840
| Property | Value |
|---|---|
| Base image | python:3.12-slim |
| Build | Multi-stage — deps compiled in builder layer, only runtime ships |
| Default transport | stdio |
| SSE port | 8080 |
| Default command | python3.12 server.py |
| Config | Environment variables (--env-file .env) |
docker run --rm -i \
--env-file .env \
lordraw/watchyourlan-mcp
The -i flag is required — the stdio transport keeps stdin open.
docker run --rm \
--env-file .env \
-e MCP_TRANSPORT=sse \
-p 8080:8080 \
lordraw/watchyourlan-mcp
MCP clients connect to http://localhost:8080/sse.
docker run --rm -it \
--env-file .env \
lordraw/watchyourlan-mcp \
python3.12 agent.py
Create a .env file (never pass secrets as image layers):
# WatchYourLAN instance (required)
WYL_BASE_URL=http://192.168.1.10:8840
WYL_TIMEOUT=10
# Transport (optional, default: stdio)
MCP_TRANSPORT=stdio # or: sse
MCP_HOST=0.0.0.0 # SSE bind host
MCP_PORT=8080 # SSE bind port
# OpenRouter — only needed when running agent.py
OPENROUTER_API_KEY=sk-or-...
OPENROUTER_MODEL=google/gemini-2.0-flash-001
| Variable | Required | Default | Description |
|---|---|---|---|
WYL_BASE_URL | yes | http://localhost:8840 | WatchYourLAN base URL |
WYL_TIMEOUT | no | 10 | HTTP timeout (seconds) |
MCP_TRANSPORT | no | stdio | Transport: stdio or sse |
MCP_HOST | no | 0.0.0.0 | SSE server bind host |
MCP_PORT | no | 8080 | SSE server port |
OPENROUTER_API_KEY | agent only | — | API key from openrouter.ai |
OPENROUTER_MODEL | no | google/gemini-2.0-flash-001 | OpenRouter model ID |
{
"mcpServers": {
"watchyourlan": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"--env-file", "/absolute/path/to/.env",
"lordraw/watchyourlan-mcp"
]
}
}
}
{
"mcpServers": {
"watchyourlan": {
"type": "sse",
"url": "http://localhost:8080/sse"
}
}
}
If WatchYourLAN runs on the same Docker host:
# Linux — share the host network stack
docker run --rm -i --network host \
--env-file .env \
lordraw/watchyourlan-mcp
# macOS / Windows — use the host gateway alias
# set WYL_BASE_URL=http://host.docker.internal:8840 in .env
docker run --rm -i \
--env-file .env \
lordraw/watchyourlan-mcp
| Tool | Description |
|---|---|
get_all_hosts | List every tracked device |
get_host | Details of one host by ID |
get_status | Network summary (online / offline / known / unknown) |
get_history_all | Full event history ⚠ can be large |
get_host_history_by_date | History for a device filtered by date |
get_host_history_last_n | Last N history entries for a device |
check_port | Test if a TCP port is open on a host |
edit_host | Rename a host or toggle its Known state |
delete_host | Remove a host |
send_test_notification | Fire a test notification |
Content type
Image
Digest
sha256:40dc9f707…
Size
59.1 MB
Last updated
3 months ago
docker pull lordraw/watchyourlan-mcp