IoTDB MCP Server

IoTDB MCP Server

By apache GitHub

Apache IoTDB MCP Server

python iot
Overview

what is IoTDB MCP Server?

IoTDB MCP Server is an implementation of a Model Context Protocol (MCP) server that facilitates database interaction and business intelligence capabilities through IoTDB, allowing users to run SQL queries.

how to use IoTDB MCP Server?

To use the IoTDB MCP Server, clone the repository from GitHub, set up a virtual environment, install the necessary dependencies, and configure the server in the Claude Desktop's configuration file.

key features of IoTDB MCP Server?

  • Execute SQL SELECT queries to read data from the database.
  • List all tables in the database.
  • View schema information for specific tables.

use cases of IoTDB MCP Server?

  1. Running SQL queries to retrieve data from IoTDB.
  2. Analyzing database schemas for better data management.
  3. Integrating with business intelligence tools for data analysis.

FAQ from IoTDB MCP Server?

  • What are the prerequisites for using IoTDB MCP Server?

You need Python with the uv package manager, IoTDB installation, and MCP server dependencies.

  • How do I configure the MCP server?

You need to edit the Claude Desktop's configuration file to include the MCP server settings.

  • Is there any support for other SQL commands?

Currently, the server primarily supports SELECT queries.

Content

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"
      }
    }
  }
}
No tools information available.

The open-source multi-agent chat interface that lets you manage multiple agents in one dynamic conversation and add MCP servers for deep research

python typescript
View Details

AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).

python mcp
View Details

MCP Client Implementation Using LangChain ReAct Agent / Python

python mcp
View Details

An MCP server for processing images using Florence-2

python florence-2
View Details

Real-time stock API with Python, MCP server example, yfinance stock analysis dashboard

python fastapi
View Details

YouTube MCP Server is an AI-powered solution designed to revolutionize your YouTube experience. It empowers users to search for YouTube videos, retrieve detailed transcripts, and perform semantic searches over video content—all without relying on the official API. By integrating with a vector database, this server streamlines content discovery.

python machine-learning
View Details

A simple MCP server for weather

python mcp
View Details