Skip to main content

MCP server for ThingsPanel IoT platform

Project description

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)

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! ⭐

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mseep_thingspanel_mcp-0.1.4.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mseep_thingspanel_mcp-0.1.4-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file mseep_thingspanel_mcp-0.1.4.tar.gz.

File metadata

  • Download URL: mseep_thingspanel_mcp-0.1.4.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mseep_thingspanel_mcp-0.1.4.tar.gz
Algorithm Hash digest
SHA256 fdc46fb3020fc0c630d0cae3939608b67a3e40dae8f8726440cecf0b6e8fd8de
MD5 b7a36f0cc82a4baa4b215f5fb820162e
BLAKE2b-256 7f84e002d6809d52fa4876a854d8a058e9057ba4c1e99a6f8e89b5c0556845fb

See more details on using hashes here.

File details

Details for the file mseep_thingspanel_mcp-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_thingspanel_mcp-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cd8d54c1d3e3408f9e17844de25c2b4fbea2169bf5db76794624f2c18e3fd1d1
MD5 eb8537e6558034f60bee720863f07477
BLAKE2b-256 a72c2d0cfe17b2c5c8b7656c2e19bda0be6bec62f43715c7d10a6a4e640ff471

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page