IoTDB MCP Server for Tree Model
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 three core tools:
Query Tools
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
Claude Desktop Integration
Prerequisites
- Python with
uvpackage 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"
}
}
}
}
Recommend MCP Servers 💡
@modelcontextprotocol/server-postgres
A Model Context Protocol server providing read-only access to PostgreSQL databases, enabling LLMs to inspect schemas and execute queries.
database-mcp
A server that helps people access and query data in databases using the Legion Query Runner with Model Context Protocol (MCP) in Python.
neondatabase-labs/mcp-server-neon
An open-source MCP server that enables natural language interaction with Neon Postgres databases via the Neon Management API.
@gomomento/mcp-momento
A simple Model Context Protocol (MCP) server implementation for Momento Cache, providing tools to interact with Momento Cache for operations like get, set, list, create, and delete caches.
panasenco/mcp-sqlite
MCP server that enables AI agents to interact with SQLite databases through structured tools and queries.
hologres-mcp-server
Hologres MCP Server serves as a universal interface between AI Agents and Hologres databases. It enables seamless communication between AI Agents and Hologres, helping AI Agents retrieve Hologres database metadata and execute SQL operations.