openwisp-mcp
This server exposes OpenWISP Controller management over MCP, letting an agent read and (in the full variant) mutate users, devices, templates, VPNs/certificates, locations, topology, and RADIUS data.
Users & auth: obtain a bearer token, list/search/get/create/delete users, list organizations
Devices & controller: list/get/create/update/delete devices, activate/deactivate, fetch compiled NetJSON config, execute commands (reboot/custom) and inspect command history
Device groups & connections: full CRUD for device groups and device connections, resolve group from certificate CN, manage connection credentials (create/read/update/delete, secrets like username/password)
Geo & locations: manage device location and coordinates, organization geo settings, locations (CRUD, GeoJSON, devices at location, indoor coordinates), floor plans (CRUD)
Templates: list/get/create NetJSON templates (vpn, wireless, network, system, generic), render template configuration tarballs, update/patch/delete
Certificates & VPN: manage VPNs, certificate authorities (create/import, renew, CRL download, delete), certificates (create/import, renew, revoke, delete)
Network topology: list topologies with node/link details and link status filters
RADIUS & WiFi: query accounting sessions and aggregated usage metrics by user or organization
Provides tools for managing OpenVPN configuration templates within OpenWISP, allowing creation, retrieval, and application of reusable OpenVPN templates.
Manages OpenWrt-based network devices (routers, access points, switches) via the OpenWISP controller, enabling device registration, configuration updates, and retrieval of NetJSON configurations.
Provides tools for managing WireGuard VPN configuration templates within OpenWISP, allowing creation, retrieval, and application of reusable WireGuard VPN templates.
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., "@openwisp-mcp What devices are currently online?"
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.
openwisp-mcp
A secure, MCP-only server for OpenWISP.
What it does
Diagnostic and full MCP toolsets
Secure defaults: no silent mock fallback, no web UI
Optional explicit mock sandbox for local testing
Runs as a secure MCP-only service through the monorepo wrappers:
npm run variant:diagnosticandnpm run variant:full
Related MCP server: network-mcp-server
Security
OPENWISP_BASE_URL/OPENWISP_URLrequired unlessOPENWISP_MOCK_SANDBOX=trueOPENWISP_API_TOKEN/OPENWISP_TOKENrequired for live modeOPENWISP_API_TOKEN_FILE/OPENWISP_TOKEN_FILEsupportedGenerate a suitable HTTP token with
openssl rand -hex 32and set it asMCP_HTTP_BEARER_TOKENOPENWISP_ALLOW_HTTP=truerequired for HTTP URLsSSE/HTTP mode requires
MCP_HTTP_BEARER_TOKEN(at least 32 characters); send it asAuthorization: Bearer <token>on both/sseand/messagePut the HTTP service behind TLS when exposing it remotely; the bearer token is otherwise sent in cleartext
OpenWISP API secrets are cleared from
process.envafter loading
Monorepo layout
packages/openwisp-diagnostic: dedicated read-only variant wrapperpackages/openwisp-full: dedicated full-management variant wrapperroot
src/: shared secure MCP runtime used by both variants
Quick start
npm install
npm run variant:diagnostic
npm run variant:fullDocker / SSE deployment
A prebuilt image is published to ghcr.io/marten-lucas/openwisp-mcp.
It runs the MCP server over SSE (HTTP) so remote agents (e.g. Hermes) can
connect without a local stdio process.
The image contains a small server.mjs bridge that spawns the correct variant
bin (stdio) and exposes it via SSEServerTransport on port 8000:
GET /sse— the SSE endpoint (MCP client connects here)POST /message— the message channel for the SSE session
Environment variables
Variable | Required | Description |
| Yes |
|
| Yes | OpenWISP controller URL |
| Yes | Bearer token for live mode |
| Yes | Client token for |
| No | Listen port (default |
Plus the same variables listed under
Environment variables below
(OPENWISP_ALLOW_HTTP, mock sandbox, etc.).
Example
docker run -p 8000:8000 \
-e MCP_VARIANT=diagnostic \
-e MCP_HTTP_BEARER_TOKEN=replace-with-a-random-token-of-at-least-32-characters \
-e OPENWISP_BASE_URL=https://openwisp.example.com \
-e OPENWISP_API_TOKEN=your-api-token \
ghcr.io/marten-lucas/openwisp-mcp:latest# Coolify / Docker Compose
services:
openwisp-diag-mcp:
image: ghcr.io/marten-lucas/openwisp-mcp:latest
environment:
- MCP_VARIANT=diagnostic
- MCP_HTTP_BEARER_TOKEN=${MCP_HTTP_BEARER_TOKEN}
- OPENWISP_BASE_URL=${OPENWISP_BASE_URL}
- OPENWISP_API_TOKEN=${OPENWISP_API_TOKEN}Environment variables
Variable | Purpose |
| OpenWISP controller URL |
| Alias for |
| Bearer token for live mode |
| Alias for |
| Path to token file |
| Alias for token file |
| Set |
| Set |
| Required for SSE mode; at least 32 characters |
|
|
Tool coverage
The server is aligned to the documented OpenWISP Controller API families most relevant to secure MCP operations:
Users & auth
Devices & device connections
Credentials & tokens
Templates & config management
Geo & locations
Certificates & VPN
Network topology
RADIUS & WiFi
Organizations & groups
Notes
The previous AI Studio web UI surface has been removed; the runtime is MCP-only.
Available Tools
92 toolsopenwisp_activate_deviceA
[Category: Devices & Controller] Activate a deactivated device so it can reconnect and receive configuration. (HTTP POST /api/v1/controller/device/{id}/activate/)
Inputs: id (required).
openwisp_create_caC
[Category: Certificates & VPN] Create or import a certificate authority. (HTTP POST /api/v1/controller/ca/)
Inputs: name (required), certificate, private_key.
openwisp_create_certC
[Category: Certificates & VPN] Create or import a certificate. (HTTP POST /api/v1/controller/cert/)
Inputs: name (required), ca, certificate, private_key.
openwisp_create_credentialC
[Category: Devices & Controller] Create a connection credential. (HTTP POST /api/v1/connection/credential/)
Inputs: name (required), password, username.
openwisp_create_deviceC
[Category: Devices & Controller] Register a new network device in OpenWISP Controller. (HTTP POST /api/v1/controller/device/)
Inputs: mac (required), name (required), organization (required), model, +1 more.
openwisp_create_device_connectionC
[Category: Devices & Controller] Create a connection for a device. (HTTP POST /api/v1/controller/device/{id}/connection/)
Inputs: id (required), name (required), credential.
openwisp_create_device_groupC
[Category: Devices & Controller] Create a new device group. (HTTP POST /api/v1/controller/group/)
Inputs: name (required), organization, organization_slug.
openwisp_create_device_locationC
[Category: Geo & Locations] Assign a location object to a device. (HTTP PUT /api/v1/controller/device/{id}/location/)
Inputs: id (required), location (required).
openwisp_create_floorplanC
[Category: Geo & Locations] Create a floor plan. (HTTP POST /api/v1/controller/floorplan/)
Inputs: name (required), organization.
openwisp_create_locationC
[Category: Geo & Locations] Create a controller location. (HTTP POST /api/v1/controller/location/)
Inputs: name (required), organization.
openwisp_create_templateB
[Category: Templates] Create a reusable configuration template in NetJSON format for OpenWISP devices. (HTTP POST /api/v1/controller/template/)
Inputs: name (required), type (required), config (required), organization (required), +2 more.
openwisp_create_userC
[Category: Users & Auth] Create a new user in OpenWISP with role and organization permissions. (HTTP POST /api/v1/users/user/)
Inputs: email (required), password (required), username (required), is_staff, +3 more.
openwisp_create_vpnC
[Category: Certificates & VPN] Create a VPN resource. (HTTP POST /api/v1/controller/vpn/)
Inputs: name (required).
openwisp_deactivate_deviceA
[Category: Devices & Controller] Deactivate a device before deletion or maintenance. (HTTP POST /api/v1/controller/device/{id}/deactivate/)
Inputs: id (required).
openwisp_delete_caC
[Category: Certificates & VPN] Delete a CA. (HTTP DELETE /api/v1/controller/ca/{id}/)
Inputs: id (required).
openwisp_delete_certC
[Category: Certificates & VPN] Delete a certificate. (HTTP DELETE /api/v1/controller/cert/{id}/)
Inputs: id (required).
openwisp_delete_credentialC
[Category: Devices & Controller] Delete a connection credential. (HTTP DELETE /api/v1/connection/credential/{id}/)
Inputs: id (required).
openwisp_delete_deviceB
[Category: Devices & Controller] Delete a network device registration from OpenWISP Controller. (HTTP DELETE /api/v1/controller/device/{id}/)
Inputs: id (required).
openwisp_delete_device_connectionB
[Category: Devices & Controller] Delete a device connection. (HTTP DELETE /api/v1/controller/device/{device_id}/connection/{connection_id}/)
Inputs: device_id (required), connection_id (required).
openwisp_delete_device_locationB
[Category: Geo & Locations] Remove the location from a device. (HTTP DELETE /api/v1/controller/device/{id}/location/)
Inputs: id (required).
openwisp_delete_floorplanB
[Category: Geo & Locations] Delete a floor plan. (HTTP DELETE /api/v1/controller/floorplan/{pk}/)
Inputs: pk (required).
openwisp_delete_locationC
[Category: Geo & Locations] Delete a controller location. (HTTP DELETE /api/v1/controller/location/{pk}/)
Inputs: pk (required).
openwisp_delete_templateC
[Category: Templates] Delete a template. (HTTP DELETE /api/v1/controller/template/{id}/)
Inputs: id (required).
openwisp_delete_userC
[Category: Users & Auth] Delete a user account from OpenWISP. (HTTP DELETE /api/v1/users/user/{id}/)
Inputs: id (required).
openwisp_delete_vpnC
[Category: Certificates & VPN] Delete a VPN resource. (HTTP DELETE /api/v1/controller/vpn/{id}/)
Inputs: id (required).
openwisp_download_ca_crlA
[Category: Certificates & VPN] Download a CA CRL file. (HTTP GET /api/v1/controller/ca/{id}/crl/)
Inputs: id (required).
openwisp_execute_device_commandC
[Category: Devices & Controller] Execute a command on a device, such as reboot or a custom shell command. (HTTP POST /api/v1/controller/device/{device_id}/command/)
Inputs: type (required), device_id (required), command.
openwisp_get_caB
[Category: Certificates & VPN] Get CA details. (HTTP GET /api/v1/controller/ca/{id}/)
Inputs: id (required).
openwisp_get_certB
[Category: Certificates & VPN] Get certificate details. (HTTP GET /api/v1/controller/cert/{id}/)
Inputs: id (required).
openwisp_get_credentialB
[Category: Devices & Controller] Get a connection credential. (HTTP GET /api/v1/connection/credential/{id}/)
Inputs: id (required).
openwisp_get_deviceA
[Category: Devices & Controller] Get details, MAC address, model, status, and IP address for a specific device. (HTTP GET /api/v1/controller/device/{id}/)
Inputs: id (required).
openwisp_get_device_commandB
[Category: Devices & Controller] Get details for a previously executed device command. (HTTP GET /api/v1/controller/device/{device_id}/command/{command_id}/)
Inputs: device_id (required), command_id (required).
openwisp_get_device_configB
[Category: Devices & Controller] Generate and download compiled NetJSON configuration for a device. (HTTP GET /api/v1/controller/device/{id}/configuration/)
Inputs: id (required).
openwisp_get_device_connectionB
[Category: Devices & Controller] Get details for a specific device connection. (HTTP GET /api/v1/controller/device/{device_id}/connection/{connection_id}/)
Inputs: device_id (required), connection_id (required).
openwisp_get_device_coordinatesC
[Category: Geo & Locations] Get device coordinates for a geocoded device. (HTTP GET /api/v1/controller/device/{id}/coordinates/)
Inputs: id (required), key (required).
openwisp_get_device_groupC
[Category: Devices & Controller] Get details for a device group. (HTTP GET /api/v1/controller/group/{id}/)
Inputs: id (required).
openwisp_get_device_group_from_certA
[Category: Devices & Controller] Resolve the device group linked to a certificate common name. (HTTP GET /api/v1/controller/cert/{common_name}/group/)
Inputs: common_name (required), org.
openwisp_get_device_locationB
[Category: Geo & Locations] Get a device location object. (HTTP GET /api/v1/controller/device/{id}/location/)
Inputs: id (required).
openwisp_get_floorplanC
[Category: Geo & Locations] Get floor plan details. (HTTP GET /api/v1/controller/floorplan/{pk}/)
Inputs: pk (required).
openwisp_get_locationC
[Category: Geo & Locations] Get location details. (HTTP GET /api/v1/controller/location/{pk}/)
Inputs: pk (required).
openwisp_get_organization_geo_settingsA
[Category: Geo & Locations] Get organization geo settings. (HTTP GET /api/v1/controller/organization/{organization_pk}/geo-settings/)
Inputs: organization_pk (required).
openwisp_get_radius_usageB
[Category: RADIUS & WiFi] Get aggregated RADIUS bandwidth and session usage metrics for an organization or user. (HTTP GET /api/v1/radius/usage/)
Inputs: username, organization.
openwisp_get_templateA
[Category: Templates] Get configuration template details including NetJSON config structure. (HTTP GET /api/v1/controller/template/{id}/)
Inputs: id (required).
openwisp_get_template_configurationA
[Category: Templates] Download the rendered configuration tarball for a template. (HTTP GET /api/v1/controller/template/{id}/configuration/)
Inputs: id (required).
openwisp_get_topologyB
[Category: Network Topology] Retrieve network topology details including node list, link metrics, and graph connections. (HTTP GET /api/v1/network-topology/topology/{id}/)
Inputs: id (required).
openwisp_get_userB
[Category: Users & Auth] Retrieve detailed information for a specific OpenWISP user by ID. (HTTP GET /api/v1/users/user/{id}/)
Inputs: id (required).
openwisp_get_vpnB
[Category: Certificates & VPN] Get VPN details. (HTTP GET /api/v1/controller/vpn/{id}/)
Inputs: id (required).
openwisp_get_vpn_configurationC
[Category: Certificates & VPN] Download VPN configuration. (HTTP GET /api/v1/controller/vpn/{id}/configuration/)
Inputs: id (required).
openwisp_list_casB
[Category: Certificates & VPN] List certificate authorities. (HTTP GET /api/v1/controller/ca/)
Inputs: no named parameters.
openwisp_list_certsB
[Category: Certificates & VPN] List certificates. (HTTP GET /api/v1/controller/cert/)
Inputs: no named parameters.
openwisp_list_credentialsB
[Category: Devices & Controller] List connection credentials. (HTTP GET /api/v1/connection/credential/)
Inputs: search.
openwisp_list_device_commandsA
[Category: Devices & Controller] List commands previously issued to a device. (HTTP GET /api/v1/controller/device/{device_id}/command/)
Inputs: device_id (required).
openwisp_list_device_connectionsB
[Category: Devices & Controller] List connections for a device. (HTTP GET /api/v1/controller/device/{id}/connection/)
Inputs: id (required).
openwisp_list_device_groupsB
[Category: Devices & Controller] List device groups created for organizing network hardware. (HTTP GET /api/v1/controller/group/)
Inputs: page, empty, search, page_size, +2 more.
openwisp_list_devicesA
[Category: Devices & Controller] List registered network devices (OpenWrt routers, access points, switches) in OpenWISP Controller. (HTTP GET /api/v1/controller/device/)
Inputs: page, group, search, status, +7 more.
openwisp_list_floorplansC
[Category: Geo & Locations] List indoor floor plans. (HTTP GET /api/v1/controller/floorplan/)
Inputs: organization, organization_slug.
openwisp_list_linksB
[Category: Network Topology] List physical or virtual links between nodes in a network topology with link status. (HTTP GET /api/v1/network-topology/link/)
Inputs: status, topology.
openwisp_list_location_devicesC
[Category: Geo & Locations] List devices deployed at a location. (HTTP GET /api/v1/controller/location/{id}/device/)
Inputs: id (required).
openwisp_list_location_geojsonC
[Category: Geo & Locations] List locations in GeoJSON format. (HTTP GET /api/v1/controller/location/geojson/)
Inputs: organization_id, organization_slug.
openwisp_list_location_indoor_coordinatesC
[Category: Geo & Locations] List indoor coordinates for a location. (HTTP GET /api/v1/controller/location/{id}/indoor-coordinates/)
Inputs: id (required), floor.
openwisp_list_locationsC
[Category: Geo & Locations] List controller locations. (HTTP GET /api/v1/controller/location/)
Inputs: search, organization, organization_slug.
openwisp_list_nodesB
[Category: Network Topology] List nodes (routers/switches/endpoints) participating in a network topology. (HTTP GET /api/v1/network-topology/node/)
Inputs: topology.
openwisp_list_organizationsB
[Category: Organizations] List multi-tenant organizations managed within OpenWISP. (HTTP GET /api/v1/users/organization/)
Inputs: search.
openwisp_list_radius_sessionsB
[Category: RADIUS & WiFi] List RADIUS authentication and accounting sessions for WiFi hot-spots and captive portals. (HTTP GET /api/v1/radius/accounting/)
Inputs: page, username, calling_station_id.
openwisp_list_templatesC
[Category: Templates] List OpenWISP configuration templates (VPN, WiFi SSIDs, Firewall, Network rules). (HTTP GET /api/v1/controller/template/)
Inputs: page, type, search, backend, +8 more.
openwisp_list_topologiesB
[Category: Network Topology] List network topologies collected via mesh protocols (OLSR, Batman-adv, WireGuard, OpenVPN). (HTTP GET /api/v1/network-topology/topology/)
Inputs: organization.
openwisp_list_usersB
[Category: Users & Auth] List user accounts in OpenWISP with support for pagination and search. (HTTP GET /api/v1/users/user/)
Inputs: page, search, page_size, organization.
openwisp_list_vpnsB
[Category: Certificates & VPN] List VPN resources. (HTTP GET /api/v1/controller/vpn/)
Inputs: subnet, backend, organization, organization_slug.
openwisp_obtain_tokenB
[Category: Users & Auth] Obtain an API bearer token using OpenWISP username and password credentials. (HTTP POST /api/v1/users/token/)
Inputs: password (required), username (required).
openwisp_patch_caB
[Category: Certificates & VPN] Partially update a CA. (HTTP PATCH /api/v1/controller/ca/{id}/)
Inputs: id (required).
openwisp_patch_certB
[Category: Certificates & VPN] Partially update a certificate. (HTTP PATCH /api/v1/controller/cert/{id}/)
Inputs: id (required).
openwisp_patch_credentialB
[Category: Devices & Controller] Partially update a connection credential. (HTTP PATCH /api/v1/connection/credential/{id}/)
Inputs: id (required).
openwisp_patch_device_connectionC
[Category: Devices & Controller] Partially update a device connection. (HTTP PATCH /api/v1/controller/device/{device_id}/connection/{connection_id}/)
Inputs: device_id (required), connection_id (required).
openwisp_patch_organization_geo_settingsB
[Category: Geo & Locations] Partially update organization geo settings. (HTTP PATCH /api/v1/controller/organization/{organization_pk}/geo-settings/)
Inputs: organization_pk (required).
openwisp_patch_templateB
[Category: Templates] Partially update a template. (HTTP PATCH /api/v1/controller/template/{id}/)
Inputs: id (required).
openwisp_patch_vpnB
[Category: Certificates & VPN] Partially update a VPN resource. (HTTP PATCH /api/v1/controller/vpn/{id}/)
Inputs: id (required).
openwisp_renew_caC
[Category: Certificates & VPN] Renew a CA. (HTTP POST /api/v1/controller/ca/{id}/renew/)
Inputs: id (required).
openwisp_renew_certB
[Category: Certificates & VPN] Renew a certificate. (HTTP POST /api/v1/controller/cert/{id}/renew/)
Inputs: id (required).
openwisp_revoke_certC
[Category: Certificates & VPN] Revoke a certificate. (HTTP POST /api/v1/controller/cert/{id}/revoke/)
Inputs: id (required).
openwisp_update_caC
[Category: Certificates & VPN] Replace a CA. (HTTP PUT /api/v1/controller/ca/{id}/)
Inputs: id (required).
openwisp_update_certC
[Category: Certificates & VPN] Replace a certificate. (HTTP PUT /api/v1/controller/cert/{id}/)
Inputs: id (required).
openwisp_update_credentialB
[Category: Devices & Controller] Replace a connection credential. (HTTP PUT /api/v1/connection/credential/{id}/)
Inputs: id (required).
openwisp_update_deviceA
[Category: Devices & Controller] Update network device metadata, assigned organization, or templates. (HTTP PATCH /api/v1/controller/device/{id}/)
Inputs: id (required), name, templates.
openwisp_update_device_connectionB
[Category: Devices & Controller] Replace a device connection definition. (HTTP PUT /api/v1/controller/device/{device_id}/connection/{connection_id}/)
Inputs: device_id (required), connection_id (required).
openwisp_update_device_coordinatesC
[Category: Geo & Locations] Update device coordinates. (HTTP PUT /api/v1/controller/device/{id}/coordinates/)
Inputs: id (required), key.
openwisp_update_device_groupB
[Category: Devices & Controller] Update a device group. (HTTP PUT /api/v1/controller/group/{id}/)
Inputs: id (required), name, organization.
openwisp_update_device_locationC
[Category: Geo & Locations] Update the location assigned to a device. (HTTP PUT /api/v1/controller/device/{id}/location/)
Inputs: id (required), location (required).
openwisp_update_floorplanB
[Category: Geo & Locations] Replace a floor plan. (HTTP PUT /api/v1/controller/floorplan/{pk}/)
Inputs: pk (required).
openwisp_update_locationC
[Category: Geo & Locations] Replace location details. (HTTP PUT /api/v1/controller/location/{pk}/)
Inputs: pk (required).
openwisp_update_organization_geo_settingsB
[Category: Geo & Locations] Replace organization geo settings. (HTTP PUT /api/v1/controller/organization/{organization_pk}/geo-settings/)
Inputs: organization_pk (required).
openwisp_update_templateC
[Category: Templates] Replace a template. (HTTP PUT /api/v1/controller/template/{id}/)
Inputs: id (required).
openwisp_update_vpnC
[Category: Certificates & VPN] Replace a VPN resource. (HTTP PUT /api/v1/controller/vpn/{id}/)
Inputs: id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 92 tools
Most tools target distinct resource+action combinations, but overlapping pairs such as openwisp_create_device_location and openwisp_update_device_location both use HTTP PUT on the same path, and several CRUD variants update/patch the same resource. Descriptions help, but with 92 tools an agent can still misselect near-duplicates.
All tools use a consistent openwisp_ prefix and a snake_case verb_noun pattern, e.g. list_devices, get_device, create_device, delete_device. Non-CRUD verbs like renew, revoke, execute, and obtain are still predictable and fit the convention.
92 tools is far beyond the recommended 3-15 range and exceeds the 50+ extreme-mismatch threshold for a single MCP server. Even with a large OpenWISP API surface, this creates enormous context and selection burden.
Coverage is broad across devices, templates, certificates, VPNs, locations, users, topologies, and RADIUS, but notable lifecycle gaps remain: no update_user or organization CRUD, no delete_device_group, and several list-only resources. Core workflows are present, but the surface is not fully complete.
Maintenance
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for managing VyOS routers via the VyOS HTTP API, allowing AI assistants to read config, set interfaces, firewall rules, VPNs, and more.172MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for network operations that lets AI assistants interact with Cisco/Juniper network devices through safe, well-defined tools like compliance audits and configuration backups.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to manage Defined Networking / Managed Nebula infrastructure, supporting tasks like network topology design, host provisioning, and security auditing through natural language.4MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for VyOS routers via VyManager, enabling AI agents to read and manage router configurations with RBAC, audit, and commit-confirm safety.13GPL 3.0