chirpstack-mcp-server
This server is an MCP interface for managing and live-debugging a ChirpStack v4 LoRaWAN network through an AI agent.
Devices: list, get, create, update, delete, set OTAA keys, ABP-activate/deactivate, flush DevNonces, enqueue downlinks, view/flush downlink queues, and read device metrics.
Live debugging: capture device events/frames and gateway frames into sessions, read them incrementally, wait for live events, and view recent device history.
Applications: list, get, create, update, delete, and list device tags within an application.
Device profiles: list, get, create, update, delete, replace payload codecs (CAYENNE_LPP or JS), and list vendors/ADR algorithms.
Gateways: list, get, create, update, delete, and read gateway metrics.
Optional toolsets: multicast groups, FUOTA deployments, integrations (one generic set for all ChirpStack integration kinds), tenant/API-key management, and relay device/gateway management.
Security-aware operations: read-only/delete annotations for MCP client confirmation, key/secret redaction unless explicitly requested, and special
<redacted>handling for safe round-tripping.
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., "@chirpstack-mcp-server Queue a downlink to device 0102030405060708 with hex data 48656C6C6F and watch for the ack"
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.
chirpstack-mcp-server
An MCP server for ChirpStack v4. It lets an AI agent (Claude Code, Claude Desktop, or any MCP client) manage a LoRaWAN network and — the part that matters while you are building a device application — debug devices live: queue a downlink, watch the uplinks and events as they arrive, iterate a payload codec, and inspect link quality, all from the coding session.
The server talks to ChirpStack's native gRPC API with a single API key. It carries no device- or vendor-specific logic.

Real, unedited Claude Code session (2.5× speed, only the ChirpStack MCP tools): the agent reads the device profile's codec, spots the disconnected-probe sentinel in a raw uplink, deploys a fix with profile_set_codec, then waits for the device's next uplink with wait_for_event and confirms the decoded object.
Install
uvx chirpstack-mcp-server # run directly (needs uv: https://docs.astral.sh/uv/)
# or
pip install chirpstack-mcp-serverRelated MCP server: mcp-server-thingpark
Configure
Variable | Required | Default | Meaning |
| yes | — |
|
| yes | — | API key from ChirpStack → API keys (tenant or global admin) |
| no |
| comma-separated toolsets, or |
| no |
| use TLS instead of plain HTTP/2 |
| no |
|
|
| no |
| port for |
Claude Code
claude mcp add chirpstack -e CHIRPSTACK_SERVER=192.168.1.10:8080 -e CHIRPSTACK_API_KEY=eyJ... -- uvx chirpstack-mcp-serverClaude Desktop / generic MCP config
{
"mcpServers": {
"chirpstack": {
"command": "uvx",
"args": ["chirpstack-mcp-server"],
"env": {
"CHIRPSTACK_SERVER": "192.168.1.10:8080",
"CHIRPSTACK_API_KEY": "eyJ..."
}
}
}
}Toolsets
Tools are grouped so an agent only sees what it needs. Names are <toolset>_<verb>.
Toolset | Default | Tools |
| yes | list, get, create, update, delete, set_keys, activate, deactivate, flush_dev_nonces, enqueue, queue_get, queue_flush, metrics |
| yes |
|
| yes | list, get, create, update, delete, list_device_tags |
| yes | list, get, create, update, delete, |
| yes | list, get, create, update, delete, metrics |
| no | group CRUD, add/remove device, enqueue, queue_list, queue_flush |
| no | deployment CRUD, start, add/remove/list devices, list_jobs |
| no |
|
| no | tenant CRUD, tenant users, API keys |
| no | relay devices and relay gateways |
Enable more with CHIRPSTACK_TOOLSETS=devices,debug,profiles,multicast or CHIRPSTACK_TOOLSETS=all.
server_info is the first call an agent should make to check the connection and the API key;
its chirpstack_version/regions fields may come back null/empty since ChirpStack only serves
those to a logged-in user session, never to an API key.
Live debugging
ChirpStack keeps the last ~10 events per device and streams new ones. The debug toolset
turns that into something an agent can use between tool calls:
capture_start(target, kind)opens a background stream (eventsorframesfor a device,gateway_framesfor a gateway) into a 500-item ring buffer and returns asession_id.device_enqueue(dev_eui, f_port, data_hex=...)queues the downlink.capture_read(session_id, since_seq)returns everything that arrived since the last read — decoded uplinks (f_port,f_cnt,data_hex, codecobject, per-gatewayrssi/snr),ack/txackfor the downlink,logentries when something went wrong.capture_stop(session_id)when done. Idle sessions expire after 30 minutes.
For quick looks: wait_for_event(dev_eui, timeout_s) blocks up to 60 s for the next live event —
it only returns events newer than the moment it was called, never the history ChirpStack replays;
device_recent_events(dev_eui) returns that history without keeping a session.
Class A devices only receive a downlink after their next uplink; Class C devices get it right away.
Security notes
The API key is read from the environment and never appears in tool output.
device_gethides root keys unless asked withinclude_keys=true.device_get/multicast_gethide session keys unlessinclude_keys=true.integration_getredacts stored credentials unlessinclude_secrets=true.<redacted>is reserved:integration_set/multicast_updatekeep the stored value wherever it appears (so an edited_getresult can be handed straight back), andintegration_set/multicast_createrefuse it when there is nothing to keep.Plain HTTP/2 (h2c) is the default because ChirpStack's API port is plain by default. Plain h2c sends the API key as a cleartext bearer token on the wire; use it only on a trusted LAN, and set
CHIRPSTACK_TLS=true(behind a TLS-terminating proxy that speaks gRPC) or a VPN elsewhere.streamable-httphas no authentication of its own and binds to127.0.0.1. Do not expose it on a public interface.The HTTP transport validates
Host/Originheaders (DNS-rebinding protection), so a web page in the operator's browser cannot open an MCP session against the loopback listener.Destructive tools are annotated (
destructiveHint) so MCP clients can ask before running them.Enabling the
tenantstoolset lets the agent mint API keys;api_key_createreturns the new token once, in its result.
Development
uv sync
uv run pytest # unit tests
uv run ruff check . && uv run pyright
tests/integration/up.sh # throwaway ChirpStack in Docker + API key
set -a; . .integration/env; set +a
uv run pytest -m integration
tests/integration/down.shDesign notes live in docs/design.md.
License
MIT © Oldřich Švéda
Available Tools
40 toolsapplication_createB
Create an application in a tenant.
Inputs: name (required), tenant_id (required), tags, description. Returns: object
application_deleteADestructive
Delete an application and all of its devices.
Inputs: application_id (required). Returns: object
application_getCRead-only
Get an application.
Inputs: application_id (required). Returns: object
application_listARead-only
List applications of a tenant.
Inputs: tenant_id (required), limit, offset, search. Returns: object
application_list_device_tagsARead-only
List the distinct device tag keys and values used inside an application.
Inputs: application_id (required). Returns: object
application_updateA
Update only the given fields of an application. Supplying tags replaces the whole
tag map.
Inputs: application_id (required), name, tags, description. Returns: object
capture_listARead-only
List capture sessions, including ones stopped by a terminal error (stream_state
starts with stopped:).
Inputs: no named parameters. Returns: object
capture_readARead-only
Read captured items with seq > since_seq. Remember last_seq and pass it back next
time. Check stream_state for reconnects. Each item carries live: false means
ChirpStack replayed it from before the session started, true means it happened while
the session was open.
Inputs: session_id (required), limit, since_seq. Returns: object
capture_startA
Start a background capture of a device's events/frames or a gateway's frames. Returns a session_id; read incrementally with capture_read. Sessions idle for 30 minutes are dropped.
Inputs: target (required), kind. Returns: object
capture_stopB
Stop a capture session and discard its buffer.
Inputs: session_id (required). Returns: object
device_activateADestructive
ABP-activate a device (or reset an OTAA session). For LoRaWAN 1.0.x pass nwk_s_enc_key only; the other two network keys default to it.
Inputs: dev_eui (required), dev_addr (required), app_s_key (required), nwk_s_enc_key (required), +5 more. Returns: object
device_createA
Create a device. Set OTAA keys afterwards with device_set_keys, or ABP session with device_activate.
Inputs: name (required), dev_eui (required), application_id (required), device_profile_id (required), +6 more. Returns: object
device_deactivateADestructive
Drop the device session; an OTAA device must re-join before it can communicate.
Inputs: dev_eui (required). Returns: object
device_deleteADestructive
Delete a device and everything ChirpStack stores about it.
Inputs: dev_eui (required). Returns: object
device_enqueueA
Queue a downlink. Give the payload as data_hex, data_base64, or object (encoded by the profile codec). Class A devices receive it after their next uplink.
Inputs: f_port (required), dev_eui (required), object, data_hex, +3 more. Returns: object
device_flush_dev_noncesADestructive
Forget used DevNonces so a device whose join-requests are rejected as replays can join again.
Inputs: dev_eui (required). Returns: object
device_getARead-only
Get a device with its current activation (session) and, if include_keys, its OTAA root
keys. include_keys also reveals the session keys in activation.
Inputs: dev_eui (required), include_keys. Returns: object
device_listARead-only
List devices in an application (optionally filtered by a search string).
Inputs: application_id (required), limit, offset, search. Returns: object
device_metricsBRead-only
Link quality (RSSI, SNR, packets per frequency/DR, errors) plus codec-defined device metrics. Defaults to the last 24 hours.
Inputs: dev_eui (required), end, start, aggregation. Returns: object
device_queue_flushBDestructive
Discard every queued downlink for a device.
Inputs: dev_eui (required). Returns: object
device_queue_getBRead-only
Show downlinks waiting for (or pending confirmation from) a device.
Inputs: dev_eui (required). Returns: object
device_recent_eventsARead-only
One-shot look at the last few events (or frames) ChirpStack still holds for a device - typically the last 10.
Inputs: dev_eui (required), kind. Returns: object
device_set_keysADestructive
Create or replace the OTAA root keys. LoRaWAN 1.0.x devices use nwk_key only (their AppKey goes in nwk_key).
Inputs: dev_eui (required), nwk_key (required), app_key. Returns: object
device_updateA
Update only the given fields of a device; omitted fields keep their current values.
Supplying tags replaces the whole tag map. Supplying variables replaces the whole
variable map.
Inputs: dev_eui (required), name, tags, join_eui, +6 more. Returns: object
gateway_createA
Register a gateway; location is set only when coordinates are given.
Inputs: name (required), tenant_id (required), gateway_id (required), tags, +5 more. Returns: object
gateway_deleteBDestructive
Delete a gateway.
Inputs: gateway_id (required). Returns: object
gateway_getCRead-only
Get a gateway with its last-seen time and location.
Inputs: gateway_id (required). Returns: object
gateway_listARead-only
List gateways (all tenants when tenant_id is empty and the key is a global admin key).
Inputs: limit, offset, search, tenant_id. Returns: object
gateway_metricsBRead-only
RX/TX packet counts per frequency, DR and status, plus duty-cycle usage. Defaults to the last 24 hours.
Inputs: gateway_id (required), end, start, aggregation. Returns: object
gateway_updateA
Update only the given fields of a gateway. Supplying tags replaces the whole tag
map.
Inputs: gateway_id (required), name, tags, altitude, +4 more. Returns: object
profile_createA
Create a device profile from a dict of DeviceProfile fields (snake_case; enums by name, e.g. region "EU868", mac_version "LORAWAN_1_0_3", reg_params_revision "A"). Required: tenant_id, name, region, mac_version, reg_params_revision.
Inputs: profile (required). Returns: object
profile_deleteADestructive
Delete a device profile (fails while devices still use it).
Inputs: profile_id (required). Returns: object
profile_getARead-only
Get a device profile including its payload codec script.
Inputs: profile_id (required). Returns: object
profile_listBRead-only
List device profiles of a tenant.
Inputs: tenant_id (required), limit, offset, search. Returns: object
profile_list_adr_algorithmsARead-only
List the ADR algorithms available on this server.
Inputs: no named parameters. Returns: object
profile_list_vendorsARead-only
List vendors from the imported device-profile catalogue.
Inputs: limit, offset. Returns: object
profile_set_codecA
Replace only the payload codec of a profile. For runtime JS, script is required and must define decodeUplink(input) and may define encodeDownlink(input); use runtime NONE to turn the codec off. Iterate here while watching uplinks with capture_read.
Inputs: runtime (required), profile_id (required), script. Returns: object
profile_updateA
Merge the given DeviceProfile fields into an existing profile; other fields are kept. Map and repeated fields you supply (e.g. tags, measurements) replace the whole field; omitted fields are kept.
Inputs: changes (required), profile_id (required). Returns: object
server_infoARead-only
Check the connection and the API key. Version and regions are only available to user sessions in ChirpStack, so they may be null/empty with an API key.
Inputs: no named parameters. Returns: object
wait_for_eventARead-only
Block until the device emits a live event (optionally of the given types: up, join,
ack, txack, log, status, location) or the timeout (max 60 s) passes. Only events newer
than the moment of the call count (live); the events ChirpStack replays from its
history never satisfy the wait, whatever their arrival timing. Use
device_recent_events for those.
Inputs: dev_eui (required), timeout_s, event_types. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 40 tools
Each tool maps to a distinct resource/action: CRUD for devices, applications, profiles, and gateways are clearly separated, and session/queue/capture operations have unique names. Where two tools could overlap (wait_for_event vs device_recent_events, device_activate vs device_set_keys), the descriptions explicitly distinguish them.
The overwhelming majority follow a consistent lowercase snake_case resource_action pattern (device_list, application_update, gateway_delete, capture_start). Minor deviations such as server_info and wait_for_event are understandable but break the strict verb_noun/resource_action convention enough to prevent a perfect score.
40 tools is well beyond the heavy range and will impose a significant selection burden on an agent, even though the tools are organized by domain. The breadth is justified by ChirpStack's API surface, but for an MCP tool set it is too many to be considered well-scoped.
The set covers full CRUD/lifecycle for devices, applications, profiles, and gateways plus key device operations (activation, queueing, metrics, captures, events). Minor gaps exist such as tenant listing and per-item downlink queue deletion, but core workflows are not blocked.
Maintenance
Related MCP Connectors
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Protocol-native energy infrastructure orchestration for AI data centers. Provides 46 MCP tools across 8 grid protocols (IEC-61850, DNP3, Modbus, OCPP, OpenADR, IEEE 2030.5, IEC 60870-5-104, ICCP) with 5 core API primitives: connect, dispatch, settle, comply, and intel. Enables AI agents to programmatically interact with substations, grid interfaces, and energy assets for real-time workload-grid coordination.
Connect your AI agent to 300+ methods and 100+ live tools
Connect your AI to your own devices, 3D printers, factory tools and a shared agent task pool.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Meshtastic mesh networks for off-grid communication, including sending messages, network analysis, GPS positioning, waypoint management, and device configuration over LoRa radio.6MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to manage LoRaWAN devices on Actility ThingPark, allowing device listing, details, and downlink command sending via natural language.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to manage network devices via gNMI protocol, including querying capabilities, reading/modifying configurations, and subscribing to telemetry data through natural language.-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to investigate and manipulate live network simulations via MCP, including protocol debugging and fault injection.-