ChirpStack

io.github.oliveres由 GitHub 账号 oliveres 发布v0.1.1更新于 Oct 24, 2026

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

概览

AI 生成的概览

该 MCP 服务器让助手通过 gRPC API 在 ChirpStack v4 网络服务器上管理并实时调试 LoRaWAN 设备。

可以做什么
列出、创建、更新、删除、激活和停用设备,入队或清空下行,查看指标与密钥。管理应用、设备配置文件(包括设置 payload 编解码器)、网关及其指标。在后台会话中捕获设备实时事件与帧,读取新增内容,等待下一个事件,并查看设备近期事件。可选管理多播组、FUOTA 部署、集成、租户与 API 密钥,以及中继设备和中继网关。
适用场景
适用于在 ChirpStack v4 上开发或运维 LoRaWAN 部署时,希望助手在编码过程中检查设备、迭代 payload 编解码器、排队下行并观察上行与事件。
运行要求
以 Python 包形式通过 uvx 或 pip 在本地运行,需要 uv 或 Python。需要 CHIRPSTACK_SERVER(API 的 host:port,通常为 8080)和 CHIRPSTACK_API_KEY(租户或全局管理员密钥)。可选 CHIRPSTACK_TLS、CHIRPSTACK_TOOLSETS、CHIRPSTACK_TRANSPORT 和 CHIRPSTACK_HTTP_PORT。需要能访问 ChirpStack 服务器的网络。
安装前请注意
API 密钥具有租户或全局管理员权限,默认经明文 h2c 以明文 bearer token 发送;在可信局域网之外应使用 TLS 或 VPN。工具会创建、更新和删除设备、配置文件、网关与队列,破坏性工具仅被标注而不会被阻止。启用 tenants 工具集后助手可创建 API 密钥。streamable-http 传输自身无认证,必须仅绑定回环地址。

安装

在 SourceWeft 中

  1. 打开 控制台中的 ChirpStack,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

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.

[Claude Code fixes a payload decoder and verifies it on the next live uplink]

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

bash
uvx chirpstack-mcp-server        # run directly (needs uv: https://docs.astral.sh/uv/)# orpip install chirpstack-mcp-server

Configure

VariableRequiredDefaultMeaning
CHIRPSTACK_SERVERyes—host:port of the ChirpStack API (the web-UI port, usually 8080)
CHIRPSTACK_API_KEYyes—API key from ChirpStack → API keys (tenant or global admin)
CHIRPSTACK_TOOLSETSnodevices, debug, applications, profiles, gatewayscomma-separated toolsets, or all
CHIRPSTACK_TLSnofalseuse TLS instead of plain HTTP/2
CHIRPSTACK_TRANSPORTnostdiostdio or streamable-http
CHIRPSTACK_HTTP_PORTno8000port for streamable-http (bound to 127.0.0.1)

Claude Code

bash
claude mcp add chirpstack -e CHIRPSTACK_SERVER=192.168.1.10:8080 -e CHIRPSTACK_API_KEY=eyJ... -- uvx chirpstack-mcp-server

Claude Desktop / generic MCP config

json
{  "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>.

ToolsetDefaultTools
devicesyeslist, get, create, update, delete, set_keys, activate, deactivate, flush_dev_nonces, enqueue, queue_get, queue_flush, metrics
debugyesserver_info, capture_start, capture_read, capture_stop, capture_list, wait_for_event, device_recent_events
applicationsyeslist, get, create, update, delete, list_device_tags
profilesyeslist, get, create, update, delete, profile_set_codec, list_vendors, list_adr_algorithms
gatewaysyeslist, get, create, update, delete, metrics
multicastnogroup CRUD, add/remove device, enqueue, queue_list, queue_flush
fuotanodeployment CRUD, start, add/remove/list devices, list_jobs
integrationsnointegration_list/get/set/delete — one generic set for all ten ChirpStack integration kinds; integration_get redacts stored credentials unless include_secrets=true
tenantsnotenant CRUD, tenant users, API keys
relaynorelay 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:

  1. capture_start(target, kind) opens a background stream (events or frames for a device, gateway_frames for a gateway) into a 500-item ring buffer and returns a session_id.
  2. device_enqueue(dev_eui, f_port, data_hex=...) queues the downlink.
  3. capture_read(session_id, since_seq) returns everything that arrived since the last read — decoded uplinks (f_port, f_cnt, data_hex, codec object, per-gateway rssi/snr), ack/txack for the downlink, log entries when something went wrong.
  4. 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_get hides root keys unless asked with include_keys=true.
  • device_get/multicast_get hide session keys unless include_keys=true.
  • integration_get redacts stored credentials unless include_secrets=true.
  • <redacted> is reserved: integration_set/multicast_update keep the stored value wherever it appears (so an edited _get result can be handed straight back), and integration_set/multicast_create refuse 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-http has no authentication of its own and binds to 127.0.0.1. Do not expose it on a public interface.
  • The HTTP transport validates Host/Origin headers (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 tenants toolset lets the agent mint API keys; api_key_create returns the new token once, in its result.

Development

bash
uv syncuv run pytest                     # unit testsuv run ruff check . && uv run pyrighttests/integration/up.sh           # throwaway ChirpStack in Docker + API keyset -a; . .integration/env; set +auv run pytest -m integrationtests/integration/down.sh

Design notes live in docs/design.md.

License

MIT © Oldřich Švéda

来源:README.md,提交 b0e3d5f

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分