Apache IoTDB

Apache IoTDB

MCP Server for Apache IoTDB database and its tools

28
Stars
18
Forks
0
Releases

Overview

IoTDB MCP Server is an MCP server implementation that provides database interaction and business intelligence capabilities for Apache IoTDB. It enables running SQL queries and interacting with IoTDB using two SQL dialects: Tree Model and Table Model. The server offers tools for Tree Model (metadata_query, select_query, export_query) to read metadata, query data, and export results; and for Table Model (read_query, list_tables, describe_table, export_table_query) to query data, inspect schemas, and export results. Configuration is available via environment variables or CLI, including host, port, user, password, database, sql-dialect, and export path. You can select between tree or table dialect by setting IOTDB_SQL_DIALECT. Performance optimizations include session pool management with up to 100 concurrent sessions, optimized fetch size, automatic connection retry, and timeout management, plus export functionality to CSV or Excel. Docker support and development guidance, plus Claude Desktop integration, are provided.

Details

Owner
apache
Language
Python
License
Apache License 2.0
Updated
2025-12-07

Features

Dialect-based query model support

Supports running queries using either Tree Model or Table Model dialects by configuring IOTDB_SQL_DIALECT ('tree' or 'table'), enabling the appropriate tools and workflows.

Tree Model metadata and data queries

Tree Model tools include metadata_query and select_query to read metadata and data, returning results as arrays of objects.

Table Model data access and schema tools

Table Model tools include read_query, list_tables, and describe_table to query data, discover tables, and inspect schemas.

Export functionality for query results

Export results to CSV or Excel via export_query (Tree) and export_table_query (Table), with optional filename and a preview of data.

Performance optimization: Session pool management

Optimized session pool supporting up to 100 concurrent sessions to improve concurrency and throughput.

Performance optimization: Optimized fetch size

Configured fetch size of 1024 for queries to balance latency and data transfer.

Performance optimization: Connection retry

Automatic retry mechanism for handling transient connection failures.

Performance optimization: Timeout management

Session wait timeout set to 5000 milliseconds to improve reliability and responsiveness.

Audience

Data Engineers / IoTDB AdministratorsSet up and operate the MCP server to run TREE/TABLE queries against IoTDB, manage connections, and monitor performance.
BI Developers / AnalystsExecute queries and export results to CSV/Excel for reporting and dashboarding workflows.
Application Developers / IntegratorsIntegrate the MCP server with client applications and workflows, leveraging the two SQL dialects and export capabilities.
Claude Desktop usersConfigure and use the MCP server within Claude Desktop integrations for streamlined IoTDB interactions.

Tags

IoTDBMCP ServerTree ModelTable ModelSQL dialectmetadata_queryselect_queryexport_queryread_querylist_tablesdescribe_tableexport_table_queryexportDockerClaude DesktopBIdatabase interaction