ThingsPanel MCP

Official

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Allows configuration via .env files for storing ThingsPanel API URLs and keys, simplifying environment setup for the MCP server.

  • Provides containerized deployment of the MCP server through Docker, with support for Docker Compose to easily run both the ThingsPanel MCP server and MCP Inspector for debugging.

  • Supports devices using the MQTT protocol for IoT communication, allowing the MCP server to interact with MQTT-enabled devices managed by ThingsPanel.

ThingsPanel MCP

ThingsPanel物联网平台的 MCP(模型上下文协议)服务器。

English |中文

🚀 项目概述

ThingsPanel MCP Server 是一个创新的智能界面,可让您:

  • 使用自然语言与物联网设备交互
  • 轻松检索设备信息
  • 实时监控设备性能和状态
  • 简化设备控制命令
  • 分析平台范围内的统计数据和趋势

目标受众

目标用户

  • 物联网解决方案开发人员:在 ThingsPanel 物联网平台上构建解决方案并寻求 AI 集成能力的工程师和开发人员
  • 人工智能集成专家:寻求将人工智能模型与物联网系统连接起来的专业人士
  • 系统管理员:管理物联网基础设施并希望实现人工智能驱动的分析和控制的 IT 人员
  • 产品团队:构建结合物联网和人工智能功能的产品的团队

解决的问题

  • 集成复杂性:无需在 AI 模型和物联网平台之间创建自定义集成
  • 标准化访问:为AI模型与物联网数据和设备交互提供一致的接口
  • 安全控制:管理人工智能访问物联网系统的身份验证和授权
  • 降低技术壁垒:减少在现有物联网部署中添加人工智能功能的技术障碍

理想的应用场景

  • 自然语言物联网控制:使用户能够使用自然语言通过人工智能助手控制设备
  • 智能数据分析:允许人工智能模型访问和分析物联网传感器数据以获取洞察
  • 异常检测:将 AI 模型连接到设备数据流以进行实时异常检测
  • 预测性维护:通过提供设备历史记录访问实现人工智能驱动的预测性维护
  • 自动报告:创建可按需生成物联网数据报告和可视化的系统
  • 运营优化:使用人工智能根据历史模式优化设备运营

✨ 核心功能

  • 🗣️ 自然语言查询
  • 📊 全面的设备洞察
  • 🌡️实时遥测数据
  • 🎮便捷的设备控制
  • 📈 平台范围的分析

🛠️ 先决条件

  • Python 3.8+
  • ThingsPanel 账户
  • ThingsPanel API 密钥

📦安装

选项 1:Pip 安装

pip install thingspanel-mcp

选项 2:源代码安装

# Clone the repository git clone https://github.com/ThingsPanel/thingspanel-mcp.git # Navigate to project directory cd thingspanel-mcp # Install the project pip install -e .

🔐 配置

配置方法(选择一种)

方法一:直接命令行配置(推荐)

thingspanel-mcp --api-key "Your API Key" --base-url "Your ThingsPanel Base URL"

方法二:环境变量配置

如果想避免重复输入,请设置环境变量:

# Add to ~/.bashrc, ~/.zshrc, or corresponding shell config file export THINGSPANEL_API_KEY="Your API Key" export THINGSPANEL_BASE_URL="Your ThingsPanel Base URL" # Then run source ~/.bashrc # or source ~/.zshrc

💡提示:

  • API 密钥通常从 ThingsPanel 平台中的 API KEY 管理中获取
  • Base URL 指的是您的 ThingsPanel 平台地址,例如http://demo.thingspanel.cn/
  • 建议使用命令行配置来保护敏感信息

🖥️ Claude 桌面集成

将以下内容添加到您的 Claude 桌面配置文件( claude_desktop_config.json )中:

{ "mcpServers": { "thingspanel": { "command": "thingspanel-mcp", "args": [ "--api-key", "Your API Key", "--base-url", "Your Base URL" ] } } }

🤔 交互示例

使用 ThingsPanel MCP 服务器,您现在可以进行自然语言查询,例如:

  • “我的传感器当前的温度是多少?”
  • “列出所有活动设备”
  • “打开自动喷水灭火系统”
  • “显示过去 24 小时的设备活动”

🛡️ 安全

  • 安全凭证管理
  • 使用 ThingsPanel 官方 API
  • 支持基于令牌的身份验证

执照

Apache 许可证 2.0

🌟 支持我们

如果这个项目对你有帮助,请在 GitHub 上给我们一个 star!⭐

-
security - not tested
A
license - permissive license
-
quality - not tested

将AI模型与ThingsPanel物联网平台连接起来的集成服务器,让AI助手能够通过自然语言与物联网设备进行交互,实现设备控制、数据检索和管理操作。

  1. 🚀 Project Overview
    1. Target Audience
      1. Intended Users
      2. Problems Addressed
      3. Ideal Application Scenarios
    2. ✨ Core Features
      1. 🛠️ Prerequisites
        1. 📦 Installation
          1. Option 1: Pip Installation
          2. Option 2: Source Code Installation
        2. 🔐 Configuration
          1. Configuration Methods (Choose One)
        3. 🖥️ Claude Desktop Integration
          1. 🤔 Interaction Examples
            1. 🛡️ Security
              1. License
                1. 🌟 Support Us
                  ID: rmf6vsucns