Skip to main content
Glama
wlanpi-mcp
by WLAN-Pi

wlanpi-mcp

An MCP (Model Context Protocol) server that exposes WLAN Pi capabilities - device info, service management, Wi-Fi scanning, profiler control, Bluetooth, and VLANs - to AI assistants like Claude.

It is a thin bridge to the wlanpi-core REST API on the device (https://localhost:31415); every tool call goes through that API.

How it runs

Two transports:

  • Streamable HTTP (daemon mode) - how the Debian package runs it under systemd: the uvicorn daemon binds loopback-only and an nginx site fronts it. https://<wlanpi>:8767/mcp terminates the device's self-signed TLS and is the only endpoint (the plaintext 8766 fallback was removed, #17). Every request must present a wlanpi-core JWT (see Authentication). The transport is stateless: each request is a complete exchange with no server-side session, so a client that reconnects after a daemon restart or an idle gap keeps working. Releases before 0.6.12 served /sse instead; see the upgrade note under Connecting Claude Code.

  • stdio - the MCP client launches the server as a subprocess. Only useful when the client runs on the WLAN Pi itself.

Related MCP server: weekplan-mcp-server

Installation on the WLAN Pi

Install the Debian package (depends on wlanpi-core):

sudo apt install ./wlanpi-mcp_*.deb

This installs to /opt/wlanpi-mcp, enables the wlanpi-mcp systemd service (streamable HTTP, fronted by nginx with TLS on 8767), and reads configuration from /etc/wlanpi-mcp/config.env (see install/etc/wlanpi-mcp/config.env.example).

To build the package from source: dpkg-buildpackage -us -uc.

Authentication

This server implements no authentication of its own - by design. Your MCP client presents a JWT issued by wlanpi-core as Authorization: Bearer <token>, and that same token is forwarded on every wlanpi-core API call, where it is validated (signature, expiry, revocation). The MCP server never mints, verifies, or refreshes tokens; if the token expires mid-session, tool calls fail with 401 until the client reconnects with a fresh one.

Generating a token with getjwt

The easiest way to get a token is the getjwt helper that ships with wlanpi-core. SSH to the WLAN Pi and run:

sudo getjwt claude-desktop --no-color

The positional argument is a device ID - an arbitrary name identifying the client the token is for (e.g. claude-desktop, claude-code). sudo is needed because getjwt signs the request with wlanpi-core's local HMAC shared secret, which unprivileged users can't read. --no-color gives clean output for copy/paste or scripting.

It prints the token response:

{
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "token_type": "bearer"
}

Use the access_token value as your Bearer token in the client configs below. Tokens expire (7 days by default in wlanpi-core) - when tool calls start failing with 401, generate a fresh token and update your client config.

Alternatively, call POST /api/v1/auth/token yourself - see the wlanpi-core API docs (Swagger UI at https://<wlanpi>:31415/docs) for the HMAC signing details.

The full flow, from the MCP client through nginx to wlanpi-core, is documented in docs/auth-flow.md.

Connecting Claude Code

On any machine that can reach the WLAN Pi:

claude mcp add --transport http wlanpi https://<wlanpi-ip>:8767/mcp \
  --header "Authorization: Bearer <your-wlanpi-core-jwt>"

Then verify with /mcp inside Claude Code - the wlanpi server should show as connected, with its tools and resources listed.

To share the config with your whole project (checked into .mcp.json) add --scope project; the default scope is local to you.

Upgrading from a release that served /sse? Remove the old entry (claude mcp remove wlanpi) and add it again as above: the transport is now http and the path is /mcp.

Claude Code running on the WLAN Pi itself (stdio)

If Claude Code runs on the device, you can skip the HTTP hop and launch the server over stdio. There are no HTTP headers in stdio mode, so the token comes from the WLANPI_CORE_TOKEN environment variable instead:

claude mcp add wlanpi \
  --env WLANPI_CORE_TOKEN=<your-wlanpi-core-jwt> \
  -- /opt/wlanpi-mcp/bin/python -m wlanpi_mcp --transport stdio

(Use your own interpreter path instead of /opt/wlanpi-mcp/bin/python if you installed from source with pip.)

Connecting Claude Desktop

Claude Desktop launches stdio servers, so a remote HTTP server is bridged with the mcp-remote proxy (requires Node.js on your desktop machine).

Edit your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "wlanpi": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://<wlanpi-ip>:8767/mcp",
        "--transport", "http-only",
        "--header", "Authorization: Bearer ${WLANPI_TOKEN}"
      ],
      "env": {
        "WLANPI_TOKEN": "<your-wlanpi-core-jwt>"
      }
    }
  }
}

Notes:

  • The TLS endpoint (8767) uses the same self-signed certificate as wlanpi-core, so your client must trust it (/etc/nginx/ssl/self-signed-wlanpi.cert on the device), or accept the cert warning. The JWT is encrypted in transit.

  • The daemon relies on the Bearer JWT gate, not on the MCP SDK's Host/Origin (DNS rebinding) check, which is disabled because nginx forwards the client's real Host header to the loopback-only daemon. A 421 Misdirected Request on /mcp means that check is on again.

  • There is no plaintext endpoint: 8767 is the only one, so a harness that cannot be pointed at a CA file (e.g. goose) needs self-signed-wlanpi.cert added to the OS trust store it uses. The plaintext http://<wlanpi>:8766/mcp fallback was removed (#17): nothing listens on 8766 and UFW no longer opens it, so a client still configured for it times out (or gets connection refused on-box). Point it at https://<wlanpi>:8767/mcp instead.

  • --transport http-only skips mcp-remote's SSE fallback; this server speaks streamable HTTP only.

  • The token is passed via the env block and interpolated into the header (${WLANPI_TOKEN}) - this sidesteps a known mcp-remote issue with spaces in args values on some platforms.

Restart Claude Desktop after editing the file. The WLAN Pi tools appear under the tools (🔨) menu.

Configuration

Settings load from the environment or /etc/wlanpi-mcp/config.env:

Variable

Default

Purpose

WLANPI_CORE_URL

https://localhost:31415

wlanpi-core API base URL

WLANPI_CORE_CA

/etc/nginx/ssl/self-signed-wlanpi.cert

CA bundle for verifying wlanpi-core's TLS listener

WLANPI_CORE_TOKEN

(empty)

Fallback JWT for stdio mode only; leave empty in daemon mode

WLANPI_MCP_HOST

127.0.0.1

Daemon bind host (loopback-only; nginx fronts the public 8767)

WLANPI_MCP_PORT

8768

Daemon bind port (loopback-only upstream)

ALLOW_POWER_CONTROL

true

Set false to disable the reboot_device/shutdown_device tools

LOG_LEVEL

INFO

Logging level

Service management tools (start_service, stop_service, restart_service) are restricted to wlanpi-core's service allowlist, which list_allowed_services reads from GET /api/v1/system/services.

What's exposed

  • Tools - system/power control, network interface queries, WLAN/Wi-Fi scanning, VLAN config, profiler control, Bluetooth, network config profiles, regulatory domain, device mode, and diagnostics utilities.

  • Resources - read-oriented views of device info, network state, services, Bluetooth, profiler results, network configs, and device mode.

  • Prompts - guided diagnostics workflows.

Connect a client and list tools/resources for the full, current inventory.

Development

Requires Python ≥ 3.13.

pip install -e ".[testing]"
pytest                                    # run tests
python -m wlanpi_mcp --transport stdio    # run locally (stdio)
python -m wlanpi_mcp --transport streamable-http   # run locally (127.0.0.1:8768/mcp; front with nginx for 8767)

License

BSD-3-Clause

Available Tools

71 tools
activate_network_configB

Activate a saved network configuration profile.

Args: id: Configuration profile ID to activate override_active: If True, force activation even if another profile is active

NameRequiredDescriptionDefault
idYes
override_activeNo

Output Schema

NameRequiredDescription

No output parameters

capture_observeA

Watch a streaming capture another application is already running, read-only.

Use this streaming subscriber to see what a capture started elsewhere (the WebUI, a lab controller, another agent) is receiving, without taking control of it. This never starts, reconfigures or stops a capture; the role in the result is always 'subscriber'. The result includes the owner's running config (channels, width, dwell, filter), so it is clear what the summary does and does not cover.

Returns the same dissected summary as capture_scan (an 'aps' table with full security detail, plus per-frame 'frames'/'frame_types' with addresses, radiotap and decoded results). The raw pcapng is also saved on the device and its path returned in 'pcap_path' (fetch it with fetch_pcap_file). Use list_capture_sessions first if you want to see what is running.

Single-radio caveat: the owner's channel hopping can fail on devices where the capture interface shares a radio with the managed wlan0, so an observed capture may cover fewer channels than its config lists.

Args: session_id: Session to attach to (from list_capture_sessions). interface: Instead of a session id, the monitor-mode capture interface ('wlanpiN', e.g. 'wlanpi0') whose capture to watch. duration_s: How long to listen, 1-60 seconds. The tool call blocks for this whole window. max_frames: Cap on per-frame records in 'frames'; the 'frame_types' counts are always exact. Set 0 for AP table and counts only, or a negative value for no cap (every frame).

NameRequiredDescriptionDefault
interfaceNo
duration_sNo
max_framesNo
session_idNo

Output Schema

NameRequiredDescription

No output parameters

capture_scanA

Run a live streaming Wi-Fi packet capture and return what was on the air.

This is a streaming capture: it captures real 802.11 frames off the air (unlike scan_wlan, which asks the driver for a scan), so it reports what is actually being transmitted. The call blocks for duration_s seconds and returns a dissected summary. The raw pcapng is also saved on the device and its path returned in 'pcap_path' (fetch it with fetch_pcap_file to verify the summary against the frames). For a capture longer than the 60 s window, use the non-streaming file-capture tools (start_pcap_file/fetch_pcap_file) instead.

The result has two parts:

  • 'aps': one row per BSSID from beacons/probe-responses, with SSID, channel, signal, 802.11 amendments, advertised TX power, full security detail — the compact 'security' label plus 'akm' (the AKM suite list), 'pairwise_ciphers', 'group_cipher' and 'pmf' — and, when the AP advertises a QBSS/BSS Load element, 'stations' (the associated client count) and 'channel_utilization' (percent).

  • 'frames' / 'frame_types': every frame's named type/subtype counted exactly in 'frame_types', plus up to max_frames per-frame records in 'frames'. Each record has the source/destination addresses (addr1..addr4), a full radiotap decode, and — for the frames that carry one — a decoded 'result': authentication algorithm+status, association status+AID, deauth/disassoc reason, or probe/assoc SSID.

The capture is owned by this call and is stopped before it returns. If another application is already capturing on the interface, this tool subscribes to that capture read-only instead of failing; the result always says whether the role was 'owner' or 'subscriber' and reports the running config.

Single-radio caveat: where the capture interface shares a radio with the managed wlan0, channel changes fail while wlan0 scans. Any such failures come back in 'channel_issues' — treat those results as partial rather than complete.

Args: interface: Monitor-mode capture interface, always named 'wlanpiN' (e.g. 'wlanpi0'), not 'wlan0'. Use get_network_interfaces or get_capture_channels to see what exists on this device. channels: Channel numbers to hop (e.g. [1, 6, 11, 36]); 6 GHz can be given as explicit frequencies in MHz. Omit to hop every channel the adapter supports. width: Channel width in MHz: 20, 40, 80 or 160. dwell_ms: Milliseconds to dwell on each channel (50-60000). duration_s: How long to capture, 1-60 seconds. The tool call blocks for this whole window. pcap_filter: Optional BPF/pcap filter, e.g. 'type mgt subtype beacon'. max_frames: Cap on per-frame records returned in 'frames'; per-kind counts in 'frame_types' are always exact. Set 0 to skip the per-frame records and get only the AP table and counts, or a negative value for no cap (every frame — a busy capture can then return tens of thousands of records, so use the file-capture tools for a full pcap instead). Beacons dominate a busy capture, so a pcap_filter such as 'not type mgt subtype beacon' makes the record list focus on the control/data/auth exchanges.

NameRequiredDescriptionDefault
widthNo
channelsNo
dwell_msNo
interfaceNowlanpi0
duration_sNo
max_framesNo
pcap_filterNo

Output Schema

NameRequiredDescription

No output parameters

create_network_configA

Create a new saved network configuration profile.

The config dict must include:

  • id (str): Unique profile name (cannot be 'root' or 'default')

  • namespaces (list, optional): Namespace-based interface configs

  • roots (list, optional): Root namespace interface configs

Each interface config in namespaces/roots needs:

  • mode: 'managed' or 'monitor'

  • iface_display_name: Human-readable name

  • phy: PHY device (e.g. 'phy0')

  • interface: Interface name (e.g. 'wlan0')

  • namespace (namespaces only): Namespace name (e.g. 'testns')

  • security (optional): {ssid, security, psk} for WPA2-PSK/WPA3-PSK networks

Args: config: Network configuration dict matching the NetConfig schema

NameRequiredDescriptionDefault
configYes

Output Schema

NameRequiredDescription

No output parameters

create_vlanA

Create (or replace) a VLAN on an ethernet interface.

Args: interface: Ethernet interface (e.g. 'eth0'). Cannot be 'all'. vlan_id: VLAN ID (1-4094) addresses: Optional list of IP addresses to assign, each a dict with 'family' (4 or 6), 'local' (IP string), and 'prefixlen' (int). Example: [{"family": 4, "local": "192.168.10.1", "prefixlen": 24}]

NameRequiredDescriptionDefault
vlan_idYes
addressesNo
interfaceYes

Output Schema

NameRequiredDescription

No output parameters

deactivate_network_configA

Deactivate a currently active network configuration profile.

Args: id: Configuration profile ID to deactivate override_active: If True, force deactivation even if flagged as active

NameRequiredDescriptionDefault
idYes
override_activeNo

Output Schema

NameRequiredDescription

No output parameters

delete_network_configA

Delete a saved network configuration profile.

Args: id: Configuration profile ID to delete force: If True, delete even if the profile is currently active

NameRequiredDescriptionDefault
idYes
forceNo

Output Schema

NameRequiredDescription

No output parameters

delete_vlanA

Delete a VLAN from an ethernet interface.

Args: interface: Ethernet interface (e.g. 'eth0'). Cannot be 'all'. vlan_id: VLAN ID to delete allow_missing: If True, don't error if the VLAN doesn't exist

NameRequiredDescriptionDefault
vlan_idYes
interfaceYes
allow_missingNo

Output Schema

NameRequiredDescription

No output parameters

enable_auto_timezoneA

Enable NTP automatic time synchronization on the WLAN Pi.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

fetch_pcap_fileA

Fetch a non-streaming capture's pcapng file as a binary blob.

Returns the raw pcapng file (mime application/vnd.tcpdump.pcapng) for the capture named by capture_id (preferred) or by an explicit on-device path. Open it in Wireshark/tshark for analysis. Fetch after the capture has stopped for a complete file; fetching a still-running capture returns only the bytes written so far.

For safety this reads only files under the server's managed capture directory; any other path is refused.

Args: capture_id: The capture_id from start_pcap_file/list_pcap_files. path: Alternatively, the on-device file path (must be inside the managed capture directory). session_id: Deprecated alias for capture_id.

NameRequiredDescriptionDefault
pathNo
capture_idNo
session_idNo

Output Schema

NameRequiredDescription
resultYes
get_battery_statusA

Get battery status on WLAN Pi models with a battery (e.g. WLAN Pi Pro).

Returns 'present': false on hardware without a battery, otherwise capacity percentage and charging status.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_blinker_statusA

Check whether the Ethernet port blinker is currently running.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_bluetooth_statusA

Get Bluetooth adapter status.

Includes the adapter name, address, power state, and list of paired devices.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_capture_channelsA

List the channels each capture adapter on this WLAN Pi can tune to.

Capture adapters are the monitor-mode interfaces named 'wlanpiN'; the answer is namespace-aware and comes from the adapter's own radio, so it reflects the regulatory domain in force. Use it to pick the 'interface' and 'channels' arguments for capture_scan.

Each entry gives the frequency in MHz plus its channel number (6 GHz frequencies may have no channel number, in which case pass the frequency to capture_scan directly).

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_datetimeA

Get the WLAN Pi's current local date, time, and timezone.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_device_infoA

Get WLAN Pi device identity: model, hostname, software version, and current operating mode.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_device_modeA

Get the current WLAN Pi operating mode (classic, wconsole, hotspot, wiperf, server, bridge).

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_device_modelA

Get the WLAN Pi hardware model (e.g. WLAN Pi Pro, R4, M4).

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_device_statsA

Get WLAN Pi live system metrics: IP address, CPU usage, RAM usage, disk usage, CPU temperature, and uptime.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_dhcp_leasesA

Get DHCP leases held by the WLAN Pi (parsed from dhclient lease files).

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_ethernet_interfaceA

Get ethernet interface details for a specific interface.

Args: interface: Ethernet interface name (e.g. 'eth0'), or 'all' for every interface

NameRequiredDescriptionDefault
interfaceYes

Output Schema

NameRequiredDescription

No output parameters

get_hotspot_clientsA

Get the connected client count in hotspot mode.

Returns an error if the device is not in hotspot mode.

Args: iface: Optional AP interface name; auto-detected if omitted.

NameRequiredDescriptionDefault
ifaceNo

Output Schema

NameRequiredDescription

No output parameters

get_hotspot_ssid_passphraseA

Get the hotspot SSID and WPA passphrase.

Read from the hostapd configuration. Returns an error if the device is not in hotspot mode.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_hotspot_stationsA

List stations connected to the hotspot AP interface.

Returns an error if the device is not in hotspot mode.

Args: iface: Optional AP interface name; auto-detected if omitted.

NameRequiredDescriptionDefault
ifaceNo

Output Schema

NameRequiredDescription

No output parameters

get_network_configA

Get the full details of a saved network configuration by ID.

Args: id: Configuration profile ID (use list_network_configs to see available IDs)

NameRequiredDescriptionDefault
idYes

Output Schema

NameRequiredDescription

No output parameters

get_network_config_statusA

Get the status of all saved network configurations, showing which is active.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_network_infoA

Get a full network snapshot.

Covers all interfaces, WLAN details, ethernet IP config, VLAN info, LLDP/CDP neighbours, and public IP address. Best starting point for network diagnostics.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_network_interfacesA

Get network interface details including IP addresses, flags, MTU, and link state.

Args: interface: Optional interface name (e.g. 'eth0'). If omitted, returns all interfaces.

NameRequiredDescriptionDefault
interfaceNo

Output Schema

NameRequiredDescription

No output parameters

get_profiler_statusA

Get the current status of the wlanpi-profiler.

Returns whether the profiler is running, its SSID, channel, and interface.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_public_ipv6A

Get the WLAN Pi's public IPv6 address and related details.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_reachabilityA

Test WLAN Pi network reachability.

Pings the default gateway, checks DNS resolution, and verifies internet access. Use this to diagnose connectivity problems.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_regulatory_domainB

Get the current Wi-Fi regulatory domain.

Returns 'country' as an ISO 3166-1 alpha-2 code.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_routing_tableA

Get the structured IP routing table.

Args: namespace: Optional network namespace to query (default: root namespace)

NameRequiredDescriptionDefault
namespaceNo

Output Schema

NameRequiredDescription

No output parameters

get_service_statusA

Get the running status of a WLAN Pi service.

Args: name: Service name (use list_allowed_services to see valid names)

NameRequiredDescriptionDefault
nameYes

Output Schema

NameRequiredDescription

No output parameters

get_tcp_connectionsA

Get active TCP sockets/connections on the WLAN Pi.

Args: namespace: Optional network namespace to query (default: root namespace)

NameRequiredDescriptionDefault
namespaceNo

Output Schema

NameRequiredDescription

No output parameters

get_timezoneA

Get the WLAN Pi's current system timezone.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_udp_connectionsA

Get active UDP sockets on the WLAN Pi.

Args: namespace: Optional network namespace to query (default: root namespace)

NameRequiredDescriptionDefault
namespaceNo

Output Schema

NameRequiredDescription

No output parameters

get_ufw_statusA

Get the current UFW firewall status and active rules on the WLAN Pi.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_usb_interfacesA

List USB network adapters currently plugged into the WLAN Pi.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_vlansA

Get VLAN interfaces on the WLAN Pi.

Args: interface: Ethernet interface to filter by (e.g. 'eth0'). If omitted, returns all interfaces. vlan_id: VLAN ID to filter by. If omitted, returns all VLANs.

NameRequiredDescriptionDefault
vlan_idNo
interfaceNo

Output Schema

NameRequiredDescription

No output parameters

get_wifi_capabilitiesA

Get Wi-Fi adapter capabilities.

Returns 'iw phy' capability dumps for each PHY, including supported bands, channels, HT/VHT/HE features, and interface modes.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_wifi_regulatoryB

Get Wi-Fi regulatory domain information reported by the kernel.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_wlan_pci_driversA

List PCI/platform wireless devices and their bound WLAN drivers.

Comes from lspci, covering built-in Wi-Fi radios.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

get_wlan_usb_driversA

List USB-attached WLAN adapters and their bound drivers.

If 'adapters' is empty but interfaces_scanned > 0, the radios are PCI/on-board — use get_wlan_pci_drivers instead.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

list_allowed_servicesA

List all services that can be managed on this WLAN Pi (started, stopped, or queried).

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

list_capture_sessionsA

List the packet captures currently running on this WLAN Pi.

Each session reports its session_id, the owning principal, the monitor-mode interfaces ('wlanpiN') it holds, its network namespace, and the running config (channels, width, dwell, pcap filter). A session's interface cannot be captured on by anyone else — use capture_observe to watch it read-only.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

list_network_configsA

List all saved network configuration profiles.

Returns a dict mapping config ID to active state (True/False).

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

list_pcap_filesA

List the non-streaming, file-backed captures this server has started.

Includes captures that are running or done. Each entry gives the capture_id, interface, on-device pcapng path, status (running/completed/stopped/error), current size and configured duration. Use stop_pcap_file to end a running one and fetch_pcap_file to retrieve the file. Files left on disk from an earlier server run are also listed, with status 'on_disk' — they can still be fetched.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

list_timezonesA

List all timezones available on the WLAN Pi (for use with set_timezone).

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

reboot_deviceA

Reboot the WLAN Pi immediately.

Active sessions and captures will be interrupted. Can be disabled via ALLOW_POWER_CONTROL=false in the server config.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

renew_dhcp_leaseA

Renew the DHCP lease for an interface.

The renewal happens in the interface's current namespace, and the interface IP address may change as a result.

Args: interface: Interface name (e.g. 'eth0')

NameRequiredDescriptionDefault
interfaceYes

Output Schema

NameRequiredDescription

No output parameters

restart_serviceB

Restart a WLAN Pi service.

Args: name: Service name (use list_allowed_services to see valid names)

NameRequiredDescriptionDefault
nameYes

Output Schema

NameRequiredDescription

No output parameters

revert_wlanA

Revert a WLAN interface from its namespace back to the root namespace.

Args: interface: WLAN interface name (e.g. 'wlan0') namespace: Network namespace to revert from (default: 'testns') delete_namespace: Delete the namespace after reverting

NameRequiredDescriptionDefault
interfaceYes
namespaceNotestns
delete_namespaceNo

Output Schema

NameRequiredDescription

No output parameters

run_speedtestA

Run an internet speed test from the WLAN Pi.

Uses LibreSpeed CLI; slow, typically taking 30-90 seconds to complete. Returns download/upload speed, ping, IP address, and the test server used.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

scan_wlanA

Scan for Wi-Fi networks.

Namespace-aware, with automatic monitor adapter selection. If multiple monitor adapters exist and no interface is given, returns 'needsSelection' with candidates instead of scanning — call again with one of the candidate interfaces.

To connect to a network found by this scan, create and activate a network configuration (create_network_config / activate_network_config).

Args: interface: WLAN interface to scan with (e.g. 'wlan0'); auto-selected if omitted namespace: Optional network namespace the interface lives in include_hidden: Include hidden SSIDs in results detail: 'short' for list-friendly fields plus RF extensions, 'full' for everything

NameRequiredDescriptionDefault
detailNoshort
interfaceNo
namespaceNo
include_hiddenNo

Output Schema

NameRequiredDescription

No output parameters

set_bluetooth_powerA

Turn Bluetooth on or off.

Args: action: 'on' to enable Bluetooth, 'off' to disable it

NameRequiredDescriptionDefault
actionYes

Output Schema

NameRequiredDescription

No output parameters

set_regulatory_domainA

Set the Wi-Fi regulatory domain (country code) on the WLAN Pi.

This controls which channels and transmit power levels are permitted. Use a valid ISO 3166-1 alpha-2 country code (e.g. 'US', 'GB', 'DE').

Args: country_code: Two-letter ISO 3166-1 alpha-2 country code

NameRequiredDescriptionDefault
country_codeYes

Output Schema

NameRequiredDescription

No output parameters

set_timezoneA

Set the WLAN Pi system timezone.

Args: timezone: Timezone name, e.g. 'America/Denver' (use list_timezones for valid values)

NameRequiredDescriptionDefault
timezoneYes

Output Schema

NameRequiredDescription

No output parameters

shutdown_deviceA

Shut down the WLAN Pi immediately.

The device must be powered back on manually. Can be disabled via ALLOW_POWER_CONTROL=false in the server config.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

start_blinkerA

Start the Ethernet port blinker.

This is a cable finder: it flashes the port LED so the cable can be located at the switch end.

Args: interface: Ethernet interface to blink (default 'eth0')

NameRequiredDescriptionDefault
interfaceNoeth0

Output Schema

NameRequiredDescription

No output parameters

start_bluetooth_pairingA

Put the WLAN Pi into Bluetooth discoverable pairing mode.

Starts bt-timedpair so a phone or laptop can pair with it.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

start_pcap_fileA

Start a background, non-streaming packet capture to a pcapng file.

This is the non-streaming counterpart to capture_scan: unlike that streaming tool, it does not block and does not return a dissected summary. It starts a capture, keeps the core WebSocket open in the background, and writes the raw pcapng bytes to a file under a managed directory on the device. Because nothing is held in memory or returned inline, the capture can run far longer than the 60 s capture_scan window — up to the server's configured maximum. The call returns immediately with the capture_id and file path; the capture then runs on its own until duration_s elapses or you call stop_pcap_file. Retrieve the file with fetch_pcap_file(capture_id=...) (a pcapng blob) once it has stopped.

This tool always owns the interface. If a capture is already running on it, this returns an error rather than taking it over — watch that one with capture_observe instead.

Args: interface: Monitor-mode capture interface, always 'wlanpiN' (e.g. 'wlanpi0'), not 'wlan0'. See get_capture_channels. channels: Channel numbers to hop (e.g. [1, 6, 11, 36]); 6 GHz can be given as explicit frequencies in MHz. Omit to hop every channel the adapter supports. width: Channel width in MHz: 20, 40, 80 or 160. dwell_ms: Milliseconds to dwell on each channel (50-60000). duration_s: How long the background capture runs, in seconds, from 1 up to the server maximum (default max 3600). The call itself returns immediately. pcap_filter: Optional BPF/pcap filter, e.g. 'type mgt subtype beacon'.

NameRequiredDescriptionDefault
widthNo
channelsNo
dwell_msNo
interfaceNowlanpi0
duration_sNo
pcap_filterNo

Output Schema

NameRequiredDescription

No output parameters

start_profilerA

Start the wlanpi-profiler to capture 802.11 client capability information.

The profiler brings up a fake AP and captures association frames from clients to determine their 802.11 capabilities (PHY support, spatial streams, etc.).

Args: interface: WLAN interface to use (e.g. 'wlan0') channel: 802.11 channel number to operate on frequency: Frequency in MHz (alternative to channel) ssid: SSID for the fake AP (default chosen by profiler) no11r: Disable 802.11r (Fast BSS Transition) support no11ax: Disable 802.11ax (Wi-Fi 6) support no11be: Disable 802.11be (Wi-Fi 7) support wpa3_personal: Enable WPA3-Personal only mode wpa3_personal_transition: Enable WPA3-Personal Transition mode noAP: Run without bringing up an AP (passive capture only) debug: Enable debug logging in profiler

NameRequiredDescriptionDefault
noAPNo
ssidNo
debugNo
no11rNo
no11axNo
no11beNo
channelNo
frequencyNo
interfaceNo
wpa3_personalNo
wpa3_personal_transitionNo

Output Schema

NameRequiredDescription

No output parameters

start_serviceB

Start a WLAN Pi service.

Args: name: Service name (use list_allowed_services to see valid names)

NameRequiredDescriptionDefault
nameYes

Output Schema

NameRequiredDescription

No output parameters

stop_blinkerA

Stop the Ethernet port blinker.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

stop_pcap_fileA

Stop a running non-streaming file capture before its duration elapses.

Signals the background capture to stop, waits for it to flush and close its file, and returns the final path, status and size. A capture that has already ended on its own is returned as-is. Fetch the file with fetch_pcap_file.

Args: capture_id: The capture_id returned by start_pcap_file (also shown by list_pcap_files). session_id: Deprecated alias for capture_id.

NameRequiredDescriptionDefault
capture_idNo
session_idNo

Output Schema

NameRequiredDescription

No output parameters

stop_profilerA

Stop the wlanpi-profiler and return summary results.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

stop_serviceA

Stop a WLAN Pi service.

Args: name: Service name (use list_allowed_services to see valid names)

NameRequiredDescriptionDefault
nameYes

Output Schema

NameRequiredDescription

No output parameters

update_network_configB

Update an existing network configuration profile.

The config_update dict may include:

  • namespaces (list, optional): Updated namespace interface configs

  • roots (list, optional): Updated root namespace interface configs

Args: id: Configuration profile ID to update config_update: Partial config update (namespaces and/or roots)

NameRequiredDescriptionDefault
idYes
config_updateYes

Output Schema

NameRequiredDescription

No output parameters

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 71 tool updatesv0.1.0
    • First observedactivate_network_config
    • First observedcapture_observe
    • First observedcapture_scan
    • First observedcreate_network_config
    • First observedcreate_vlan
    • First observeddeactivate_network_config
    • First observeddelete_network_config
    • First observeddelete_vlan
    • First observedenable_auto_timezone
    • First observedfetch_pcap_file
    • First observedget_battery_status
    • First observedget_blinker_status
    • First observedget_bluetooth_status
    • First observedget_capture_channels
    • First observedget_datetime
    • First observedget_device_info
    • First observedget_device_mode
    • First observedget_device_model
    • First observedget_device_stats
    • First observedget_dhcp_leases
    • First observedget_ethernet_interface
    • First observedget_hotspot_clients
    • First observedget_hotspot_link_stats
    • First observedget_hotspot_ssid_passphrase
    • First observedget_hotspot_stations
    • First observedget_interface_link_stats
    • First observedget_network_config
    • First observedget_network_config_status
    • First observedget_network_info
    • First observedget_network_interfaces
    • First observedget_profiler_status
    • First observedget_public_ipv6
    • First observedget_reachability
    • First observedget_regulatory_domain
    • First observedget_routing_table
    • First observedget_service_status
    • First observedget_tcp_connections
    • First observedget_timezone
    • First observedget_udp_connections
    • First observedget_ufw_status
    • First observedget_usb_interfaces
    • First observedget_vlans
    • First observedget_wifi_capabilities
    • First observedget_wifi_regulatory
    • First observedget_wlan_pci_drivers
    • First observedget_wlan_usb_drivers
    • First observedlist_allowed_services
    • First observedlist_capture_sessions
    • First observedlist_network_configs
    • First observedlist_pcap_files
    • First observedlist_timezones
    • First observedreboot_device
    • First observedrenew_dhcp_lease
    • First observedrestart_service
    • First observedrevert_wlan
    • First observedrun_speedtest
    • First observedscan_wlan
    • First observedset_bluetooth_power
    • First observedset_regulatory_domain
    • First observedset_timezone
    • First observedshutdown_device
    • First observedstart_blinker
    • First observedstart_bluetooth_pairing
    • First observedstart_pcap_file
    • First observedstart_profiler
    • First observedstart_service
    • First observedstop_blinker
    • First observedstop_pcap_file
    • First observedstop_profiler
    • First observedstop_service
    • First observedupdate_network_config

TDQS

B3.4/5.0

Scored across 71 tools

Disambiguation2/5

Several tool pairs overlap heavily: get_device_info/get_device_model/get_device_mode, get_wifi_regulatory/get_regulatory_domain, get_hotspot_clients/get_hotspot_stations, get_network_config_status/list_network_configs, and get_network_info/get_network_interfaces/get_ethernet_interface all cover similar ground. An agent can easily call the wrong one when these near-duplicates exist.

Naming Consistency4/5

The vast majority of tools follow a consistent get_/list_/set_/create_/delete_/start_/stop verb_noun pattern. Minor deviations like get_wifi_regulatory vs get_regulatory_domain, get_network_config_status vs list_network_configs, and the awkward get_hotspot_ssid_passphrase keep it from being perfect.

Tool Count1/5

71 tools is far beyond the 25+ 'too many' threshold and well into the extreme range. Even for a broad network diagnostics device, the surface is unwieldy and could be significantly consolidated without losing capability.

Completeness4/5

The set covers device info, services, network diagnostics, Wi-Fi, hotspot, VLANs, Bluetooth, profiler, and packet capture with full CRUD/lifecycle support in most areas. Minor gaps exist: there is no way to change device mode, configure hotspot settings, or directly set interface IPs outside saved profiles.

Maintenance

ActivityActive
ResponsivenessLimited data

Related MCP Connectors

Related MCP Servers