ChirpStack

v0.1.1
io.github.oliveres/chirpstack-mcp-server Checked 20 hours ago Published 3 months ago

Manage and live-debug LoRaWAN devices on a ChirpStack v4 network server over its gRPC API

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

device_list

List devices in an application (optionally filtered by a search string).

ParameterTypeDescription
application_id *string
limitinteger
offsetinteger
searchstring

device_get

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`.

ParameterTypeDescription
dev_eui *string
include_keysboolean

device_create

Create a device. Set OTAA keys afterwards with device_set_keys, or ABP session with device_activate.

ParameterTypeDescription
application_id *string
dev_eui *string
device_profile_id *string
name *string
descriptionstring
is_disabledboolean
join_euistring
skip_fcnt_checkboolean
tags
variables

device_update

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.

ParameterTypeDescription
dev_eui *string
application_id
description
device_profile_id
is_disabled
join_eui
name
skip_fcnt_check
tags
variables

device_delete

Delete a device and everything ChirpStack stores about it.

ParameterTypeDescription
dev_eui *string

device_set_keys

Create or replace the OTAA root keys. LoRaWAN 1.0.x devices use nwk_key only (their AppKey goes in nwk_key).

ParameterTypeDescription
dev_eui *string
nwk_key *string
app_keystring

device_activate

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.

ParameterTypeDescription
app_s_key *string
dev_addr *string
dev_eui *string
nwk_s_enc_key *string
a_f_cnt_downinteger
f_cnt_upinteger
f_nwk_s_int_keystring
n_f_cnt_downinteger
s_nwk_s_int_keystring

device_deactivate

Drop the device session; an OTAA device must re-join before it can communicate.

ParameterTypeDescription
dev_eui *string

device_flush_dev_nonces

Forget used DevNonces so a device whose join-requests are rejected as replays can join again.

ParameterTypeDescription
dev_eui *string

device_enqueue

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.

ParameterTypeDescription
dev_eui *string
f_port *integer
confirmedboolean
data_base64
data_hex
expires_in_s
object

device_queue_get

Show downlinks waiting for (or pending confirmation from) a device.

ParameterTypeDescription
dev_eui *string

device_queue_flush

Discard every queued downlink for a device.

ParameterTypeDescription
dev_eui *string

device_metrics

Link quality (RSSI, SNR, packets per frequency/DR, errors) plus codec-defined device metrics. Defaults to the last 24 hours.

ParameterTypeDescription
dev_eui *string
aggregationstring
end
start

server_info

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.

capture_start

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.

ParameterTypeDescription
target *string
kindstring

capture_read

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.

ParameterTypeDescription
session_id *string
limitinteger
since_seqinteger

capture_stop

Stop a capture session and discard its buffer.

ParameterTypeDescription
session_id *string

capture_list

List capture sessions, including ones stopped by a terminal error (`stream_state` starts with `stopped:`).

wait_for_event

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.

ParameterTypeDescription
dev_eui *string
event_types
timeout_snumber

device_recent_events

One-shot look at the last few events (or frames) ChirpStack still holds for a device - typically the last 10.

ParameterTypeDescription
dev_eui *string
kindstring

application_list

List applications of a tenant.

ParameterTypeDescription
tenant_id *string
limitinteger
offsetinteger
searchstring

application_get

Get an application.

ParameterTypeDescription
application_id *string

application_create

Create an application in a tenant.

ParameterTypeDescription
name *string
tenant_id *string
descriptionstring
tags

application_update

Update only the given fields of an application. Supplying `tags` replaces the whole tag map.

ParameterTypeDescription
application_id *string
description
name
tags

application_delete

Delete an application and all of its devices.

ParameterTypeDescription
application_id *string

application_list_device_tags

List the distinct device tag keys and values used inside an application.

ParameterTypeDescription
application_id *string

profile_list

List device profiles of a tenant.

ParameterTypeDescription
tenant_id *string
limitinteger
offsetinteger
searchstring

profile_get

Get a device profile including its payload codec script.

ParameterTypeDescription
profile_id *string

profile_create

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.

ParameterTypeDescription
profile *object

profile_update

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.

ParameterTypeDescription
changes *object
profile_id *string

profile_delete

Delete a device profile (fails while devices still use it).

ParameterTypeDescription
profile_id *string

profile_set_codec

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.

ParameterTypeDescription
profile_id *string
runtime *string
scriptstring

profile_list_vendors

List vendors from the imported device-profile catalogue.

ParameterTypeDescription
limitinteger
offsetinteger

profile_list_adr_algorithms

List the ADR algorithms available on this server.

gateway_list

List gateways (all tenants when tenant_id is empty and the key is a global admin key).

ParameterTypeDescription
limitinteger
offsetinteger
searchstring
tenant_idstring

gateway_get

Get a gateway with its last-seen time and location.

ParameterTypeDescription
gateway_id *string

gateway_create

Register a gateway; location is set only when coordinates are given.

ParameterTypeDescription
gateway_id *string
name *string
tenant_id *string
altitude
descriptionstring
latitude
longitude
stats_intervalinteger
tags

gateway_update

Update only the given fields of a gateway. Supplying `tags` replaces the whole tag map.

ParameterTypeDescription
gateway_id *string
altitude
description
latitude
longitude
name
stats_interval
tags

gateway_delete

Delete a gateway.

ParameterTypeDescription
gateway_id *string

gateway_metrics

RX/TX packet counts per frequency, DR and status, plus duty-cycle usage. Defaults to the last 24 hours.

ParameterTypeDescription
gateway_id *string
aggregationstring
end
start