iotdb-mcp-server
v0.3.0A Model Context Protocol (MCP) server that enables secure interaction with IoTDB databases.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_iotdb_targets List Iotdb Targets
List registered IoTDB targets with redacted credentials.
describe_iotdb_target Describe Iotdb Target
Describe one IoTDB target selected by id or selector fields.
| Parameter | Type | Description |
|---|---|---|
target | ||
target_id |
prepare_iotdb_target Prepare Iotdb Target
Create a credential-free, non-routable target candidate. A previous failed endpoint requires an explicit user-requested retry. Templates are memory-only and never appear in list_iotdb_targets.
| Parameter | Type | Description |
|---|---|---|
target_template * | object | |
user_confirmed_retry | boolean |
connect_iotdb_target Connect Iotdb Target
Authenticate once and publish only after success. When a targets file is configured, the verified credential is persisted by default so MCP and iotdb-target-cli read the same target state.
| Parameter | Type | Description |
|---|---|---|
candidate_id * | string | |
password * | string | |
username * | string | |
persist | ||
set_default | boolean | |
targets_file |
register_iotdb_target Register Iotdb Target
Compatibility entry point that verifies credentials before registration.
| Parameter | Type | Description |
|---|---|---|
target * | object | |
persist | ||
set_default | boolean | |
targets_file | ||
user_confirmed_retry | boolean |
remember_iotdb_target_credential Remember Iotdb Target Credential
Record the selected target's current credential as last-known-good. Call this only after a connection/query has succeeded with the selected target. This tool does not test login and does not try fallback passwords.
| Parameter | Type | Description |
|---|---|---|
persist | boolean | |
target | ||
target_id | ||
targets_file |
remove_iotdb_target Remove Iotdb Target
Remove an IoTDB target from this running MCP process.
| Parameter | Type | Description |
|---|---|---|
target_id * | string | |
persist | boolean | |
targets_file |
set_default_iotdb_target Set Default Iotdb Target
Set the default IoTDB target for this running MCP process.
| Parameter | Type | Description |
|---|---|---|
target_id * | string | |
persist | boolean | |
targets_file |
reload_iotdb_targets Reload Iotdb Targets
Reload IoTDB targets from env, a targets file, or an explicit JSON string.
| Parameter | Type | Description |
|---|---|---|
targets_file | ||
targets_json |
get_iotdb_session_policy Get Iotdb Session Policy
Inspect effective IoTDB MCP permissions for this running session.
set_iotdb_session_policy Set Iotdb Session Policy
Request session permissions bounded by the immutable deployment policy. Narrowing applies immediately. Widening may return approval_required with no changes applied; an administrator must approve out of band before retry. There is no agent-supplied approval flag. Presets (full, ddl, readonly) are intersected with the deployment ceiling. Explicit values cannot exceed it. Enforcement switches and SQL classification prefixes are administrator-only.
| Parameter | Type | Description |
|---|---|---|
policy | ||
preset | ||
replace | boolean |
reset_iotdb_session_policy Reset Iotdb Session Policy
Reset overrides; any resulting widening requires the same approval as set.
| Parameter | Type | Description |
|---|---|---|
keys |
read_result_page Read Result Page
Read one page from a previously returned ResultStore result_id. Pass the same target_id used by the original query when multiple IoTDB targets are registered. cursor is the next_cursor returned by a prior page; offset can be used for random access and takes precedence.
| Parameter | Type | Description |
|---|---|---|
result_id * | string | |
cursor | ||
limit | ||
offset | ||
owner_session_id | ||
target | ||
target_id |
read_result_pages Read Result Pages
Read multiple ResultStore pages in one MCP call. Each page request is an object with result_id plus optional cursor, offset, limit, and owner_session_id. offset takes precedence over cursor. owner_session_id on an item takes precedence over the shared owner_session_id argument.
| Parameter | Type | Description |
|---|---|---|
pages * | array | |
continue_on_error | boolean | |
default_limit | ||
max_pages | ||
max_total_rows | ||
owner_session_id | ||
target | ||
target_id |
list_result_store List Result Store
List ResultStore entries for the current session by default.
| Parameter | Type | Description |
|---|---|---|
all_sessions | boolean | |
limit | integer | |
owner_session_id | ||
target | ||
target_id |
cleanup_result_store Cleanup Result Store
Run TTL and quota cleanup for ResultStore entries.
| Parameter | Type | Description |
|---|---|---|
all_sessions | boolean | |
owner_session_id | ||
target | ||
target_id | ||
ttl_seconds |
delete_result Delete Result
Delete one cached ResultStore result.
| Parameter | Type | Description |
|---|---|---|
result_id * | string | |
all_sessions | boolean | |
owner_session_id | ||
target | ||
target_id |
select_query Select Query
Execute one tree-dialect read query and return rows. Use target_id or target selector fields to choose a registered IoTDB target.
| Parameter | Type | Description |
|---|---|---|
query_sql * | string | |
max_inline_rows | ||
owner_session_id | ||
page_size_rows | ||
target | ||
target_id |
export_query Export Query
Execute one tree-dialect read query and export its result set.
| Parameter | Type | Description |
|---|---|---|
query_sql * | string | |
filename | string | |
format | string | |
target | ||
target_id |
read_query Read Query
Execute one table-dialect read query and return rows.
| Parameter | Type | Description |
|---|---|---|
query_sql * | string | |
max_inline_rows | ||
owner_session_id | ||
page_size_rows | ||
target | ||
target_id |
export_table_query Export Table Query
Execute one table-dialect read query and export its result set.
| Parameter | Type | Description |
|---|---|---|
query_sql * | string | |
filename | string | |
format | string | |
target | ||
target_id |
sql_driver_policy Sql Driver Policy
Show current sql_driver policy and statement whitelists.
| Parameter | Type | Description |
|---|---|---|
target | ||
target_id |
inspect_sql_permission Inspect Sql Permission
Inspect SQL permission, risk, and approval requirements without executing it.
| Parameter | Type | Description |
|---|---|---|
sql * | string | |
target | ||
target_id |
sql_executor_batch Sql Executor Batch
Execute many readonly SQL statements in parallel and store each result. Use either `sqls=[...]` for explicit single statements or `sql_template` with `param_sets` to generate repeated SELECT/SHOW statements without asking the model to spell out each SQL. Template placeholders are `{{name}}` for SQL literals, `{{name:path}}` for IoTDB paths, and `{{name:identifier}}` for SQL identifiers.
| Parameter | Type | Description |
|---|---|---|
batch_timeout_ms | ||
continue_on_error | boolean | |
max_batch_result_bytes | ||
max_batch_result_rows | ||
max_concurrency | integer | |
max_inline_rows | ||
max_result_bytes_per_item | ||
max_result_rows_per_item | ||
owner_session_id | ||
page_size_rows | ||
param_sets | ||
per_item_timeout_ms | ||
sql_template | ||
sqls | ||
target | ||
target_id | ||
worker_pool_size |
sql_execute Sql Execute
Execute exactly one SQL statement on the selected IoTDB target. The selected target's dialect determines the whitelist and session pool.
| Parameter | Type | Description |
|---|---|---|
sql * | string | |
confirm_destructive | boolean | |
max_inline_rows | ||
owner_session_id | ||
page_size_rows | ||
target | ||
target_id |
metadata_query Metadata Query
Execute metadata SQL against the selected IoTDB target.
| Parameter | Type | Description |
|---|---|---|
query_sql * | string | |
max_inline_rows | ||
owner_session_id | ||
page_size_rows | ||
target | ||
target_id |
list_timeseries List Timeseries
List timeseries under a tree path pattern.
| Parameter | Type | Description |
|---|---|---|
owner_session_id | ||
path | string | |
target | ||
target_id |
list_devices List Devices
List devices under a tree path pattern.
| Parameter | Type | Description |
|---|---|---|
owner_session_id | ||
path | string | |
target | ||
target_id |
list_child_paths List Child Paths
List child paths under a tree path.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
owner_session_id | ||
target | ||
target_id |
list_child_nodes List Child Nodes
List child nodes under a tree path.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
owner_session_id | ||
target | ||
target_id |
count_timeseries Count Timeseries
Count timeseries under a tree path pattern.
| Parameter | Type | Description |
|---|---|---|
owner_session_id | ||
path | string | |
target | ||
target_id |
count_devices Count Devices
Count devices under a tree path pattern.
| Parameter | Type | Description |
|---|---|---|
owner_session_id | ||
path | string | |
target | ||
target_id |
count_nodes Count Nodes
Count nodes under a tree path.
| Parameter | Type | Description |
|---|---|---|
owner_session_id | ||
path | string | |
target | ||
target_id |
list_tables List Tables
List all tables in current table-model database.
| Parameter | Type | Description |
|---|---|---|
owner_session_id | ||
target | ||
target_id |
describe_table Describe Table
Describe schema for a table in current table-model database.
| Parameter | Type | Description |
|---|---|---|
table_name * | string | |
details | boolean | |
owner_session_id | ||
target | ||
target_id |
explain_query Explain Query
Execute EXPLAIN for one statement against the selected IoTDB target.
| Parameter | Type | Description |
|---|---|---|
query_sql * | string | |
analyze | boolean | |
target | ||
target_id |
list_databases List Databases
List databases in the selected IoTDB target.
| Parameter | Type | Description |
|---|---|---|
details | boolean | |
target | ||
target_id |
create_database Create Database
Create a database/storage group in the selected IoTDB target.
| Parameter | Type | Description |
|---|---|---|
database * | string | |
if_not_exists | boolean | |
target | ||
target_id |
drop_database Drop Database
Drop a database/storage group in the selected IoTDB target.
| Parameter | Type | Description |
|---|---|---|
database * | string | |
confirm | boolean | |
if_exists | boolean | |
target | ||
target_id |
use_database Use Database
Switch current database in a table-model IoTDB target.
| Parameter | Type | Description |
|---|---|---|
database * | string | |
target | ||
target_id |
create_timeseries_ddl Create Timeseries Ddl
Execute tree-model CREATE TIMESERIES DDL. Supported prefixes: - CREATE TIMESERIES - CREATE ALIGNED TIMESERIES
| Parameter | Type | Description |
|---|---|---|
ddl_sql * | string | |
target | ||
target_id |
create_timeseries_batch_ddl Create Timeseries Batch Ddl
Execute a batch of tree-model CREATE TIMESERIES DDL in one session pipeline. Supported prefixes in each statement: - CREATE TIMESERIES - CREATE ALIGNED TIMESERIES
| Parameter | Type | Description |
|---|---|---|
ddl_list * | array | |
continue_on_error | boolean | |
max_statements | integer | |
skip_if_exists | boolean | |
target | ||
target_id |
alter_timeseries_ddl Alter Timeseries Ddl
Execute tree-model ALTER TIMESERIES DDL.
| Parameter | Type | Description |
|---|---|---|
ddl_sql * | string | |
target | ||
target_id |
drop_timeseries_ddl Drop Timeseries Ddl
Execute tree-model DROP/DELETE TIMESERIES DDL (destructive).
| Parameter | Type | Description |
|---|---|---|
ddl_sql * | string | |
confirm | boolean | |
target | ||
target_id |
ttl_command Ttl Command
Execute TTL command SQL. Supported prefixes: - SET TTL - UNSET TTL
| Parameter | Type | Description |
|---|---|---|
ttl_sql * | string | |
confirm_unset | boolean | |
target | ||
target_id |
ttl_query Ttl Query
Execute TTL query SQL. Supported prefixes: - SHOW TTL ON - SHOW ALL TTL
| Parameter | Type | Description |
|---|---|---|
ttl_sql * | string | |
target | ||
target_id |
create_table_ddl Create Table Ddl
Execute table-model CREATE TABLE DDL.
| Parameter | Type | Description |
|---|---|---|
ddl_sql * | string | |
target | ||
target_id |
alter_table_ddl Alter Table Ddl
Execute table-model ALTER TABLE DDL.
| Parameter | Type | Description |
|---|---|---|
ddl_sql * | string | |
target | ||
target_id |
drop_table_ddl Drop Table Ddl
Execute table-model DROP TABLE DDL (destructive).
| Parameter | Type | Description |
|---|---|---|
ddl_sql * | string | |
confirm | boolean | |
target | ||
target_id |
list_udf_functions List Udf Functions
List IoTDB functions/UDFs visible to the selected target via SHOW FUNCTIONS.
| Parameter | Type | Description |
|---|---|---|
max_inline_rows | ||
owner_session_id | ||
page_size_rows | ||
target | ||
target_id |
prepare_udf_query Prepare Udf Query
Build a conservative read-only SQL plan for invoking an IoTDB UDF.
| Parameter | Type | Description |
|---|---|---|
expressions * | ||
function_name * | string | |
alias | ||
align_by_device | boolean | |
attributes | ||
from_path | ||
limit | ||
table_name | ||
target | ||
target_id | ||
where_clause |
execute_udf_query Execute Udf Query
Execute one read-only IoTDB UDF SELECT built from validated inputs.
| Parameter | Type | Description |
|---|---|---|
expressions * | ||
function_name * | string | |
alias | ||
align_by_device | boolean | |
attributes | ||
from_path | ||
limit | ||
max_inline_rows | ||
owner_session_id | ||
page_size_rows | ||
table_name | ||
target | ||
target_id | ||
where_clause |
export_udf_query Export Udf Query
Execute one read-only IoTDB UDF SELECT and export the result set.
| Parameter | Type | Description |
|---|---|---|
expressions * | ||
function_name * | string | |
alias | ||
align_by_device | boolean | |
attributes | ||
filename | ||
format | string | |
from_path | ||
limit | ||
table_name | ||
target | ||
target_id | ||
where_clause |
write_query Write Query
Execute exactly one write statement on the selected IoTDB target.
| Parameter | Type | Description |
|---|---|---|
write_sql * | string | |
confirm_delete | boolean | |
target | ||
target_id |
model_query Model Query
Execute AINode model-query SQL against the selected IoTDB target.
| Parameter | Type | Description |
|---|---|---|
model_sql * | string | |
max_inline_rows | ||
owner_session_id | ||
page_size_rows | ||
target | ||
target_id |
prepare_model_inference_request Prepare Model Inference Request
Build and validate Tree-dialect AINode CALL INFERENCE SQL.
| Parameter | Type | Description |
|---|---|---|
input_sql * | string | |
model_id * | string | |
generate_time | boolean | |
output_length | integer | |
target | ||
target_id |
model_inference Model Inference
Execute Tree-dialect AINode inference SQL.
| Parameter | Type | Description |
|---|---|---|
inference_sql * | string | |
max_inline_rows | ||
owner_session_id | ||
page_size_rows | ||
target | ||
target_id |
model_command Model Command
Execute AINode model-management command SQL.
| Parameter | Type | Description |
|---|---|---|
model_sql * | string | |
confirm_destructive | boolean | |
target | ||
target_id |