Skip to content
Stand with Ukraine flag

Getting Started

The ThingsBoard MCP Server connects your MCP-compatible LLM client to a live ThingsBoard Edge node via the Model Context Protocol. It exposes a set of tools across multiple tool groups for querying, creating, and managing local edge data using natural language — no REST calls or dashboard clicks required.

The MCP server works with Claude Desktop, Cursor, VS Code Copilot, Claude Code, and any MCP-compatible client.

Before you begin, ensure that you have:

  • A running ThingsBoard Edge instance, accessible over the network.
  • A Tenant Administrator username and password for the Edge instance.
  • An MCP-compatible LLM client, like Claude Desktop, Claude Code, Cursor, or VS Code with an MCP extension.

Pull the Docker image:

Terminal window
docker pull thingsboard/mcp

Edit the Claude Desktop config file (claude_desktop_config.json):

{
"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": "http://<edge_host>:8080",
"THINGSBOARD_USERNAME": "<tenant_email>",
"THINGSBOARD_PASSWORD": "<password>",
"LOGGING_PATTERN_CONSOLE": ""
}
}
}
}

When the client starts, thingsboard tools appear in the client’s tool panel.

As an alternative to Docker, you can build the JAR file and run the MCP server directly.

Prerequisites:

  • Java 17 or later
  • Maven 3.6 or later

To build the project:

  1. Clone the thingsboard-mcp repository.

  2. Build the project:

    Terminal window
    mvn clean install -DskipTests
  3. The JAR file is available in the target folder:

    ./target/thingsboard-mcp-server-1.0.0.jar
  4. Run the server:

    Terminal window
    # STDIO mode
    java -jar ./target/thingsboard-mcp-server-1.0.0.jar
    # SSE mode
    java -Dspring.ai.mcp.server.stdio=false -Dspring.main.web-application-type=servlet -jar ./target/thingsboard-mcp-server-1.0.0.jar

To use the JAR with an MCP client instead of Docker, replace the command and args in your client config. Example for Claude Desktop:

{
"mcpServers": {
"thingsboard": {
"command": "java",
"args": [
"-jar",
"/absolute/path/to/thingsboard-mcp-server-1.0.0.jar"
],
"env": {
"THINGSBOARD_URL": "http://<edge_host>:8080",
"THINGSBOARD_USERNAME": "<tenant_email>",
"THINGSBOARD_PASSWORD": "<password>",
"LOGGING_PATTERN_CONSOLE": ""
}
}
}
}

The same pattern applies to Cursor, VS Code, and other MCP clients.