omada-mcp
An MCP server that exposes TP-Link Omada SDN controller data and controls to AI hosts, read-only by default with optional allowlisted writes.
Discover sites, devices, clients (wired/wireless), WLANs/SSIDs, LAN/VLAN networks, DHCP reservations, ACLs, groups, port forwards, routes, DNS rules, VPN tunnels, logs, topology, and security status.
Inspect switch ports, PoE, LAGs, AP radios/RF scans, WAN/IPv6 status, network services, controller users/health, and backups.
Run composite diagnostics and audits:
network_audit,diagnose_client,diagnose_wan,explain_error, config snapshots, and drift diffs.Monitor with
--watch, Prometheus--export-metrics, and Docker; validate setup withomada-mcp --doctor.Optionally enable explicit write tools for switch/AP/client/VLAN/DHCP/ACL/SSID/routing/VPN/hotspot operations, with dry-run, confirm tokens, snapshots, audit logs, and anti-stranding checks.
Connect to Claude Desktop, Claude Code, Cursor, Hermes, or any MCP host over stdio JSON-RPC.
Provides tools for interacting with TP-Link Omada SDN controllers, enabling read-only access by default and optional allowlisted write operations across sites, devices, clients, switches, WLANs, routing, security, diagnostics, and rollback workflows.
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., "@omada-mcp which access points are overloaded on my Omada controller?"
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.
omada-mcp
A Model Context Protocol server for TP-Link Omada SDN controllers — zero dependencies, read-only by default, and honest about every failure.
Your Omada controller already knows which AP is overloaded, which client is
sitting on the guest VLAN, and which switch dropped a port. omada-mcp hands
that to Claude, Cursor, Hermes or any other MCP host — as 55 read-only tools
that return clean JSON (plus 79 optional write tools behind an explicit allowlist,
plus --watch and --export-metrics monitoring modes),
with a self-test that tells you exactly what to fix when something is wrong.
Release v2.4.0 adds paged client queries and smaller outputs:
optional pageSize/cursor, selected fields, and resultFormat="envelope".
Existing calls keep their full fields and array output.
uvx omada-mcp --doctoromada-mcp doctor v1.2.1 on Linux-6.8 (Python 3.12.7)
------------------------------------------------------------------
PASS env /home/you/.config/omada-mcp/.env | url=https://192.0.2.10:8043 user=omada-readonly password=set (24 chars)
PASS tls verified against /home/you/.config/omada-mcp/controller-ca.pem (serverName=Omada) | reachable, omadacId=0123456789abcdef01234567, controllerVer=6.2.10.17, family=software-6.x
PASS login token accepted for omada-readonly (role=Viewer, scope=all sites, cookie=TPOMADA_SESSIONID), Csrf-Token round-trip OK
PASS site Home (89abcdef0123456789abcdef) site 1 of 1; matched OMADA_SITE_NAME=Home
PASS tools list_devices -> 7 device(s); 54 read-only tools registered (0 write tool(s) enabled), 23 client(s)
PASS write disabled (OMADA_WRITE_TOOLS is empty; read-only tools only)
------------------------------------------------------------------
6/6 checks passed
Ready: `omada-mcp` will serve 54 read-only tools on stdio.Use omada-mcp --doctor --json for local automation. For public compatibility reports, run omada-mcp --doctor --json --share-safe. The share-safe report uses fixed diagnostic codes and omits controller addresses, account names, site identifiers, and local file paths. Both formats follow schemas/doctor.schema.json.
Why this exists
Omada exposes two unrelated APIs and the documentation blurs them:
Web API v2 ( | Open API ( | |
Auth | username + password ( | OAuth2 client-credentials |
Setup on controller | none — it is the API the web UI calls | "Platform Integration" must be configured |
Account roles | Viewer is enough | Client ID/secret per integration |
Works on OC200/OC300 | yes | firmware dependent |
omada-mcp speaks the Web API. That means: create a local Viewer account,
put three values in a dotenv file, and you are done. No OAuth app, no client
secret rotation, no per-firmware integration screen.
Three properties make it safe to hand to an LLM:
Read-only tools only. Every tool is annotated
readOnlyHint: true, andOMADA_READ_ONLY=truefails closed: a call to anything not declared read-only is refused with-32003before lookup, so a future write tool cannot leak past the switch.No secret echo. The password never appears in output (only
set (N chars)), the session token is never logged, and WLAN pre-shared keys are redacted —list_wlansreportshasPresharedKey: trueinstead.Errors that carry the fix. Controller error codes are translated (
-1505,-1600,-33726,-41011,-44116, …) and every message ends with the action to take.
Related MCP server: mcp-omada
Install
# from git (works today)
uvx --from git+https://github.com/falehsub/omada-mcp omada-mcp --doctor
# from PyPI
uvx omada-mcp --doctor
# or install the command
uv tool install omada-mcp # or: pipx install omada-mcp
pip install omada-mcp # plain pip
# from a local checkout:
git clone https://github.com/falehsub/omada-mcp && cd omada-mcp
uv tool install . # installs the `omada-mcp` command from the checkoutRequires Python 3.10+ and nothing else. There are no runtime dependencies —
urllib, ssl, json and argparse are the whole stack, which keeps the
supply chain at zero.
Configure
mkdir -p ~/.config/omada-mcp
cp .env.example ~/.config/omada-mcp/.env
chmod 600 ~/.config/omada-mcp/.env
$EDITOR ~/.config/omada-mcp/.envThe minimum is three lines:
OMADA_BASE_URL=https://192.0.2.10:8043
OMADA_USERNAME=omada-readonly
OMADA_PASSWORD=...Where configuration is read from
Highest priority first — the first hit wins per variable, and the process environment always overrides a file:
process environment (
export OMADA_BASE_URL=...)$OMADA_ENV_FILE— an explicit path (missing file = hard error, so a typo cannot silently fall through)./.env— relative to the working directory (handy for per-project setups)%APPDATA%\omada-mcp\.env— Windows only, where a Windows user expects a per-user config~/.config/omada-mcp/.env(or$XDG_CONFIG_HOME/omada-mcp/.env)
Windows
Everything is supported natively — no WSL, no MSYS. The console script installs as
omada-mcp.exe, and uvx / uv tool install behave exactly as on POSIX.
New-Item -ItemType Directory -Force "$env:APPDATA\omada-mcp" | Out-Null
Copy-Item .env.example "$env:APPDATA\omada-mcp\.env"
notepad "$env:APPDATA\omada-mcp\.env"Windows-specific behaviour, handled for you:
Config location.
%APPDATA%\omada-mcp\.envis picked up before~/.config/omada-mcp/.env, so the usual Windows location just works.Encoding. Stdio is forced to UTF-8. The console code page (cp1252, cp1256, cp437 …) cannot encode an Arabic or CJK SSID, and the failure mode is a
UnicodeEncodeErrorin the middle of a session — this never reaches you.Line endings. Frames are written with a single
\n; text mode would otherwise emit\r\nand strict clients can mis-frame. Incoming\r\nframes are accepted too.Proxies. System/WinINET proxies are ignored by default (
OMADA_USE_SYSTEM_PROXY=trueto opt in).File permissions. API keys live in your user profile;
--doctorskips the POSIXchmodadvice on Windows rather than handing you a command that does nothing. To restrict the file to your account:icacls "%APPDATA%\omada-mcp\.env" /inheritance:r /grant:r "%USERNAME%:F".
get_device/get_client accept a MAC in any format (AA-BB-CC-DD-EE-FF,
aabbccddeeff, aa:bb:cc:dd:ee:ff) as well as a hostname or IP, so PowerShell
output pastes straight in.
All variables
Variable | Default | Notes |
| — required |
|
| — required | Local controller account. |
| — required | Never printed, never logged. |
| first site | Display name, e.g. |
| first site | Hex id or name — names are resolved, because the controller only accepts the hex id in URLs (that mismatch is exactly what |
|
| Allow per-call |
| system store | PEM bundle with the controller's CA. |
|
|
|
|
|
|
| — | Optional TLS |
|
| Default |
| empty | Comma-separated exact write tool names to enable (wildcards and |
| platform state dir | Override directory for pre-write JSON snapshots and |
| empty | Comma-separated IPv4 hosts/CIDRs (in addition to controller host IP) protected from lockouts during VLAN isolation, DHCP pool, or deny-ACL writes. |
|
| System/registry proxies are ignored by default. On Windows, |
|
| Per-request timeout. |
|
| Minimum spacing between controller calls; raise to |
|
| Minimum serialized spacing between write requests (writes never auto-retry |
|
|
|
|
| Tool catalog surface: |
| all | Optional comma-separated tool categories ( |
|
| Emit single-line compact JSON in |
omada-mcp --show-config prints the resolved values with the password masked;
omada-mcp --doctor validates them.
Connect an MCP host
The server is plain stdio: a host runs uvx omada-mcp, then speaks JSON-RPC on
stdin/stdout. The OMADA_ENV_FILE environment variable lets several hosts share
one configuration file.
Hermes Agent
hermes mcp add omada --command uvx --args omada-mcp \
--env OMADA_ENV_FILE=$HOME/.config/omada-mcp/.envOr in ~/.hermes/config.yaml:
mcp_servers:
omada:
command: uvx
args: ["omada-mcp"]
env:
OMADA_ENV_FILE: /home/you/.config/omada-mcp/.envClaude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or
%APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"omada": {
"command": "uvx",
"args": ["omada-mcp"],
"env": {
"OMADA_ENV_FILE": "/home/you/.config/omada-mcp/.env"
}
}
}
}A copy lives at examples/claude_desktop_config.json.
Claude Code
claude mcp add omada --env OMADA_ENV_FILE=$HOME/.config/omada-mcp/.env -- uvx omada-mcp
claude mcp listCursor
.cursor/mcp.json in the project, or the global ~/.cursor/mcp.json:
{
"mcpServers": {
"omada": {
"command": "uvx",
"args": ["omada-mcp"],
"env": { "OMADA_ENV_FILE": "/home/you/.config/omada-mcp/.env" }
}
}
}Anything else
Any host that can spawn a process and speak newline-delimited JSON-RPC 2.0 works:
{
"mcpServers": {
"omada": {
"command": "uvx",
"args": ["omada-mcp"],
"env": { "OMADA_ENV_FILE": "/home/you/.config/omada-mcp/.env" }
}
}
}From a git checkout instead of PyPI:
uvx --from git+https://github.com/falehsub/omada-mcp omada-mcp --doctorTools
Fifty-five read-only tools are always registered;
80 optional write tools stay hidden and disabled until both OMADA_READ_ONLY=false
and OMADA_WRITE_TOOLS allowlist them explicitly. All site-scoped tools also accept
an optional per-call site name or ID (strictly pinned when OMADA_SITE_NAME/
OMADA_SITE_ID is set unless OMADA_ALLOW_CROSS_SITE=true). list_clients windowing
is bounded by limit (default 500, max 5000) and de-duplicated by MAC.
Read-only tools (always available)
Full generated parameter & safety reference across all 135 tools: docs/tools-reference.md.
Tool | Arguments | Returns |
| — | Sites visible to the account ( |
|
| Site name/id, WAN/LAN/WLAN state, device and client counts, controller version |
| — | MAC, name, type, model, firmware, IP, uptime, client count, status, |
|
| MAC, name, hostname, IP, wireless, guest, SSID, AP, network, VLAN, rx/tx, duration, last seen (UTC ISO-8601) |
|
| Same projection, wireless only |
|
| Same projection, wired only |
|
| Filtered client search ( |
|
| Currently blocked clients ( |
| — | Bandwidth rate-limit profiles ( |
| — | Reusable time-range schedule profiles ( |
| — | Controller accounts/roles ( |
| — | Global controller health, cloud/backup status, NTP/timezone & version metadata (secrets stripped) |
|
| One device |
|
| One client |
| — | SSID, band, VLAN, security, guest, steering/advanced flags, |
|
| Detailed non-secret config for one SSID (decoded |
| — | Wireless WLAN group IDs/names and member SSID summaries (secrets stripped) |
| — | Merged |
| — | Switch port profiles ( |
|
| Offline/static DHCP reservations from |
|
| Gateway ( |
|
| IP/port/profile groups ( |
| — | Port-forwarding NAT rules ( |
| — | Static/interface routes ( |
| — | Policy routing rules ( |
| — | Local LAN DNS records ( |
| — | UPnP, DNS proxy, mDNS rules & built-in profiles, DDNS, and WAN port state |
|
| Controller |
|
| Per-switch port link/speed/duplex, PoE budget/power, LAG membership, uplink & controller-port flags, RX/TX errors, and cable tests |
|
| Switch LAG / LACP port-channel groups ( |
|
| Switch L2 features: STP/RSTP/MSTP state & timers, loopback detection, jumbo MTU, multicast, capabilities, and active port mirrors |
| — | PoE power-saving schedules ( |
|
| Per-AP |
|
| Per-AP WLAN group binding and SSID overrides (name, enable, VLAN, and redacted |
| — | Site Wi-Fi radio & roaming features ( |
|
| Site mesh policy plus per-AP wireless mesh uplink/downlink tree and candidate parents ( |
| — | AI RF Planning config, schedule, latest optimization scan state, and experience index history |
|
| Latest RF scan status, decoded per-band channel survey ( |
|
| Live WAN link/internet state, failover/load-balance mode, gateway/DNS, latency/loss, and latest speedtest |
|
| Detailed WAN IPv4/IPv6 configs, DNS resolvers, WAN port config, and redacted DDNS bindings |
|
| Site-wide WAN and LAN/VLAN IPv6 posture summary |
| — | URL filtering (gateway/AP), bandwidth control, session limits, and gateway ACL counts |
| — | Gateway QoS BWC, class rules, VoIP QoS, WAN limits, and switch QoS queue profiles |
| — | Controller auto-backup schedule, stored auto-backup files (Admin), and backup status |
|
| Hotspot voucher groups and individual voucher statuses (category |
|
| Multi-site fleet health rollup (requires |
| — | WireGuard, OpenVPN, IPsec, and L2TP tunnel & peer state (all private keys, PSKs, and PEM blocks redacted) |
| — | Compact uplink tree (Gateway -> Switch[port] -> AP/Switch) using |
| — | IPS/IDS status and recent threat/WIDS alerts with graceful missing-hardware warnings |
|
| Composite client troubleshooter correlating client RSSI/SNR, |
|
| Composite WAN troubleshooter correlating link/failover, latency/loss, VPN state, and WAN log events |
| — | Composite one-call health audit: pending firmware, offline devices, PoE budget >= 85%, uplink speed mismatches, AP retry spikes, WAN loss/failover, unexpected VLAN clients, unisolated VLANs, DHCP pool utilization, and stable finding codes |
|
| Structured decoder for Omada |
|
| Read-only snapshot merging |
|
| Deterministic drift diff between two |
Opt-in write tools (OMADA_READ_ONLY=false + OMADA_WRITE_TOOLS)
Every write tool defaults to dryRun=true. Pass its fresh confirmToken as confirm when applying with dryRun=false. A preview token expires after five minutes, is valid only in the same server session, and binds the intended change to the resolved target and observed state. Apply results distinguish controller acceptance from verified read-back. Pre-mutation snapshots are scoped to the controller and site.
Category | Tools | Behaviour & Safety |
Snapshot rollback |
| Loads snapshot strictly inside |
Switch ports & L2 features |
| Port enable/PoE mode/profile updates, static/LACP LAG CRUD, STP/RSTP/MSTP & loopback/jumbo L2 config, port mirroring, PoE power-saving schedules & port bindings, custom port profile CRUD, PoE power cycling, and switch TDR cable diagnostics ( |
AP radios, RF scan & WLAN groups |
| Preserves sibling band configs during |
Live client controls & fixed IP |
| Full-object stripped client PATCH ( |
Offline DHCP reservations |
| Create/update/delete reservations in |
LAN & VLAN management |
| Two-endpoint LAN RMW, normalizes |
Groups, schedules & ACLs |
| Aligned CIDR packing ( |
Wireless SSIDs |
| Manage SSIDs under |
Routing, DNS, NAT & services |
| NAT port forwards, static & policy routing, local LAN DNS records, mDNS repeater rules, and UPnP toggle |
Active diagnostics & devices |
| Rename / LED / locate / reboot EAPs, switches, and gateways, run active ping/traceroute from adopted devices ( |
VPN, WireGuard & DDNS |
| Toggle site-to-site/client-to-site VPN tunnels, manage WireGuard tunnels & peers (optional Curve25519 key generation via controller or ephemeral keypair, peer reference guard, secret redaction), and manage redacted DDNS profiles |
Controller backup & Hotspot |
| Prepare/download bounded binary controller backups strictly under |
omada-mcp --list-tools prints active descriptors without touching the network
(add --all to inspect all 134 tools including non-allowlisted writes).
Every descriptor in tools/list declares MCP annotations and an MCP 2025-06-18
outputSchema, so hosts can auto-approve reads and validate structured results:
{
"name": "list_devices",
"title": "List Omada devices",
"outputSchema": {
"type": "object",
"properties": {
"items": { "type": "array" },
"count": { "type": "integer", "minimum": 0 }
},
"required": ["items", "count"]
},
"annotations": {
"title": "List Omada devices",
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
}
}Output shape (content vs structuredContent)
List tools (
list_devices,list_clients,list_wifi_clients,list_wired_clients,search_clients,list_blocked_clients,list_wlans,list_wlan_groups,list_lan_networks,list_port_profiles,list_rate_limit_profiles,list_schedules,list_poe_schedules,list_switch_lags,list_dhcp_reservations,list_acls,list_ip_groups,list_port_forwards,list_static_routes,list_policy_routes,list_lan_dns_rules,list_vpn_tunnels,list_logs,list_controller_users):content[0].textis serialized as a bare JSON array ([{...}, ...]), whilestructuredContentis an object matchingoutputSchema:{"items": [...], "count": <int>}. Callers parsingcontent[0].text(for example migrating from wrapper objects like{"devices": [...]}) receive a JSON list directly, whereas MCP2025-06-18hosts readstructuredContent.itemsandstructuredContent.count.Object tools (
get_device,get_client,get_site_info,get_controller_status,get_network_services,get_switch_ports,get_switch_global_features,get_ap_radios,get_ap_ssid_overrides,get_wifi_radio_features,get_mesh_status,get_wlan_optimization_status,get_rf_scan,get_wan_status,get_topology,get_security_status,diagnose_client,diagnose_wan,network_audit,explain_error,get_config_snapshot, and write envelopes): bothcontent[0].textandstructuredContentcontain the same JSON object matchingoutputSchema.
omada-mcp --list-tools prints active descriptors without touching the network;
omada-mcp --list-tools --all prints all 132 descriptors (add --compact for single-line JSON).
Direct controller connections reuse persistent HTTP/1.1 keep-alive TLS sockets (UrllibTransport),
and composite troubleshooters (network_audit, diagnose_client, diagnose_wan,
get_config_snapshot, --watch / --export-metrics) deduplicate repeated site-wide GETs within
a single invocation via an ephemeral per-call cache (OmadaClient.scoped_cache()).
Watch mode, Prometheus metrics & Docker
Both monitoring modes reuse one persistent authenticated OmadaClient session
and enforce >= 0.8 s pacing so they never evict shared sessions:
# Stream JSON telemetry snapshot + event diffs (wan_failover, ap_retry_spike, weak_client_rssi, dhcp_pool_utilization)
omada-mcp --watch --interval 30
# One-shot Prometheus text exposition
omada-mcp --export-metrics
# Persistent /metrics HTTP endpoint (cached with >= 5 s scrape TTL + /healthz)
omada-mcp --export-metrics --metrics-port 9108 --metrics-host 127.0.0.1Build and run the non-root container (OMADA_READ_ONLY=true by default):
docker build -t omada-mcp .
docker run --rm -i --env-file ~/.config/omada-mcp/.env omada-mcp --doctor
docker run --rm -p 9108:9108 --env-file ~/.config/omada-mcp/.env omada-mcp --export-metrics --metrics-port 9108 --metrics-host 0.0.0.0Safety model
Control | Behaviour |
| Refuses any tool not declared read-only ( |
| Defaults empty. Wildcards and |
Two-phase apply ( | Preview returns a diff and a single-use |
Snapshot before & verify after | Saves pre-write JSON snapshot + |
Anti-stranding guards | Refuses VLAN isolation, DHCP pool overlaps, or deny ACL rules that isolate/conflict with controller IP, gateway, device IPs, or |
Credential handling | Password only ever rendered as |
Secret redaction |
|
Session recovery | A 200 response containing the web UI shell triggers one re-login: reads replay once, writes re-read live state first and never auto-retry |
Pacing | Reads spaced by |
Dotenv hygiene |
|
Troubleshooting
Run omada-mcp --doctor first — it names the failing phase and the fix. The
table below maps the symptoms it cannot see.
Symptom | Cause | Fix |
| Site name used where the hex site id is required | Set |
| Wrong path shape ( | Reads retry once after 0.8 s; writes never auto-retry |
| Group is referenced by one or more ACL rules | Use |
| The group holds at most 16 entries | Store ranges as network-aligned CIDRs (packed automatically by |
| A mandatory field missing from a PATCH body — for LAN networks it is | Send the whole object (handled automatically by LAN write tools) |
| Current user role lacks write permission (e.g. Viewer account on Omada 6.2.x) | Use a dedicated Admin account for writes; keep Viewer for read-only mode |
| No adopted gateway/switch on the site supports Network Isolation | Adopt an isolation-capable gateway/switch or use gateway ACLs instead |
|
| Use an IP group (e.g. |
| Client does not exist, MAC belongs to a managed device, or Viewer role on | Use |
| You are on the Open API without Platform Integration | Use this server (Web API) instead |
HTTP 200 with HTML in response | The controller's server-side session died (cookie is still valid for 15 days) — another login for the same account, or a restart | Automatic: the client re-authenticates once and replays |
| Self-signed controller cert, IP/SAN mismatch, or Python 3.13+ strict X509 | Set |
| Wrong port or unroutable network | Controller web UI is |
Host starts but every call fails | No credentials at server start | Expected: |
Windows: timeouts although the controller pings | WinINET proxy inherited by | Proxies are off by default; if you need one, |
Windows: |
| Use |
Compatibility
See docs/compatibility.md for the full compatibility table.
Software controller v6.x — read-only path (
--doctor --jsonand 2.0.0's 35 read-only tools) verified live on6.2.10.17&6.3.0.45(TPOMADA_SESSIONID). In the isolated Docker Omada Controller6.2.14.11lab (v2.3.0),read_selftest.pypassed all 44 site/global read-only tools (10 skipped due to no adopted hardware and defaultOMADA_ALLOW_CROSS_SITE=false), alongside live verification ofaudit_all_sites, WireGuard tunnel/peer CRUD (upsert_wireguard_tunnel,upsert_wireguard_peer,delete_wireguard_tunnelpeer guard,delete_wireguard_peer), Hotspot voucher group lifecycle (create_hotspot_vouchers,revoke_hotspot_voucher), bounded binary backup export (export_controller_backup), and zero-driftdiff_config_snapshots(hasChanges=false), adding to prior live6.2.14.11CRUD coverage (create/update/delete_lan_network,set_vlan_dhcp_pools,upsert/delete_dhcp_reservation,create/replace/delete_ip_group,create/update/set_acl_rule_status/delete_gateway_acl,create_switch_acl/create_eap_acl,upsert/delete_port_profile,create/update/delete_ssid,upsert/delete_port_forward,upsert/delete_static_route,upsert/delete_mdns_rule,set_upnp,-33598/-41011, Viewer-1007 -> insight/clientsfallback). Switch/AP/client actions are covered across 250 offline tests against anonymized hardware fixtures and the statefulMockController.Software controller v5.x — expected (v5.13.30.8 core auth/list shapes supported; awaiting a share-safe doctor capture via the issue template).
OC200 / OC300 hardware &
TPEAP_SESSIONIDbuilds — expected (--doctordetects bothTPOMADA_SESSIONIDandTPEAP_SESSIONID, handles legacyresult.omadacIdlogin shapes, and reportshardware-5.x/hardware-6.x). Runomada-mcp --doctor --json --share-safeand submit a Controller Compatibility Report.
Development
git clone https://github.com/falehsub/omada-mcp && cd omada-mcp
python -m unittest discover -s tests -v # stdlib tests; loopback HTTP only
python -m omada_mcp.cli --help # after: pip install -e .
uvx --from . omada-mcp --doctor # what an external user does
# uv caches the build of a local *path* and does not rebuild when the source
# changes (`--refresh` does not help). Force a fresh environment while iterating:
UV_CACHE_DIR=$(mktemp -d) uvx --from . omada-mcp --doctorFor a repeatable live read-only sweep, use an explicit isolated lab configuration:
python scripts/read_selftest.py --env-file /path/to/isolated/viewer.envThe sweep forces read-only mode, blocks mutations at the transport boundary, and reports pass/fail/skip, elapsed time and request counts without controller payloads. Hardware-dependent checks are skipped when the site has no matching devices or clients. Configuration, service and routing exports expose known fields only; diagnostic snapshots are not full controller backups.
See the local review and prioritized improvements for measured results, limitations and the next development priorities.
Layout:
src/omada_mcp/config.py dotenv discovery, validation, base-URL normalisation, write allowlist
src/omada_mcp/errors.py OmadaError taxonomy, ERROR_CATALOG, explain_error_code, redaction
src/omada_mcp/transport.py pooled keep-alive HTTP/1.1 transport, TLS context, SiteInfo/AuthInfo
src/omada_mcp/client.py Web API v2 client: auth, pagination, write gate, snapshots/audit
src/omada_mcp/domains/ cohesive read, write, diagnostic, rollback & schema modules
src/omada_mcp/tools.py tool registry facade (54 read-only + 78 write = 132 tools)
src/omada_mcp/write_tools.py backward-compatible write handler & validator facade
src/omada_mcp/_helpers.py backward-compatible shared diagnostic helper facade
src/omada_mcp/monitor.py single-session --watch JSON diff streamer & --export-metrics Prometheus exporter
src/omada_mcp/server.py JSON-RPC stdio server, fail-closed gates, strict arg/bool checks
src/omada_mcp/doctor.py 6-phase self-test (env, tls, login, site, tools, write) with --json
Dockerfile minimal non-root container (stdio default, --watch, --export-metrics)
schemas/doctor.schema.json JSON Schema for --doctor --json
docs/tools-reference.md auto-generated 132-tool parameter & safety reference
docs/compatibility.md controller family and cookie compatibility matrix
docs/write-support.md write-support contract, verified endpoints, and controller traps
server.json MCP Registry manifest (PyPI + GHCR OCI metadata)
SECURITY.md vulnerability disclosure policy & credential safety model
CONTRIBUTING.md contributor setup, mock/Docker lab rules & zero-drift checks
tests/mock_controller.py stateful Web API v2 mock controller with fault injection
tests/fake_controller.py lightweight FakeController & offline unit fixtures
tests/test_*.py domain-split read, protocol, monitor, write & regression tests
skills/omada-controller/ agent skill: field notes for the Omada API itselfThe API notes in skills/omada-controller/SKILL.md
document the parts of the controller that are not in any public reference:
session expiry semantics, CIDR packing limits, dual-pool DHCP bodies, and the
endpoints that are Admin-only.
Contributing & releasing
See CONTRIBUTING.md and SECURITY.md for local setup, mock/Docker lab testing rules, and vulnerability reporting.
Pull requests only: Develop changes on a branch and open a Pull Request targeting
mainrather than pushing directly tomain. Every PR runs the CI matrix across Ubuntu, Windows, and macOS (Python3.10–3.14), zero-drift doc checks (python scripts/generate_docs.py --check), and Docker container smoke tests via.github/workflows/ci.yml.PyPI, GHCR & Attestations: Releases publish to PyPI via
.github/workflows/publish.ymlusing GitHub Actions OIDC Trusted Publishing (pypienvironment, no stored tokens), push multi-arch (linux/amd64,linux/arm64) containers toghcr.io/falehsub/omada-mcp, and attach SLSA build provenance attestations plusSHA256SUMS.txt.
Write support
Read-only mode remains the default (OMADA_WRITE_TOOLS defaults empty and write
tools are hidden). Opt-in writes follow the contract in
docs/write-support.md — explicit OMADA_WRITE_TOOLS
allowlist, dryRun=true default, a session-bound confirmToken, pre-write snapshots +
audit.jsonl, read-back verification where available, and anti-stranding checks. Use a dedicated
Admin local account separate from your read bridge and web UI to avoid session
eviction. Firmware upgrades remain unshipped pending a maintenance-window policy.
Roadmap
Read-only inspection, composite diagnostics (get_switch_ports, get_ap_radios,
get_wan_status, get_topology, diagnose_client, diagnose_wan), --doctor --json,
network_audit, the 132-tool control surface (rollback_from_snapshot + anti-stranding
switch/AP/routing/DNS/ACL/client controls), multi-site workflows (list_sites + per-call
site), diff_config_snapshots, --watch/--export-metrics, non-root multi-arch Docker
packaging, and MCP Registry metadata (server.json) are implemented. See
ROADMAP.md for historical milestones and future ideas. PyPI installation is available.
License
MIT — see LICENSE.
Not affiliated with TP-Link. Omada is a trademark of TP-Link Technologies.
This server calls an undocumented internal API; a controller firmware update can
change it, which is exactly why --doctor exists.
Available Tools
55 toolsaudit_all_sitesAudit all visible sitesARead-onlyIdempotent
Bounded fleet health rollup with per-site coverage and partial results. Requires OMADA_ALLOW_CROSS_SITE=true.
Inputs: maxSites. Returns: sites, complete, warnings, truncated, +11 more
diagnose_clientDiagnose a WiFi or wired clientCRead-onlyIdempotent
Correlate live client and parent device telemetry with dated sessions and logs.
Inputs: mac (required), site, hours. Returns: client, coverage, findings, warnings, +9 more
diagnose_wanDiagnose gateway WAN & VPN healthBRead-onlyIdempotent
Correlate WAN reachability evidence, latency, loss, speed tests, VPNs, and gateway logs.
Inputs: site, hours, includeSpeedtest. Returns: wan, status, findings, warnings, +6 more
diff_config_snapshotsDiff site configuration snapshotsCRead-onlyIdempotent
Compare two snapshots or a baseline against the live site (including UI edits on ssids/wirelessFeature).
Inputs: baseline (required), site, current, objects. Returns: summary, sections, crossSite, hasChanges, +3 more
explain_errorExplain Omada errorCodeCRead-onlyIdempotent
Decode an Omada Web API errorCode (e.g. -1600, -33717, -33726, -1505, -1001, -30109, -41011, -44116) into its…
Inputs: code (required), endpoint. Returns: fix, code, known, title, +5 more
get_ap_radiosGet AP radio & channel stateCRead-onlyIdempotent
Inspect an AP's 2.4G/5G/5G2/6G radios: channel, width, TX power, channel utilization, interference…
Inputs: mac (required), site, includeRfScan, includeAvailableChannels. Returns: mac, name, radios, warnings
get_ap_ssid_overridesGet per-AP SSID overridesCRead-onlyIdempotent
Read an AP's bound WLAN group and per-SSID overrides…
Inputs: mac (required), site. Returns: mac, name, wlanId, warnings, +3 more
get_clientGet clientCRead-onlyIdempotent
Get one client by MAC address, hostname or IP address.
Inputs: mac (required), site. Returns: ip, mac, name, ssid, +12 more
get_config_snapshotGet site configuration snapshotBRead-onlyIdempotent
Capture selected configuration sections for local drift comparisons.
Inputs: site, objects. Returns: site, objects, warnings, sectionStatus
get_controller_statusGet controller status & settings summaryBRead-onlyIdempotent
Read controller runtime status, redacted global controller settings summary, and site NTP settings.
Inputs: site. Returns: site, status, settings, warnings
get_deviceGet deviceCRead-onlyIdempotent
Get one device by MAC address or device name.
Inputs: mac (required), site. Returns: ip, mac, name, type, +6 more
get_ipv6_statusGet site IPv6 statusCRead-onlyIdempotent
Summarize IPv6 configuration across WAN ports (SLAAC/DHCPv6/PPPoEv6/PD) and LAN/VLAN interfaces.
Inputs: site, maskWanIp. Returns: site, siteId, lanCount, wanPorts, +4 more
get_mesh_statusGet Wi-Fi mesh status & linksCRead-onlyIdempotent
Read site mesh settings and per-AP wireless mesh role, wired/wireless uplink state, downlink children, and…
Inputs: mac, site. Returns: aps, apCount, siteMesh, warnings, +1 more
get_network_servicesGet network servicesCRead-onlyIdempotent
Summarize UPnP, DNS proxy, mDNS reflector rules and profiles, secret-redacted DDNS configuration, and…
Inputs: site. Returns: wan, ddns, mdns, upnp, +2 more
get_rf_scanGet AP RF scan resultsCRead-onlyIdempotent
Read per-band RF scan status, timestamps, channel occupancy/interference…
Inputs: mac (required), site, wait, timeoutSeconds, +1 more. Returns: mac, name, channels, warnings, +2 more
get_security_statusGet IPS/IDS, WIDS & rogue AP statusCRead-onlyIdempotent
Summarize IPS/IDS enablement, recent threat events, attack defense limits, WIDS/WIPS, and rogue AP detections…
Inputs: site, hours, limit. Returns: ips, counts, rogueAps, warnings, +1 more
get_site_infoGet site summaryBRead-onlyIdempotent
Site summary: name, id, WAN/LAN/WLAN state, device and client counts, controller version.
Inputs: site. Returns: id, name, siteUrl, clientCount, +8 more
get_ssidGet SSID configurationCRead-onlyIdempotent
Get non-secret configuration for one SSID…
Inputs: ssid (required), site, wlanGroup. Returns: id, name, wlanId, hasPresharedKey
get_switch_global_featuresGet switch global L2 featuresCRead-onlyIdempotent
Read switch-level STP/RSTP/MSTP mode and timers, loopback detection, jumbo frame MTU, multicast…
Inputs: mac (required), site. Returns: mac, stp, name, jumbo, +4 more
get_switch_portsGet switch ports, PoE & diagnosticsCRead-onlyIdempotent
Inspect switch port links, PoE, VLANs, counters, cable tests, LAGs, and uplinks.
Inputs: mac (required), site, compact, includeCounters, +2 more. Returns: mac, poe, name, ports, +2 more
get_topologyGet site uplink topology treeBRead-onlyIdempotent
Build the site's Gateway -> Switch(port) -> AP/Switch uplink tree with device counts.
Inputs: site, includeClients. Returns: roots, counts, warnings, unattachedDevices
get_wan_ip_detailsGet WAN IPv4/IPv6 & DDNS detailsCRead-onlyIdempotent
Read per-WAN IPv4 and IPv6 configuration, DNS resolvers, WAN port config, and redacted DDNS bindings…
Inputs: site, maskWanIp. Returns: site, siteId, wanPorts, warnings, +3 more
get_wan_statusGet live WAN link & health statusBRead-onlyIdempotent
Inspect gateway WAN link state, gateway/DNS/WAN IP, failover/load-balance mode, latency/packet loss health…
Inputs: site, maskWanIp, includeSpeedtest. Returns: ports, wanMode, warnings, hasGateway, +3 more
get_wifi_radio_featuresGet site Wi-Fi radio & roaming featuresCRead-onlyIdempotent
Read site-wide Wi-Fi roaming (802.11r/k, AI roaming), band steering, airtime fairness, mesh policy, beacon…
Inputs: site. Returns: mesh, source, roaming, warnings, +2 more
get_wlan_optimization_statusGet AI RF optimization statusBRead-onlyIdempotent
Read AI WLAN / RF optimization configuration, schedule, active scan status, and experience score history.
Inputs: site. Returns: config, warnings, scanStatus, experienceHistory
list_aclsList firewall ACL rulesCRead-onlyIdempotent
List gateway, switch, or EAP ACL rules (setting/firewall/acls?type=0|1|2) with policy, source/destination…
Inputs: site, aclType. Returns: count, items
list_backupsList controller backups & scheduleBRead-onlyIdempotent
Read controller auto-backup schedule, stored auto-backup files (Admin), and manual backup status without…
Inputs: no named parameters. Returns: warnings, backupFiles, backupFileCount
list_blocked_clientsList blocked clientsCRead-onlyIdempotent
List clients currently blocked on the site…
Inputs: site. Returns: count, items
list_clientsList clientsBRead-onlyIdempotent
List connected clients (WiFi and wired) with MAC, IP, SSID, AP, VLAN, traffic counters, session duration and…
Inputs: site, limit, cursor, fields, +2 more. Returns: count, items
list_controller_usersList controller users & rolesBRead-onlyIdempotent
List Omada controller user accounts and site/role privileges…
Inputs: site. Returns: count, items, warnings, viewerLimited
list_devicesList Omada devicesCRead-onlyIdempotent
List all managed network devices (APs, switches, gateways) on the site with MAC, model, firmware, IP, uptime…
Inputs: site. Returns: count, items
list_dhcp_reservationsList static DHCP reservationsBRead-onlyIdempotent
List static DHCP reservations configured on the site (works for offline clients too).
Inputs: site, vlan. Returns: count, items
list_hotspot_vouchersList hotspot voucher metadataARead-onlyIdempotent
Read hotspot voucher groups and individual voucher statuses without redeemable codes (category 'hotspot').
Inputs: site, limit, groupId. Returns: site, groups, siteId, vouchers, +3 more
list_ip_groupsList IP/port/MAC profile groupsBRead-onlyIdempotent
List profile groups (IP groups type=0, port groups type=1, MAC groups type=2) with entry counts and ACL…
Inputs: site, groupType. Returns: count, items
list_lan_dns_rulesList local LAN DNS rulesBRead-onlyIdempotent
List local LAN DNS records (gracefully warns on controller versions without LAN DNS).
Inputs: site. Returns: count, items, warnings, supported
list_lan_networksList LAN and VLAN networksCRead-onlyIdempotent
List configured LAN/VLAN networks merging setting/lan/networks and /interface…
Inputs: site. Returns: count, items
list_logsList controller alerts, events, or audit logsBRead-onlyIdempotent
Query controller site logs ('alerts', 'events', or 'audit') with time window, optional level filter, and row…
Inputs: site, hours, level, limit, +1 more. Returns: count, items
list_poe_schedulesList PoE port schedulesBRead-onlyIdempotent
List PoE power schedules with resolved time-range schedule names and switch-port bindings.
Inputs: site. Returns: count, items
list_policy_routesList gateway policy routing rulesBRead-onlyIdempotent
List policy routing rules (gracefully reports unavailability if no gateway exists).
Inputs: site. Returns: count, items, warnings, supported
list_port_forwardsList port forwarding rulesBRead-onlyIdempotent
List gateway NAT port forwarding and DMZ-mapped rules.
Inputs: site. Returns: count, items
list_port_profilesList switch LAN port profilesBRead-onlyIdempotent
List switch port profiles (All, Disable, custom VLAN/PoE profiles).
Inputs: site. Returns: count, items
list_qos_rulesList gateway & switch QoS rulesBRead-onlyIdempotent
Read gateway QoS BWC, class rules, VoIP QoS, WAN rate limits, and switch QoS queue profiles.
Inputs: site. Returns: site, warnings, gatewayBwcRules, gatewayClassRules, +1 more
list_rate_limit_profilesList bandwidth rate-limit profilesBRead-onlyIdempotent
List configured client bandwidth rate-limit profiles (upload/download caps and defaults).
Inputs: site. Returns: count, items
list_schedulesList time-range schedulesBRead-onlyIdempotent
List reusable time-range / schedule profiles used by ACLs, PoE schedules, and WLAN schedules.
Inputs: site. Returns: count, items
list_sitesList visible controller sitesBRead-onlyIdempotent
List sites visible to the authenticated Viewer or Admin account with site IDs, names, connectivity flags, and…
Inputs: no named parameters. Returns: count, items
list_static_routesList static routesBRead-onlyIdempotent
List configured gateway static routes (destinations, next hop, interface, metric).
Inputs: site. Returns: count, items
list_switch_lagsList switch LAG / LACP port channelsBRead-onlyIdempotent
List configured LAG/LACP port-channel groups, member ports, and LAG hardware limits on a switch.
Inputs: mac (required), site. Returns: mac, lags, name, lagCount, +1 more
list_traffic_rulesList URL filtering, bandwidth & session rulesCRead-onlyIdempotent
Aggregate gateway and AP URL filtering rules, transmission bandwidth controls, session limits, and gateway…
Inputs: site. Returns: site, warnings, sessionLimitRules, bandwidthControlRules, +1 more
list_vpn_tunnelsList VPN tunnels & secret-redacted configsBRead-onlyIdempotent
List WireGuard, OpenVPN, IPsec, and SSL/L2TP VPN tunnel state and configured profiles…
Inputs: site. Returns: counts, tunnels, warnings, configuredVpns
list_wifi_clientsList WiFi clientsBRead-onlyIdempotent
List only wireless clients, same fields as list_clients.
Inputs: site, limit, cursor, fields, +2 more. Returns: count, items
list_wired_clientsList wired clientsCRead-onlyIdempotent
List only wired clients, same fields as list_clients.
Inputs: site, limit, cursor, fields, +2 more. Returns: count, items
list_wlan_groupsList WLAN groups & SSID bindingsCRead-onlyIdempotent
List configured WLAN groups and their SSIDs for assigning APs cleanly.
Inputs: site. Returns: count, items
list_wlansList WLANsBRead-onlyIdempotent
List configured WLANs/SSIDs with band, VLAN, security type and guest flag.
Inputs: site. Returns: count, items
network_auditAudit site network healthBRead-onlyIdempotent
Bounded read-only health audit for WAN, devices, switch/AP telemetry, clients, and VLANs.
Inputs: site. Returns: site, counts, healthy, complete, +7 more
search_clientsSearch clientsCRead-onlyIdempotent
Search online and offline/historical clients by MAC, name, hostname, IP, SSID, or VLAN/network, with…
Inputs: site, ssid, vlan, guest, +8 more. Returns: count, items
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 55 tools
Most tools target a distinct resource, but there is a dense cluster of overlapping Wi-Fi/RF read tools (get_ap_radios, get_rf_scan, get_wifi_radio_features, get_wlan_optimization_status, get_ap_ssid_overrides, get_mesh_status) whose boundaries are only partly clarified by descriptions. The client family (list_clients, list_wifi_clients, list_wired_clients, search_clients, diagnose_client) and audit pair (network_audit vs audit_all_sites) also require careful reading to pick correctly. Descriptions do a reasonable job of disambiguating, but misselection is still plausible in the diagnostics area.
Almost everything follows a clean snake_case verb_noun pattern (list_*, get_*, diagnose_*, explain_*, diff_*). Minor deviations exist: network_audit and audit_all_sites invert to noun_verb, and get_config_snapshot is singular while diff_config_snapshots is plural. These are small blemishes on an otherwise predictable scheme.
55 tools is far above a comfortable surface for an agent, and the domain breadth (network controller) does not fully excuse it: there is redundancy among client listing, RF/Wi-Fi status, and audit tools that could be consolidated or parameterized. The set is large enough that tool selection itself becomes a failure mode.
Read coverage is genuinely deep: sites, devices, clients, WLANs, switch ports, gateway/WAN, VPN, firewall/ACL, QoS, logs, backups, and diagnostics are all represented. The surface is intentionally read-only, so there are no create/update/delete or action tools (e.g. block a client, create a voucher, reboot a device), which is a notable but likely deliberate gap an agent cannot work around if mutations are needed.
Maintenance
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
One OAuth connector for your team's remote MCP servers, with Tool Packs, guardrails and logs.
Scans remote MCP servers for protocol, security, and TLS issues; exposes scan tools via MCP.
The self-hosted MCP and control plane for your sites.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes the UniFi Network Integration API as MCP tools, dynamically loaded from JSON manifests, with read-only mode by default.MIT
- AlicenseAqualityCmaintenanceRead-only MCP server for TP-Link Omada SDN controllers, enabling querying controller, site, device, and WiFi state.8Apache 2.0
- AlicenseCqualityCmaintenanceEnables managing TP-Link Omada SDN controllers through MCP, exposing 72 tools for sites, devices, clients, networks, switch ports, firewalls, schedules, and site settings, including reboot and PoE scheduling.721MIT
- AlicenseCqualityDmaintenanceMCP server that lets AI assistants monitor and manage TP-Link Omada controllers. It provides analytics and read-only queries plus write operations such as rebooting devices, blocking clients, and changing network or firewall settings.841MIT