Skip to main content
Glama
IoTDB MCP Server

IoTDB MCP Server

Official
by apache

Сервер MCP IoTDB

значок кузнеца

Обзор

Реализация сервера Model Context Protocol (MCP), которая обеспечивает взаимодействие с базой данных и возможности бизнес-аналитики через IoTDB. Этот сервер позволяет выполнять SQL-запросы.

Related MCP server: XiYan MCP Server

Компоненты

Ресурсы

Сервер не предоставляет никаких ресурсов.

Подсказки

Сервер не выдает никаких подсказок.

Инструменты

Сервер предлагает различные инструменты для IoTDB Tree Model и Table Model. Вы можете выбирать между ними, установив конфигурацию "IOTDB_SQL_DIALECT" на "tree" или "table".

Модель дерева

  • metadata_query

    • Выполнение запросов SHOW/COUNT для чтения метаданных из базы данных

    • Вход:

      • query_sql (строка): SQL-запрос SHOW/COUNT для выполнения

    • Возвращает: результаты запроса в виде массива объектов.

  • select_query

    • Выполнение запросов SELECT для чтения данных из базы данных

    • Вход:

      • query_sql (строка): SQL-запрос SELECT для выполнения

    • Возвращает: результаты запроса в виде массива объектов.

Модель стола

Инструменты запроса
  • read_query

    • Выполнение запросов SELECT для чтения данных из базы данных

    • Вход:

      • query (строка): SQL-запрос SELECT для выполнения

    • Возвращает: результаты запроса в виде массива объектов.

Инструменты схемы
  • list_tables

    • Получить список всех таблиц в базе данных

    • Ввод не требуется

    • Возвращает: Массив имен таблиц.

  • describe-table

    • Просмотр информации о схеме для определенной таблицы

    • Вход:

      • table_name (string): Имя таблицы для описания

    • Возвращает: Массив определений столбцов с именами и типами.

Интеграция рабочего стола Клода

Предпосылки

  • Python с менеджером пакетов uv

  • Установка IoTDB

  • Зависимости сервера MCP

Разработка

# 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

Настройте сервер MCP в файле конфигурации Claude Desktop:

MacOS

Расположение: ~/Library/Application Support/Claude/claude_desktop_config.json

Окна

Расположение: %APPDATA%/Claude/claude_desktop_config.json

Вам может потребоваться ввести полный путь к исполняемому файлу uv в поле команды. Вы можете получить это, запустив which uv на MacOS/Linux или where uv на 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"
      }
    }
  }
}

Available Tools

4 tools
describe_tableC

Get the schema information for a specific table Args: table_name: name of the table to describe

Inputs: table_name (required).

export_table_queryA

Execute a query and export the results to a CSV or Excel file.

Args: query_sql: The SQL query to execute (using TABLE dialect, time using ISO 8601 format, e.g. 2017-11-01T00:08:00.000) format: Export format, either "csv" or "excel" (default: "csv") filename: Optional filename for the exported file. If not provided, a unique filename will be generated.

SQL Syntax: SELECT ⟨select_list⟩ FROM ⟨tables⟩ [WHERE ⟨condition⟩] [GROUP BY ⟨groups⟩] [HAVING ⟨group_filter⟩] [FILL ⟨fill_methods⟩] [ORDER BY ⟨order_expression⟩] [OFFSET ⟨n⟩] [LIMIT ⟨n⟩];

Returns: Information about the exported file and a preview of the data (max 10 rows)

Inputs: query_sql (required), format, filename.

list_tablesB

List all tables in the IoTDB database.

Inputs: no named parameters.

read_queryB

Execute a SELECT query on the IoTDB. Please use table sql_dialect when generating SQL queries.

Args: query_sql: The SQL query to execute (using TABLE dialect, time using ISO 8601 format, e.g. 2017-11-01T00:08:00.000)

Inputs: query_sql (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 4 tools

    Disambiguation3/5

    The tools have distinct primary functions (describe, export, list, read), but there's significant overlap between export_table_query and read_query as both execute SQL queries. The descriptions clarify that export_table_query focuses on file export while read_query returns query results directly, but an agent might still confuse when to use each for data retrieval.

    Naming Consistency4/5

    Three tools follow a consistent verb_noun pattern (describe_table, list_tables, export_table_query), while read_query deviates slightly by using 'read' instead of a more specific verb like 'execute' or 'run'. The naming is mostly predictable and readable, with only minor inconsistency in the verb choice for one tool.

    Tool Count4/5

    Four tools is a reasonable count for a database server, allowing core operations without being overwhelming. However, it feels slightly thin for full IoTDB coverage, as it lacks tools for table creation, deletion, or data insertion, which might be expected in a complete database interface.

    Completeness2/5

    The toolset is severely incomplete for a database server. It covers read operations (list, describe, query) and export, but lacks any write capabilities (create, insert, update, delete) or administrative functions. This creates significant gaps that will cause agent failures when trying to perform basic database management tasks.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables SQL query execution, database management, and business intelligence capabilities through MySQL connections.
      1,462 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables natural language queries to MySQL databases, powered by XiYanSQL text-to-SQL technology.
      239
      Apache 2.0
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables executing SQL queries and managing connections with Microsoft SQL Server databases.
      1
      6
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that allows executing SELECT queries on TiDB databases, with optional support for INSERT, UPDATE, and DELETE operations when explicitly enabled.
      1
      8 npm
      -