ThingsPanel MCP

by thingspanel

MCP Client 26 stars
  • other

This MCP server integrates ThingsPanel IoT platform with AI models like Claude, GPT, and others that support the Model Context Protocol.

About

What is ThingsPanel MCP?

ThingsPanel MCP is an MCP (Model Context Protocol) server that provides an intelligent interface between AI models and the ThingsPanel IoT platform. It runs as a Python command-line tool and enables developers to interact with IoT devices using natural language. It is designed for IoT solution developers, AI integration experts, system administrators, and product teams.

How to use ThingsPanel MCP?

Install via pip install thingspanel-mcp or from source. Configure using command-line arguments (thingspanel-mcp --api-key "Your API Key" --base-url "Your Base URL") or environment variables (THINGSPANEL_API_KEY, THINGSPANEL_BASE_URL). For Claude Desktop integration, add a server entry to claude_desktop_config.json with the command and arguments. A ThingsPanel account and API key are required.

Key features of ThingsPanel MCP

- Natural language querying of devices and data
- Comprehensive device insights and statistics
- Real-time telemetry data access
- Convenient device control via AI
- Platform-wide analytics and trend monitoring

Use cases of ThingsPanel MCP

- Enable natural language IoT device control through AI assistants
- Allow AI models to access and analyze IoT sensor data for insights
- Connect AI to device data streams for real-time anomaly detection
- Provide device history access for predictive maintenance
- Generate automated IoT data reports and visualizations

FAQ from ThingsPanel MCP

What are the prerequisites for ThingsPanel MCP?

Python 3.8+ and a ThingsPanel account with an API key and the platform’s base URL.

How do I configure ThingsPanel MCP?

You can supply --api-key and --base-url on the command line, or set the THINGSPANEL_API_KEY and THINGSPANEL_BASE_URL environment variables.

Does ThingsPanel MCP support Claude Desktop?

Yes—add the appropriate mcpServers entry in claude_desktop_config.json using the thingspanel-mcp command with your credentials.

Is ThingsPanel MCP open source?

Yes, it is licensed under the Apache License 2.0.

How does ThingsPanel MCP handle security?

It uses secure credential management, authenticates via the ThingsPanel official API, and supports token-based authentication.

Details

Author
thingspanel
GitHub stars
26
Category
other
Repository
thingspanel/thingspanel-mcp

ThingsPanel MCP License Python Version PyPI version

<a href="https://glama.ai/mcp/servers/@ThingsPanel/thingspanel-mcp"> </a>

ThingsPanel IoT Platform's MCP (Model Context Protocol) Server.

English | 中文

🚀 Project Overview

ThingsPanel MCP Server is an innovative intelligent interface that enables you to:

- Interact with IoT devices using natural language
- Easily retrieve device information
- Monitor device performance and status in real-time
- Simplify device control commands
- Analyze platform-wide statistical data and trends

Target Audience

Intended Users

- IoT Solution Developers: Engineers and developers building solutions on the ThingsPanel IoT platform and seeking AI integration capabilities
- AI Integration Experts: Professionals looking to connect AI models with IoT systems
- System Administrators: IT personnel managing IoT infrastructure and wanting to enable AI-driven analysis and control
- Product Teams: Teams building products that combine IoT and AI functionality

Problems Addressed

- Integration Complexity: Eliminates the need to create custom integrations between AI models and IoT platforms
- Standardized Access: Provides a consistent interface for AI models to interact with IoT data and devices
- Security Control: Manages authentication and authorization for AI access to IoT systems
- Lowered Technical Barriers: Reduces technical obstacles to adding AI capabilities to existing IoT deployments

Ideal Application Scenarios

- Natural Language IoT Control: Enable users to control devices through AI assistants using natural language
- Intelligent Data Analysis: Allow AI models to access and analyze IoT sensor data for insights
- Anomaly Detection: Connect AI models to device data streams for real-time anomaly detection
- Predictive Maintenance: Enable AI-driven predictive maintenance by providing device history access
- Automated Reporting: Create systems that can generate IoT data reports and visualizations on demand
- Operational Optimization: Use AI to optimize device operations based on historical patterns

✨ Core Features

- 🗣️ Natural Language Querying
- 📊 Comprehensive Device Insights
- 🌡️ Real-time Telemetry Data
- 🎮 Convenient Device Control
- 📈 Platform-wide Analytics

🛠️ Prerequisites

- Python 3.8+
- ThingsPanel Account
- ThingsPanel API Key

📦 Installation

Option 1: Pip Installation

pip install thingspanel-mcp

Option 2: Source Code Installation

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

🔐 Configuration

Configuration Methods (Choose One)

Method 1: Direct Command Line Configuration (Recommended)

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

Method 2: Environment Variable Configuration

If you want to avoid repeated input, set environment variables:

# 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

💡 Tips:

- API keys are typically obtained from the API KEY management in the ThingsPanel platform
- Base URL refers to your ThingsPanel platform address, e.g., http://demo.thingspanel.cn/
- Command-line configuration is recommended to protect sensitive information

🖥️ Claude Desktop Integration

Add the following to your Claude desktop configuration file (claude_desktop_config.json):

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

🤔 Interaction Examples

Using the ThingsPanel MCP Server, you can now make natural language queries such as:

- "What is the current temperature of my sensor?"
- "List all active devices"
- "Turn on the automatic sprinkler system"
- "Show device activity for the last 24 hours"

🛡️ Security

- Secure credential management
- Uses ThingsPanel official API
- Supports token-based authentication

License

Apache License 2.0

🌟 Support Us

If this project helps you, please give us a star on GitHub! ⭐