Thingsboard Mcp Server

Created By
thingsboard8 months ago
Overview

What is ThingsBoard MCP Server?

The ThingsBoard MCP Server is a Model Context Protocol (MCP) server that enables LLMs and AI agents to interact with a ThingsBoard IoT platform instance using natural language.
It allows AI assistants like Claude Desktop, Cursor, and other MCP-compatible tools to query, manage, and analyze IoT data directly from ThingsBoard.

How to Use ThingsBoard MCP Server

Choose your ThingsBoard instance - You can connect to:

Prepare credentials - Have a valid ThingsBoard username/password with appropriate permissions.

Run the server - Options include:

  • Docker (STDIO mode - default)
docker run --rm -i \
-e THINGSBOARD_URL=<url> \
-e THINGSBOARD_USERNAME=<username> \
-e THINGSBOARD_PASSWORD=<password> \
thingsboard/mcp
  • Docker (SSE mode) - Use -p 8000:8000 and SSE-specific env vars.
docker run --rm \
-p 8000:8000 \
-e THINGSBOARD_URL=<url> \
-e THINGSBOARD_USERNAME=<username> \
-e THINGSBOARD_PASSWORD=<password> \
-e SPRING_AI_MCP_SERVER_STDIO=false \
-e SPRING_WEB_APPLICATION_TYPE=servlet \
thingsboard/mcp
  • Build from source - Requires Java 17+ and Maven; produces a .jar for local execution.

Configure your MCP client - Add the ThingsBoard MCP server details to your MCP client’s config file, specifying command, arguments, and environment variables.

Key Features

Entity Operations
Manage and query Devices, Assets, Customers, and Users, including their profiles, relationships, and credentials.

Telemetry Management
Retrieve, insert, or update telemetry and attributes (with optional TTL), including time-series queries and aggregation.

Relations
Explore relationships between entities in both directions.

Alarms
Query alarms, alarm types, severities, and related info for specific entities.

Administration
Access system, security, and usage information; manage administrative settings.

Broad Tool Coverage
60+ tools across categories such as devices, assets, customers, users, alarms, entity groups, relations, telemetry, and admin operations.

Use Cases

Natural Language IoT Data Queries
Ask questions like “Show me the latest temperature readings for Device X” and get structured results.

Device & Asset Management
Create, retrieve, or manage IoT devices and assets without manual dashboard interaction.

Analytics on IoT Data
Perform advanced statistical and anomaly detection analysis on telemetry to identify unusual patterns or operational issues.

Examples:

  • “Detect periods when a device’s battery drains faster than a defined threshold”
  • “Identify and quantify data gaps in telemetry to detect outages or communication failures”
  • “Detect sudden pressure spikes that exceed safety thresholds for industrial monitoring”

FAQ

What is the purpose of the ThingsBoard MCP Server?
It provides a structured and AI-friendly interface to query and manage IoT data and configurations in ThingsBoard.

Do I need a ThingsBoard account?
Yes - with valid username, password, and permissions for the data or actions you want to access.

Which tools are available?
The server includes dedicated tools for devices, assets, customers, users, alarms, telemetry, relations, entity groups, and administrative operations.

Can I run it in different modes?
Yes - STDIO (default for AI assistants) and SSE (HTTP-based for remote MCP connections).

Server Config

{
  "mcpServers": {
    "thingsboard": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "THINGSBOARD_URL",
        "-e",
        "THINGSBOARD_USERNAME",
        "-e",
        "THINGSBOARD_PASSWORD",
        "-e",
        "LOGGING_PATTERN_CONSOLE",
        "thingsboard/mcp"
      ],
      "env": {
        "THINGSBOARD_URL": "<thingsboard_url>",
        "THINGSBOARD_USERNAME": "<thingsboard_username>",
        "THINGSBOARD_PASSWORD": "<thingsboard_password>",
        "LOGGING_PATTERN_CONSOLE": ""
      }
    }
  }
}
Project Info
Created At
8 months ago
Updated At
8 months ago
Author Name
thingsboard
Star
-
Language
-
License
-
Category

Recommend Servers

View All
金数据

20 hours ago