Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

iotdb-mcp-server

MCP.Pizza Chef: apache

The iotdb-mcp-server is an MCP server implementation that integrates Apache IoTDB to provide database interaction and business intelligence capabilities. It supports running SQL queries in two modes: Tree Model and Table Model, configurable via the IOTDB_SQL_DIALECT setting. This server exposes tools for executing metadata and data queries, enabling structured access to IoTDB data for real-time context feeding into LLMs and AI workflows.

Use This MCP server To

Run SQL queries on IoTDB databases via MCP protocol Query IoTDB metadata using SHOW and COUNT commands Retrieve time-series data with SELECT queries Switch between tree and table data models for flexible querying Integrate IoTDB data into AI workflows for real-time context Enable business intelligence reporting on IoTDB data Support multi-step reasoning with live IoTDB query results

README

IoTDB MCP Server

smithery badge

Overview

A Model Context Protocol (MCP) server implementation that provides database interaction and business intelligence capabilities through IoTDB. This server enables running SQL queries.

Components

Resources

The server doesn't expose any resources.

Prompts

The server doesn't provide any prompts.

Tools

The server offers different tools for IoTDB Tree Model and Table Model. You can choose between them by setting the "IOTDB_SQL_DIALECT" configuration to either "tree" or "table".

Tree Model
  • metadata_query
    • Execute SHOW/COUNT queries to read metadata from the database
    • Input:
      • query_sql (string): The SHOW/COUNT SQL query to execute
    • Returns: Query results as array of objects
  • select_query
    • Execute SELECT queries to read data from the database
    • Input:
      • query_sql (string): The SELECT SQL query to execute
    • Returns: Query results as array of objects
Table Model
Query Tools
  • read_query
    • Execute SELECT queries to read data from the database
    • Input:
      • query (string): The SELECT SQL query to execute
    • Returns: Query results as array of objects
Schema Tools
  • list_tables

    • Get a list of all tables in the database
    • No input required
    • Returns: Array of table names
  • describe-table

    • View schema information for a specific table
    • Input:
      • table_name (string): Name of table to describe
    • Returns: Array of column definitions with names and types

Claude Desktop Integration

Prerequisites

  • Python with uv package manager
  • IoTDB installation
  • MCP server dependencies

Development

# Clone the repository
git clone https://github.com/apache/iotdb-mcp-server.git
cd iotdb_mcp_server

# Create virtual environment
uv venv
source venv/bin/activate  # or `venv\Scripts\activate` on Windows

# Install development dependencies
uv sync

Configure the MCP server in Claude Desktop's configuration file:

MacOS

Location: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows

Location: %APPDATA%/Claude/claude_desktop_config.json

You may need to put the full path to the uv executable in the command field. You can get this by running which uv on MacOS/Linux or where uv on Windows.

{
  "mcpServers": {
    "iotdb": {
      "command": "uv",
      "args": [
        "--directory",
        "YOUR_REPO_PATH/src/iotdb_mcp_server",
        "run",
        "server.py"
      ],
      "env": {
        "IOTDB_HOST": "127.0.0.1",
        "IOTDB_PORT": "6667",
        "IOTDB_USER": "root",
        "IOTDB_PASSWORD": "root",
        "IOTDB_DATABASE": "test",
        "IOTDB_SQL_DIALECT": "table"
      }
    }
  }
}

iotdb-mcp-server FAQ

How do I configure the query model in iotdb-mcp-server?
Set the IOTDB_SQL_DIALECT environment variable to either 'tree' or 'table' to select the query model.
What types of SQL queries can iotdb-mcp-server execute?
It supports SHOW, COUNT, and SELECT queries for metadata and data retrieval from IoTDB.
Does iotdb-mcp-server expose any resources or prompts?
No, this server does not expose resources or prompts; it provides tools for querying IoTDB.
Can iotdb-mcp-server be used with different LLM providers?
Yes, it is provider-agnostic and works with OpenAI, Anthropic Claude, and Google Gemini models.
How does iotdb-mcp-server handle query results?
Query results are returned as arrays of objects, suitable for structured processing by LLMs.
Is it possible to extend iotdb-mcp-server with custom tools?
The server currently offers predefined tools for Tree and Table models; custom extensions would require modifying the server code.
What is the main advantage of using iotdb-mcp-server?
It enables real-time, structured access to IoTDB data for AI-enhanced workflows and business intelligence.