Skip to main content

ThingsPanel MCP License Python Version PyPI version

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)

thingspanel-mcp --token "Your ThingsPanel login token" --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_TOKEN="Your ThingsPanel login token"
export THINGSPANEL_BASE_URL="Your ThingsPanel Base URL"
export THINGSVIS_BASE_URL="Your ThingsVis service URL"
export THINGSVIS_TOKEN="Your ThingsVis login token"

# Then run
source ~/.bashrc  # or source ~/.zshrc

💡 Tips:

  • JWT tokens retain the permissions assigned to their accounts by the services. ThingsPanel API keys map to tenant-admin permissions and cannot represent superadmins or normal tenant users.
  • Use named profiles in ~/.thingspanel/config.json for superadmin, tenant_admin, and tenant_user; select the matching profile in each MCP API tool call. The MCP tools do not accept caller-supplied roles.
  • 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! ⭐

Release files for thingspanel-mcp 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thingspanel-mcp 0.1.9
File Size Uploaded
thingspanel_mcp-0.1.9.tar.gz 48.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for thingspanel-mcp 0.1.9
File Interpreter ABI Platform
thingspanel_mcp-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 94.3 kB

Release files / thingspanel_mcp-0.1.9.tar.gz

Download URL thingspanel_mcp-0.1.9.tar.gz
Size 48.0 kB
Tags Source
SHA-256 checksum
How to use checksums
58fad84cb682c266c7c75b7ded534ed0c5015e2bf94f8dc5aa241455d629cb4d
BLAKE2b-256 checksum
How to use checksums
e45079c009aa6a8bcc4d3f8e709738ef2a14945fac84620cd770cb4816d69878
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Release files / thingspanel_mcp-0.1.9-py3-none-any.whl

Download URL thingspanel_mcp-0.1.9-py3-none-any.whl
Size 46.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
395a9b3fbf61a486b95612d49c82eaea33ebb853583dd33f9e4aa5fa3de4d8b0
BLAKE2b-256 checksum
How to use checksums
c58c03587a20b744ed90fb69f91e264b116147f58826a88130e943c5dfa24436
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Release history Release notifications | RSS feed

0.1.10

2 release files

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page