mcp-server-thingpark

mcp-server-thingpark

An MCP server that enables AI assistants to manage LoRaWAN devices on Actility ThingPark, allowing device listing, details, and downlink command sending via natural language.

Category
访问服务器

README

MCP Server for Actility ThingPark

A Model Context Protocol (MCP) server that connects AI assistants to the Actility ThingPark LoRaWAN network server. Manage devices and send downlink commands through natural language.

Works with ThingPark Community, ThingPark Enterprise, and other deployments that expose the DX Core API.

Tools

Tool Description
list_devices List all registered LoRaWAN devices with DevEUI, class, and profile
get_device Get detailed device information by DevEUI
send_downlink Send a raw hex downlink payload to any device
get_downlink_queue View pending downlink messages for a device
invalidate_token Clear cached OAuth token (troubleshooting)

These tools work with any LoRaWAN device on your ThingPark account.

Sensor Helpers

The server auto-loads sensor-specific helper modules from sensors/. These provide high-level tools for configuring specific sensors without needing to know the raw hex payload format.

See sensors/SUPPORTED.md for the list of supported sensors and how to add your own.

Sensor Manufacturer Tools
LHT65N-VIB Dragino Transmit interval, vibration mode, sensitivity, alarm

Installation

Using uv (recommended)

When using uv no specific installation is needed. Use uvx to directly run the server:

uvx mcp-server-thingpark

Using pip

pip install mcp-server-thingpark

After installation, run it as:

mcp-server-thingpark

From source

git clone https://github.com/bbruhn91/mcp-server-thingpark.git
cd mcp-server-thingpark

python -m venv .venv
source .venv/bin/activate
pip install -e .

Configuration

The server requires three environment variables for ThingPark API authentication:

Variable Description Example
THINGPARK_URL ThingPark platform base URL https://community.thingpark.io/thingpark
THINGPARK_CLIENT_ID API client ID sub-XXXXXXXXX/your-username
THINGPARK_CLIENT_SECRET API client secret your-client-secret

Getting API Credentials

  1. Log in to your ThingPark platform (e.g. community.thingpark.io)
  2. Go to your account settings
  3. Create an API client with client_credentials grant type
  4. Note the client ID (sub-XXXXXXXXX/username) and client secret

Usage with Claude Desktop

Add to your Claude Desktop configuration file:

<details> <summary>macOS: ~/Library/Application Support/Claude/claude_desktop_config.json</summary>

{
  "mcpServers": {
    "thingpark": {
      "command": "uvx",
      "args": ["mcp-server-thingpark"],
      "env": {
        "THINGPARK_URL": "https://community.thingpark.io/thingpark",
        "THINGPARK_CLIENT_ID": "sub-XXXXXXXXX/your-username",
        "THINGPARK_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

</details>

<details> <summary>Windows: %APPDATA%\Claude\claude_desktop_config.json</summary>

{
  "mcpServers": {
    "thingpark": {
      "command": "uvx",
      "args": ["mcp-server-thingpark"],
      "env": {
        "THINGPARK_URL": "https://community.thingpark.io/thingpark",
        "THINGPARK_CLIENT_ID": "sub-XXXXXXXXX/your-username",
        "THINGPARK_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

</details>

Usage with Claude Code

Add to ~/.claude/.mcp.json:

{
  "mcpServers": {
    "thingpark": {
      "command": "uvx",
      "args": ["mcp-server-thingpark"],
      "env": {
        "THINGPARK_URL": "https://community.thingpark.io/thingpark",
        "THINGPARK_CLIENT_ID": "sub-XXXXXXXXX/your-username",
        "THINGPARK_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Usage with VS Code

Install the MCP extension and add to your VS Code settings or .vscode/mcp.json:

{
  "mcp": {
    "servers": {
      "thingpark": {
        "command": "uvx",
        "args": ["mcp-server-thingpark"],
        "env": {
          "THINGPARK_URL": "https://community.thingpark.io/thingpark",
          "THINGPARK_CLIENT_ID": "sub-XXXXXXXXX/your-username",
          "THINGPARK_CLIENT_SECRET": "your-client-secret"
        }
      }
    }
  }
}

Examples

> List all my LoRaWAN devices

> Show me details for device A84041F21867E433

> Send downlink 0100003C to device A84041F21867E433 on FPort 2

> Set the transmit interval to 60 seconds on my vibration sensor

Adding Support for a New Sensor

  1. Create src/mcp_server_thingpark/sensors/<sensor_name>.py with a register(mcp, send_downlink) function:
def register(mcp, send_downlink):
    @mcp.tool()
    def my_sensor_set_interval(dev_eui: str, seconds: int) -> str:
        """Set transmit interval for MySensor."""
        payload = f"01{seconds:06X}"
        return send_downlink(dev_eui, payload, fport=2)
  1. Create src/mcp_server_thingpark/sensors/<sensor_name>.md with the downlink command reference
  2. Add a row to src/mcp_server_thingpark/sensors/SUPPORTED.md
  3. Submit a PR

The module is auto-discovered on startup — no need to edit server.py.

Debugging

You can use the MCP inspector to debug the server:

npx @modelcontextprotocol/inspector uvx mcp-server-thingpark

Increase logging verbosity with the -v flag:

mcp-server-thingpark -v     # INFO level
mcp-server-thingpark -vv    # DEBUG level

Technical Notes

DevEUI vs ref

The ThingPark DX Core API uses an internal ref identifier in URL paths, not the DevEUI. This server maps DevEUI to ref automatically — you always use DevEUIs.

Authentication

OAuth2 client credentials flow against the ThingPark Keycloak OIDC endpoint. Tokens are cached and refreshed automatically.

License

This project is licensed under the MIT License — see the LICENSE file for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选