ThingsBoard MCP 服务器 logo

ThingsBoard MCP 服务器

Organization
thingsboard

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.

Publisherthingsboard
Repositorythingsboard-mcp
LanguageJava
Forks
27
Stars
98
Available tools
0
Transport typestdio
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    ThingsBoard MCP 服务器 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    98 stars and 27 forks from the linked repository.

ThingsBoard MCP Server

License Docker Java

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:

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):

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 your VS Code settings.json or .vscode/mcp.json:

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"
        }
      }
    }
  }
}
bash
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/mcp

Start the server:

bash
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/mcp

Then point your MCP client to http://localhost:8000/sse.

Legacy auth: If your ThingsBoard version is older than 4.3, use THINGSBOARD_USERNAME and THINGSBOARD_PASSWORD instead of THINGSBOARD_API_KEY.

What You Can Do

Ask questions in natural language and get structured results from your ThingsBoard instance:

Query devices and entitiesAnalyze time-series data
Get My DevicesAnalyze Data
Generate and save telemetryGet anomaly analysis
Generate DataAnalysis Result

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)

bash
docker pull thingsboard/mcp

The 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

bash
wget https://github.com/thingsboard/mcp-server/releases/download/v2.1.0/thingsboard-mcp-server-2.1.0.jar

Run with:

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

If you're using the JAR file instead of Docker, use this in your claude_desktop_config.json:

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

bash
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.jar

Configuration

Environment Variables

VariableDescriptionDefault
THINGSBOARD_URLBase URL of your ThingsBoard instancerequired
THINGSBOARD_API_KEYAPI key for authentication (recommended for 4.3+)
THINGSBOARD_USERNAMEUsername for authentication (legacy)
THINGSBOARD_PASSWORDPassword for authentication (legacy)
THINGSBOARD_LOGIN_INTERVAL_SECONDSSession refresh interval1800
HTTP_BIND_ADDRESSHTTP bind address (SSE mode)127.0.0.1
HTTP_BIND_PORTHTTP port (SSE mode)8000
SPRING_AI_MCP_SERVER_STDIOEnable STDIO transporttrue
SPRING_WEB_APPLICATION_TYPEnone for STDIO, servlet for SSEnone
SPRING_AI_MCP_SERVER_SSE_ENDPOINTSSE endpoint path/sse
SPRING_AI_MCP_SERVER_SSE_MESSAGE_ENDPOINTSSE message endpoint path/mcp/message
VariableDescriptionDefault
THINGSBOARD_CONNECTION_MAX_RETRIESMax connection retry attempts3
THINGSBOARD_CONNECTION_RETRY_DELAY_SECONDSDelay between retries5
THINGSBOARD_CONNECTION_CONNECT_TIMEOUT_SECONDSHTTP connect timeout10
THINGSBOARD_CONNECTION_READ_TIMEOUT_SECONDSHTTP read timeout60
LOG_LEVEL_APPApplication log levelinfo
LOG_LEVEL_TOOLSTool execution log levelinfo
LOG_LEVEL_TOOL_RESPONSETool response log levelinfo
LOGGING_PATTERN_CONSOLELogback console pattern%d{yyyy-MM-dd HH:mm:ss} | %-5level | %logger{1} | %msg%n
LOGGING_CONSOLE_TARGETLog output targetSystem.err

Tool Groups

The server exposes 120+ tools which may exceed context limits for some clients. Disable groups you don't need:

VariableGroupToolsDefault
THINGSBOARD_TOOLS_EDQEntity Data Query + Guides40true
THINGSBOARD_TOOLS_TELEMETRYTelemetry & Attributes11true
THINGSBOARD_TOOLS_DEVICEDevices11true
THINGSBOARD_TOOLS_ASSETAssets8true
THINGSBOARD_TOOLS_ALARMAlarms9true
THINGSBOARD_TOOLS_OTAOTA Packages11true
THINGSBOARD_TOOLS_RELATIONRelations8true
THINGSBOARD_TOOLS_CUSTOMERCustomers7true
THINGSBOARD_TOOLS_USERUsers9true
THINGSBOARD_TOOLS_GROUPEntity Groups (PE only)10true

Example — reduce to ~50 tools for clients with limited context:

json
{
  "env": {
    "THINGSBOARD_TOOLS_EDQ": "false",
    "THINGSBOARD_TOOLS_OTA": "false",
    "THINGSBOARD_TOOLS_GROUP": "false",
    "THINGSBOARD_TOOLS_USER": "false"
  }
}

Available Tools

ToolDescription
createOrUpsertDeviceCreate or update a device by name. Primary tool for most device tasks.
saveDeviceCreate or update the device object from raw JSON. Advanced tool.
deleteDeviceDelete the device by id.
getDeviceByIdFetch the Device object based on the provided Device Id.
getDeviceCredentialsByDeviceIdGet device credentials by device id.
getTenantDevicesReturns a page of devices owned by tenant.
getTenantDeviceGet tenant device by name.
getCustomerDevicesReturns a page of devices assigned to customer.
getUserDevices (PE)Returns a page of devices available for the current user.
getDevicesByIdsGet devices by ids.
getDevicesByEntityGroupId (PE)Returns a page of devices in a specified entity group.
ToolDescription
saveAssetCreate or update the asset object.
deleteAssetDelete the asset by id.
getAssetByIdGet the Asset object by id.
getTenantAssetsReturns a page of assets owned by tenant.
getTenantAssetGet tenant asset by name.
getCustomerAssetsReturns a page of assets assigned to customer.
getUserAssets (PE)Returns a page of assets available for the current user.
getAssetsByEntityGroupId (PE)Returns a page of assets in a specified entity group.
ToolDescription
saveCustomerCreate or update the customer object.
deleteCustomerDelete the customer by id.
getCustomerByIdGet the Customer object by id.
getCustomersReturns a page of customers owned by tenant.
getTenantCustomerGet customer by title.
getUserCustomers (PE)Returns a page of customers available for the user.
getCustomersByEntityGroupId (PE)Returns a page of customers in a specified entity group.
ToolDescription
saveUserCreate or update the user object.
deleteUserDelete the user by id.
getUserByIdFetch the User object by id.
getUsersReturns a page of users owned by tenant or customer.
getTenantAdminsReturns a page of tenant administrator users.
getCustomerUsersReturns a page of users assigned to a customer.
getAllCustomerUsers (PE)Returns a page of all customer users for the current tenant.
getUsersForAssignReturns users that can be assigned to an alarm.
getUsersByEntityGroupId (PE)Returns a page of users in a specified entity group.
ToolDescription
saveAlarmCreate or update the alarm object.
deleteAlarmDelete the alarm by id.
ackAlarmAcknowledge the alarm.
clearAlarmClear the alarm.
getAlarmInfoByIdGet alarm info by id (includes originator name).
getAlarmsGet a page of alarms for the selected entity.
getAllAlarmsGet a page of alarms for the current user owner.
getHighestAlarmSeverityGet highest alarm severity by originator.
getAlarmTypesGet unique alarm types.
ToolDescription
saveOtaPackageInfoCreate or update OTA package info.
saveOtaPackageDataUpload OTA package binary from a file path.
downloadOtaPackageDownload OTA package binary to a local file path.
getOtaPackageInfoByIdGet OTA package info by id.
getOtaPackageByIdGet OTA package by id.
getOtaPackagesGet OTA packages (paged).
getOtaPackagesByDeviceProfileGet OTA packages by device profile and type.
assignOtaPackageToDeviceAssign or clear OTA package for a device.
assignOtaPackageToDeviceProfileAssign or clear OTA package for a device profile.
countByDeviceProfileAndEmptyOtaPackageCount devices without assigned OTA package.
deleteOtaPackageDelete OTA package by id.
ToolDescription
saveRelationCreate or update a relation.
deleteRelationDelete a relation between two entities.
deleteRelationsDelete all relations for an entity.
getRelationGet a relation between two entities.
findInfoByFromFind relations from an entity (includes entity names).
findByFromWithRelationTypeFind relations from an entity filtered by type.
findInfoByToFind relations to an entity (includes entity names).
findByToWithRelationTypeFind relations to an entity filtered by type.
ToolDescription
getAttributeKeysGet all attribute keys for an entity.
getAttributeKeysByScopeGet attribute keys by scope.
getAttributesGet attributes for an entity.
getAttributesByScopeGet attributes by scope.
getTimeseriesKeysGet all time-series keys for an entity.
getLatestTimeseriesGet latest time-series values.
getTimeseriesGet time-series data for a time range.
saveDeviceAttributesSave device attributes.
saveEntityAttributesV2Save entity attributes.
saveEntityTelemetrySave entity telemetry data.
saveEntityTelemetryWithTTLSave entity telemetry with TTL.
ToolDescription
saveEntityGroupCreate or update an entity group.
deleteEntityGroupDelete an entity group by id.
getEntityGroupByIdGet entity group by id.
getEntityGroupsByTypeGet entity groups by entity type.
getEntityGroupByOwnerAndNameAndTypeGet entity group by owner, type, and name.
getEntityGroupsByOwnerAndTypeGet entity groups by owner and type.
getEntityGroupsForEntityGet groups containing a specified entity.
getEntityGroupsByIdsGet entity groups by ids.
addEntitiesToEntityGroupAdd entities to a group.
removeEntitiesFromEntityGroupRemove entities from a group.

Complex filtered queries across all entity types. Supports entity fields, attributes, and latest telemetry with key filters.

ToolDescription
findEntityDataBySingleEntityFilterFind data for one entity by ID.
findEntityDataByEntityGroupFilter (PE)Find data by entity group.
findEntityDataByEntityListFilterFind data for a list of entity IDs.
findEntityDataByEntityNameFilterFind data by name prefix.
findEntityDataByEntityTypeFilterFind data by entity type.
findEntityDataByEntityGroupListFilter (PE)Find data for multiple groups.
findEntityDataByEntityGroupNameFilter (PE)Find data for groups by name prefix.
findEntityDataByEntitiesGroupNameFilter (PE)Find data for entities in a named group.
findEntityDataByStateEntityOwnerFilterFind data for entity owner.
findEntityDataByAssetTypeFilterFind assets by type.
findEntityDataByDeviceTypeFilterFind devices by type.
findEntityDataByEdgeTypeFilterFind edges by type.
findEntityDataByEntityViewTypeFilterFind entity views by type.
findEntityDataByRelationsQueryFilterFind related entities.
findEntityDataByAssetSearchQueryFilterFind related assets.
findEntityDataByDeviceSearchQueryFilterFind related devices.
findEntityDataByEntityViewSearchQueryFilterFind related entity views.
findEntityDataByApiUsageStateFilterFind API usage data.
findEntityDataByEdgeQueryFilterFind related edges.

Count entities matching filters. Same filter types as Entity Data Query.

ToolDescription
countBySingleEntityFilterCount by single entity ID.
countByEntityGroupFilter (PE)Count by entity group.
countByEntityListFilterCount by entity ID list.
countByEntityNameFilterCount by name prefix.
countByEntityTypeFilterCount by entity type.
countByEntityGroupListFilter (PE)Count by multiple groups.
countByEntityGroupNameFilter (PE)Count by group name prefix.
countByEntitiesGroupNameFilter (PE)Count entities in a named group.
countByAssetTypeFilterCount assets by type.
countByDeviceTypeFilterCount devices by type.
countByEdgeTypeFilterCount edges by type.
countByEntityViewTypeFilterCount entity views by type.
countByApiUsageStateFilterCount API usage rows.
countByRelationsQueryFilterCount related entities.
countByAssetSearchQueryFilterCount related assets.
countByDeviceSearchQueryFilterCount related devices.
countByEntityViewSearchQueryFilterCount related entity views.
countByEdgeQueryFilterCount related edges.

Documentation tools that help LLMs construct correct queries.

ToolDescription
getEdqGuideGet documentation for creating Entity Data Queries.
getEdqCountGuideGet documentation for creating Entity Count Queries.
getKeyFiltersGuideGet documentation for creating key filters.

License

This project is licensed under the Apache License 2.0 — see the LICENSE file for details.

Installation

TypingMind
{
  "mcpServers": {
    "thingsboard-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "THINGSBOARD_URL",
        "-e",
        "THINGSBOARD_USERNAME",
        "-e",
        "THINGSBOARD_PASSWORD",
        "mcp/thingsboard"
      ],
      "env": {
        "THINGSBOARD_URL": "<THINGSBOARD_URL>",
        "THINGSBOARD_USERNAME": "<THINGSBOARD_USERNAME>",
        "THINGSBOARD_PASSWORD": "<THINGSBOARD_PASSWORD>"
      }
    }
  }
}

Use ThingsBoard MCP 服务器 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once ThingsBoard MCP 服务器 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add ThingsBoard MCP 服务器 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the ThingsBoard MCP 服务器 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "thingsboard-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the ThingsBoard MCP 服务器 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the ThingsBoard MCP 服务器 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use ThingsBoard MCP 服务器 to help me with this task?
ThingsBoard MCP 服务器
Sure. I read it.
Here is what I found using ThingsBoard MCP 服务器.

Frequently asked questions

What is the ThingsBoard MCP 服务器 MCP server used for?

ThingsBoard MCP 服务器 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use ThingsBoard MCP 服务器 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use ThingsBoard MCP 服务器 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use ThingsBoard MCP 服务器 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With ThingsBoard MCP 服务器 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect ThingsBoard MCP 服务器 MCP to TypingMind?

ThingsBoard MCP 服务器 runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does ThingsBoard MCP 服务器 MCP provide in TypingMind?

ThingsBoard MCP 服务器 exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use ThingsBoard MCP 服务器 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If ThingsBoard MCP 服务器 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇