Enables deployment and running of the ThingsBoard MCP server as a containerized application, supporting both STDIO and SSE communication modes.
Built on the Spring framework to provide IoT platform integration capabilities, allowing AI agents to interact with ThingsBoard instances through natural language commands for managing devices, assets, customers, telemetry data, alarms, and system administration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ThingsBoard MCP Servershow me the temperature readings from my warehouse sensors for the last 24 hours"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ThingsBoard MCP Server
Connect AI agents to your ThingsBoard IoT platform via Model Context Protocol (MCP). Query devices, manage entities, analyze telemetry, and automate operations — all through natural language.
Works with Claude Desktop, Cursor, VS Code Copilot, Claude Code, and any MCP-compatible client.
Quick Start
You need a ThingsBoard instance (Cloud, EU Cloud, self-hosted CE/PE, or Edge) and an API key (ThingsBoard 4.3+) or username/password.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"thingsboard": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "THINGSBOARD_URL", "-e", "THINGSBOARD_API_KEY", "thingsboard/mcp"],
"env": {
"THINGSBOARD_URL": "https://thingsboard.cloud",
"THINGSBOARD_API_KEY": "YOUR_API_KEY"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):
{
"mcpServers": {
"thingsboard": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "THINGSBOARD_URL", "-e", "THINGSBOARD_API_KEY", "thingsboard/mcp"],
"env": {
"THINGSBOARD_URL": "https://thingsboard.cloud",
"THINGSBOARD_API_KEY": "YOUR_API_KEY"
}
}
}
}Add to your VS Code settings.json or .vscode/mcp.json:
{
"mcp": {
"servers": {
"thingsboard": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "THINGSBOARD_URL", "-e", "THINGSBOARD_API_KEY", "thingsboard/mcp"],
"env": {
"THINGSBOARD_URL": "https://thingsboard.cloud",
"THINGSBOARD_API_KEY": "YOUR_API_KEY"
}
}
}
}
}claude mcp add thingsboard \
-e THINGSBOARD_URL=https://thingsboard.cloud \
-e THINGSBOARD_API_KEY=YOUR_API_KEY \
-- docker run -i --rm -e THINGSBOARD_URL -e THINGSBOARD_API_KEY thingsboard/mcpStart the server:
docker run --rm -p 8000:8000 \
-e THINGSBOARD_URL=https://thingsboard.cloud \
-e THINGSBOARD_API_KEY=YOUR_API_KEY \
-e SPRING_AI_MCP_SERVER_STDIO=false \
-e SPRING_WEB_APPLICATION_TYPE=servlet \
thingsboard/mcpThen point your MCP client to http://localhost:8000/sse.
Legacy auth: If your ThingsBoard version is older than 4.3, use
THINGSBOARD_USERNAMEandTHINGSBOARD_PASSWORDinstead ofTHINGSBOARD_API_KEY.
Related MCP server: ThingsPanel MCP
What You Can Do
Ask questions in natural language and get structured results from your ThingsBoard instance:
Query devices and entities | Analyze time-series data |
|
|
Generate and save telemetry | Get anomaly analysis |
|
|
120+ tools across 10 tool groups:
Devices — create, update, delete, list, search by name/type/group
Assets — CRUD, list by tenant/customer, search
Customers — CRUD, list, search by title
Users — CRUD, list, admin/customer user management
Alarms — create, acknowledge, clear, delete, query by severity
Telemetry — read/write attributes and time-series, aggregation, TTL
Relations — create, delete, navigate entity relationships
OTA Packages — upload, download, assign firmware/software to devices
Entity Groups (PE) — manage groups, assign/remove entities
Entity Data Query — complex filtered queries across all entity types with attribute/telemetry filters
Installation
Docker (Recommended)
docker pull thingsboard/mcpThe Docker image supports two transport modes:
STDIO (default) — for clients that launch the server as a subprocess (Claude Desktop, Cursor, etc.)
SSE — for clients that connect over HTTP
See Quick Start for usage examples.
Download Binary
wget https://github.com/thingsboard/mcp-server/releases/download/v2.1.0/thingsboard-mcp-server-2.1.0.jarRun with:
# STDIO mode
java -jar thingsboard-mcp-server-2.1.0.jar
# SSE mode
java -Dspring.ai.mcp.server.stdio=false -Dspring.main.web-application-type=servlet -jar thingsboard-mcp-server-2.1.0.jarIf you're using the JAR file instead of Docker, use this in your claude_desktop_config.json:
{
"mcpServers": {
"thingsboard": {
"command": "java",
"args": ["-jar", "/absolute/path/to/thingsboard-mcp-server-2.1.0.jar"],
"env": {
"THINGSBOARD_URL": "https://thingsboard.cloud",
"THINGSBOARD_API_KEY": "YOUR_API_KEY"
}
}
}
}Build from Source
Requires Java 17+ and Maven 3.6+.
git clone https://github.com/thingsboard/mcp-server.git
cd mcp-server
mvn clean install -DskipTests
java -jar target/thingsboard-mcp-server-2.1.0.jarConfiguration
Environment Variables
Variable | Description | Default |
| Base URL of your ThingsBoard instance | required |
| API key for authentication (recommended for 4.3+) | |
| Username for authentication (legacy) | |
| Password for authentication (legacy) | |
| Session refresh interval |
|
| HTTP bind address (SSE mode) |
|
| HTTP port (SSE mode) |
|
| Enable STDIO transport |
|
|
|
|
| SSE endpoint path |
|
| SSE message endpoint path |
|
Variable | Description | Default |
| Max connection retry attempts |
|
| Delay between retries |
|
| HTTP connect timeout |
|
| HTTP read timeout |
|
| Application log level |
|
| Tool execution log level |
|
| Tool response log level |
|
| Logback console pattern |
|
| Log output target |
|
Tool Groups
The server exposes 120+ tools which may exceed context limits for some clients. Disable groups you don't need:
Variable | Group | Tools | Default |
| Entity Data Query + Guides | 40 |
|
| Telemetry & Attributes | 11 |
|
| Devices | 11 |
|
| Assets | 8 |
|
| Alarms | 9 |
|
| OTA Packages | 11 |
|
| Relations | 8 |
|
| Customers | 7 |
|
| Users | 9 |
|
| Entity Groups (PE only) | 10 |
|
Example — reduce to ~50 tools for clients with limited context:
{
"env": {
"THINGSBOARD_TOOLS_EDQ": "false",
"THINGSBOARD_TOOLS_OTA": "false",
"THINGSBOARD_TOOLS_GROUP": "false",
"THINGSBOARD_TOOLS_USER": "false"
}
}Available Tools
Tool | Description |
| Create or update a device by name. Primary tool for most device tasks. |
| Create or update the device object from raw JSON. Advanced tool. |
| Delete the device by id. |
| Fetch the Device object based on the provided Device Id. |
| Get device credentials by device id. |
| Returns a page of devices owned by tenant. |
| Get tenant device by name. |
| Returns a page of devices assigned to customer. |
| Returns a page of devices available for the current user. |
| Get devices by ids. |
| Returns a page of devices in a specified entity group. |
Tool | Description |
| Create or update the asset object. |
| Delete the asset by id. |
| Get the Asset object by id. |
| Returns a page of assets owned by tenant. |
| Get tenant asset by name. |
| Returns a page of assets assigned to customer. |
| Returns a page of assets available for the current user. |
| Returns a page of assets in a specified entity group. |
Tool | Description |
| Create or update the customer object. |
| Delete the customer by id. |
| Get the Customer object by id. |
| Returns a page of customers owned by tenant. |
| Get customer by title. |
| Returns a page of customers available for the user. |
| Returns a page of customers in a specified entity group. |
Tool | Description |
| Create or update the user object. |
| Delete the user by id. |
| Fetch the User object by id. |
| Returns a page of users owned by tenant or customer. |
| Returns a page of tenant administrator users. |
| Returns a page of users assigned to a customer. |
| Returns a page of all customer users for the current tenant. |
| Returns users that can be assigned to an alarm. |
| Returns a page of users in a specified entity group. |
Tool | Description |
| Create or update the alarm object. |
| Delete the alarm by id. |
| Acknowledge the alarm. |
| Clear the alarm. |
| Get alarm info by id (includes originator name). |
| Get a page of alarms for the selected entity. |
| Get a page of alarms for the current user owner. |
| Get highest alarm severity by originator. |
| Get unique alarm types. |
Tool | Description |
| Create or update OTA package info. |
| Upload OTA package binary from a file path. |
| Download OTA package binary to a local file path. |
| Get OTA package info by id. |
| Get OTA package by id. |
| Get OTA packages (paged). |
| Get OTA packages by device profile and type. |
| Assign or clear OTA package for a device. |
| Assign or clear OTA package for a device profile. |
| Count devices without assigned OTA package. |
| Delete OTA package by id. |
Tool | Description |
| Create or update a relation. |
| Delete a relation between two entities. |
| Delete all relations for an entity. |
| Get a relation between two entities. |
| Find relations from an entity (includes entity names). |
| Find relations from an entity filtered by type. |
| Find relations to an entity (includes entity names). |
| Find relations to an entity filtered by type. |
Tool | Description |
| Get all attribute keys for an entity. |
| Get attribute keys by scope. |
| Get attributes for an entity. |
| Get attributes by scope. |
| Get all time-series keys for an entity. |
| Get latest time-series values. |
| Get time-series data for a time range. |
| Save device attributes. |
| Save entity attributes. |
| Save entity telemetry data. |
| Save entity telemetry with TTL. |
Tool | Description |
| Create or update an entity group. |
| Delete an entity group by id. |
| Get entity group by id. |
| Get entity groups by entity type. |
| Get entity group by owner, type, and name. |
| Get entity groups by owner and type. |
| Get groups containing a specified entity. |
| Get entity groups by ids. |
| Add entities to a group. |
| Remove entities from a group. |
Complex filtered queries across all entity types. Supports entity fields, attributes, and latest telemetry with key filters.
Tool | Description |
| Find data for one entity by ID. |
| Find data by entity group. |
| Find data for a list of entity IDs. |
| Find data by name prefix. |
| Find data by entity type. |
| Find data for multiple groups. |
| Find data for groups by name prefix. |
| Find data for entities in a named group. |
| Find data for entity owner. |
| Find assets by type. |
| Find devices by type. |
| Find edges by type. |
| Find entity views by type. |
| Find related entities. |
| Find related assets. |
| Find related devices. |
| Find related entity views. |
| Find API usage data. |
| Find related edges. |
Count entities matching filters. Same filter types as Entity Data Query.
Tool | Description |
| Count by single entity ID. |
| Count by entity group. |
| Count by entity ID list. |
| Count by name prefix. |
| Count by entity type. |
| Count by multiple groups. |
| Count by group name prefix. |
| Count entities in a named group. |
| Count assets by type. |
| Count devices by type. |
| Count edges by type. |
| Count entity views by type. |
| Count API usage rows. |
| Count related entities. |
| Count related assets. |
| Count related devices. |
| Count related entity views. |
| Count related edges. |
Documentation tools that help LLMs construct correct queries.
Tool | Description |
| Get documentation for creating Entity Data Queries. |
| Get documentation for creating Entity Count Queries. |
| Get documentation for creating key filters. |
License
This project is licensed under the Apache License 2.0 — see the LICENSE file for details.
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.



