Skip to main content
Glama

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:diagnostic and npm run variant:full

Related MCP server: network-mcp-server

Security

  • OPENWISP_BASE_URL / OPENWISP_URL required unless OPENWISP_MOCK_SANDBOX=true

  • OPENWISP_API_TOKEN / OPENWISP_TOKEN required for live mode

  • OPENWISP_API_TOKEN_FILE / OPENWISP_TOKEN_FILE supported

  • Generate a suitable HTTP token with openssl rand -hex 32 and set it as MCP_HTTP_BEARER_TOKEN

  • OPENWISP_ALLOW_HTTP=true required for HTTP URLs

  • SSE/HTTP mode requires MCP_HTTP_BEARER_TOKEN (at least 32 characters); send it as Authorization: Bearer <token> on both /sse and /message

  • Put the HTTP service behind TLS when exposing it remotely; the bearer token is otherwise sent in cleartext

  • OpenWISP API secrets are cleared from process.env after loading

Monorepo layout

  • packages/openwisp-diagnostic: dedicated read-only variant wrapper

  • packages/openwisp-full: dedicated full-management variant wrapper

  • root src/: shared secure MCP runtime used by both variants

Quick start

npm install
npm run variant:diagnostic
npm run variant:full

Docker / 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

MCP_VARIANT

Yes

diagnostic (read-only) or full

OPENWISP_BASE_URL

Yes

OpenWISP controller URL

OPENWISP_API_TOKEN

Yes

Bearer token for live mode

MCP_HTTP_BEARER_TOKEN

Yes

Client token for /sse and /message (minimum 32 characters)

MCP_PORT

No

Listen port (default 8000)

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_BASE_URL

OpenWISP controller URL

OPENWISP_URL

Alias for OPENWISP_BASE_URL

OPENWISP_API_TOKEN

Bearer token for live mode

OPENWISP_TOKEN

Alias for OPENWISP_API_TOKEN

OPENWISP_API_TOKEN_FILE

Path to token file

OPENWISP_TOKEN_FILE

Alias for token file

OPENWISP_MOCK_SANDBOX

Set true to use mock data explicitly

OPENWISP_ALLOW_HTTP

Set true to allow HTTP base URLs

MCP_HTTP_BEARER_TOKEN

Required for SSE mode; at least 32 characters

OPENWISP_MCP_MODE

diagnostic or full for STDIO mode

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 tools
openwisp_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_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

    C2.9/5.0

    Scored across 92 tools

    Disambiguation3/5

    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.

    Naming Consistency5/5

    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.

    Tool Count1/5

    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.

    Completeness3/5

    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

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP 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
    • A
      license
      Not graded
      quality
      D
      maintenance
      An 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.
      4
      MIT