MCP Server for Apache IoTDB database and its tools
This document details the implementation of an MCP server that bridges the gap between Large Language Models (LLMs) and the Apache IoTDB database, enabling sophisticated data interaction and business intelligence capabilities. By leveraging the Model Context Protocol, this server provides a standardized interface for LLMs to access and utilize the wealth of data stored within IoTDB.
This MCP server implementation focuses on providing essential database interaction capabilities. It exposes a suite of tools designed to empower LLMs with the ability to query, understand, and leverage IoTDB data.
The server offers the following tools:
read_query
(Query Tool):
SELECT
SQL queries against the IoTDB database. This allows LLMs to retrieve specific data based on complex criteria.query
(string): A valid SELECT
SQL query string.list_tables
(Schema Tool):
describe_table
(Schema Tool):
table_name
(string): The name of the table for which schema information is requested.name
(string): The name of the column.type
(string): The data type of the column.This section outlines the steps required to integrate the IoTDB MCP server with the Claude Desktop application, enabling seamless interaction between Claude and your IoTDB data.
Before proceeding with the integration, ensure that the following prerequisites are met:
uv
package manager installed. uv
is recommended for managing dependencies and creating isolated environments.Follow these steps to set up the development environment for the IoTDB MCP server:
# Clone the repository git clone https://github.com/apache/iotdb-mcp-server.git cd iotdb_mcp_server # Create a virtual environment using uv uv venv # Activate the virtual environment source venv/bin/activate # On Linux/macOS # venv\Scripts\activate # On Windows # Install development dependencies uv sync
To configure Claude Desktop to use the IoTDB MCP server, you need to modify the claude_desktop_config.json
file. The location of this file varies depending on your operating system:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
Add a new entry to the mcpServers
section of the configuration file, specifying the command and arguments required to start the IoTDB MCP server.
{ "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" } } } }
Important Notes:
YOUR_REPO_PATH
with the actual path to the cloned repository.command
field should point to the uv
executable. You may need to provide the full path to the executable. You can find the full path by running which uv
on macOS/Linux or where uv
on Windows.env
section allows you to configure the connection parameters for your IoTDB instance. Adjust the IOTDB_HOST
, IOTDB_PORT
, IOTDB_USER
, IOTDB_PASSWORD
, and IOTDB_DATABASE
values to match your IoTDB setup.By following these steps, you can seamlessly integrate the IoTDB MCP server with Claude Desktop, unlocking the potential of LLMs to interact with and derive insights from your IoTDB data.
๐ โ๏ธ Biomedical research server providing access to PubMed, ClinicalTrials.gov, and MyVariant.info.
๐ MCP server that provides SQL analysis, linting, and dialect conversion using [SQLGlot](https://github.com/tobymao/sqlglot)
๐ ๐ All-in-one MCP server for Postgres development and operations, with tools for performance analysis, tuning, and health checks
Supabase MCP Server with support for SQL query execution and database exploration tools