IoTDB MCP Server
OfficialIoTDB MCP 服务器
概述
模型上下文协议 (MCP) 服务器实现,通过 IoTDB 提供数据库交互和商业智能功能。此服务器支持运行 SQL 查询。
Related MCP server: XiYan MCP Server
成分
资源
服务器不公开任何资源。
提示
服务器没有提供任何提示。
工具
IoTDB 服务器提供了针对树形模型和表模型的不同工具。您可以通过将“IOTDB_SQL_DIALECT”配置设置为“tree”或“table”来选择。
树模型
metadata_query执行 SHOW/COUNT 查询以从数据库读取元数据
输入:
query_sql(字符串):要执行的 SHOW/COUNT SQL 查询
返回:查询结果作为对象数组
select_query执行 SELECT 查询以从数据库读取数据
输入:
query_sql(字符串): 要执行的 SELECT SQL 查询
返回:查询结果作为对象数组
表格模型
查询工具
read_query执行 SELECT 查询以从数据库读取数据
输入:
query(字符串):要执行的 SELECT SQL 查询
返回:查询结果作为对象数组
架构工具
list_tables获取数据库中所有表的列表
无需输入
返回:表名称数组
describe-table查看特定表的架构信息
输入:
table_name(字符串):要描述的表的名称
返回:具有名称和类型的列定义数组
Claude 桌面集成
先决条件
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在Claude Desktop的配置文件中配置MCP服务器:
MacOS
位置: ~/Library/Application Support/Claude/claude_desktop_config.json
视窗
位置: %APPDATA%/Claude/claude_desktop_config.json
您可能需要在命令字段中输入 uv 可执行文件的完整路径。您可以在 MacOS/Linux 上运行which uv或在 Windows 上运行where uv来获取此路径。
{
"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 toolsdescribe_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
Scored across 4 tools
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.
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.
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.
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
Related MCP Connectors
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
The Grafbase MCP server sits in front of a GraphQL API and exposes an MCP protocol-compliant interface that allows AI agents and LLMs to explore and query GraphQL APIs using natural language. It provides tools to search schemas, introspect types and fields, and execute GraphQL queries while minimizing context bloat by returning only relevant schema subsets, with built-in support for authentication, authorization, and configurable access control.
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables SQL query execution, database management, and business intelligence capabilities through MySQL connections.1,462 npmMIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables natural language queries to MySQL databases, powered by XiYanSQL text-to-SQL technology.239Apache 2.0
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables executing SQL queries and managing connections with Microsoft SQL Server databases.16MIT
- FlicenseBqualityDmaintenanceA Model Context Protocol server that allows executing SELECT queries on TiDB databases, with optional support for INSERT, UPDATE, and DELETE operations when explicitly enabled.18 npm-