iotdb-mcp-server

v0.3.0
iotdb-mcp-server Checked 7 hours ago Published 7 days ago

A 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.

ParameterTypeDescription
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.

ParameterTypeDescription
target_template *object
user_confirmed_retryboolean

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.

ParameterTypeDescription
candidate_id *string
password *string
username *string
persist
set_defaultboolean
targets_file

register_iotdb_target Register Iotdb Target

Compatibility entry point that verifies credentials before registration.

ParameterTypeDescription
target *object
persist
set_defaultboolean
targets_file
user_confirmed_retryboolean

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.

ParameterTypeDescription
persistboolean
target
target_id
targets_file

remove_iotdb_target Remove Iotdb Target

Remove an IoTDB target from this running MCP process.

ParameterTypeDescription
target_id *string
persistboolean
targets_file

set_default_iotdb_target Set Default Iotdb Target

Set the default IoTDB target for this running MCP process.

ParameterTypeDescription
target_id *string
persistboolean
targets_file

reload_iotdb_targets Reload Iotdb Targets

Reload IoTDB targets from env, a targets file, or an explicit JSON string.

ParameterTypeDescription
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.

ParameterTypeDescription
policy
preset
replaceboolean

reset_iotdb_session_policy Reset Iotdb Session Policy

Reset overrides; any resulting widening requires the same approval as set.

ParameterTypeDescription
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.

ParameterTypeDescription
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.

ParameterTypeDescription
pages *array
continue_on_errorboolean
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.

ParameterTypeDescription
all_sessionsboolean
limitinteger
owner_session_id
target
target_id

cleanup_result_store Cleanup Result Store

Run TTL and quota cleanup for ResultStore entries.

ParameterTypeDescription
all_sessionsboolean
owner_session_id
target
target_id
ttl_seconds

delete_result Delete Result

Delete one cached ResultStore result.

ParameterTypeDescription
result_id *string
all_sessionsboolean
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.

ParameterTypeDescription
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.

ParameterTypeDescription
query_sql *string
filenamestring
formatstring
target
target_id

read_query Read Query

Execute one table-dialect read query and return rows.

ParameterTypeDescription
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.

ParameterTypeDescription
query_sql *string
filenamestring
formatstring
target
target_id

sql_driver_policy Sql Driver Policy

Show current sql_driver policy and statement whitelists.

ParameterTypeDescription
target
target_id

inspect_sql_permission Inspect Sql Permission

Inspect SQL permission, risk, and approval requirements without executing it.

ParameterTypeDescription
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.

ParameterTypeDescription
batch_timeout_ms
continue_on_errorboolean
max_batch_result_bytes
max_batch_result_rows
max_concurrencyinteger
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.

ParameterTypeDescription
sql *string
confirm_destructiveboolean
max_inline_rows
owner_session_id
page_size_rows
target
target_id

metadata_query Metadata Query

Execute metadata SQL against the selected IoTDB target.

ParameterTypeDescription
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.

ParameterTypeDescription
owner_session_id
pathstring
target
target_id

list_devices List Devices

List devices under a tree path pattern.

ParameterTypeDescription
owner_session_id
pathstring
target
target_id

list_child_paths List Child Paths

List child paths under a tree path.

ParameterTypeDescription
path *string
owner_session_id
target
target_id

list_child_nodes List Child Nodes

List child nodes under a tree path.

ParameterTypeDescription
path *string
owner_session_id
target
target_id

count_timeseries Count Timeseries

Count timeseries under a tree path pattern.

ParameterTypeDescription
owner_session_id
pathstring
target
target_id

count_devices Count Devices

Count devices under a tree path pattern.

ParameterTypeDescription
owner_session_id
pathstring
target
target_id

count_nodes Count Nodes

Count nodes under a tree path.

ParameterTypeDescription
owner_session_id
pathstring
target
target_id

list_tables List Tables

List all tables in current table-model database.

ParameterTypeDescription
owner_session_id
target
target_id

describe_table Describe Table

Describe schema for a table in current table-model database.

ParameterTypeDescription
table_name *string
detailsboolean
owner_session_id
target
target_id

explain_query Explain Query

Execute EXPLAIN for one statement against the selected IoTDB target.

ParameterTypeDescription
query_sql *string
analyzeboolean
target
target_id

list_databases List Databases

List databases in the selected IoTDB target.

ParameterTypeDescription
detailsboolean
target
target_id

create_database Create Database

Create a database/storage group in the selected IoTDB target.

ParameterTypeDescription
database *string
if_not_existsboolean
target
target_id

drop_database Drop Database

Drop a database/storage group in the selected IoTDB target.

ParameterTypeDescription
database *string
confirmboolean
if_existsboolean
target
target_id

use_database Use Database

Switch current database in a table-model IoTDB target.

ParameterTypeDescription
database *string
target
target_id

create_timeseries_ddl Create Timeseries Ddl

Execute tree-model CREATE TIMESERIES DDL. Supported prefixes: - CREATE TIMESERIES - CREATE ALIGNED TIMESERIES

ParameterTypeDescription
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

ParameterTypeDescription
ddl_list *array
continue_on_errorboolean
max_statementsinteger
skip_if_existsboolean
target
target_id

alter_timeseries_ddl Alter Timeseries Ddl

Execute tree-model ALTER TIMESERIES DDL.

ParameterTypeDescription
ddl_sql *string
target
target_id

drop_timeseries_ddl Drop Timeseries Ddl

Execute tree-model DROP/DELETE TIMESERIES DDL (destructive).

ParameterTypeDescription
ddl_sql *string
confirmboolean
target
target_id

ttl_command Ttl Command

Execute TTL command SQL. Supported prefixes: - SET TTL - UNSET TTL

ParameterTypeDescription
ttl_sql *string
confirm_unsetboolean
target
target_id

ttl_query Ttl Query

Execute TTL query SQL. Supported prefixes: - SHOW TTL ON - SHOW ALL TTL

ParameterTypeDescription
ttl_sql *string
target
target_id

create_table_ddl Create Table Ddl

Execute table-model CREATE TABLE DDL.

ParameterTypeDescription
ddl_sql *string
target
target_id

alter_table_ddl Alter Table Ddl

Execute table-model ALTER TABLE DDL.

ParameterTypeDescription
ddl_sql *string
target
target_id

drop_table_ddl Drop Table Ddl

Execute table-model DROP TABLE DDL (destructive).

ParameterTypeDescription
ddl_sql *string
confirmboolean
target
target_id

list_udf_functions List Udf Functions

List IoTDB functions/UDFs visible to the selected target via SHOW FUNCTIONS.

ParameterTypeDescription
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.

ParameterTypeDescription
expressions *
function_name *string
alias
align_by_deviceboolean
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.

ParameterTypeDescription
expressions *
function_name *string
alias
align_by_deviceboolean
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.

ParameterTypeDescription
expressions *
function_name *string
alias
align_by_deviceboolean
attributes
filename
formatstring
from_path
limit
table_name
target
target_id
where_clause

write_query Write Query

Execute exactly one write statement on the selected IoTDB target.

ParameterTypeDescription
write_sql *string
confirm_deleteboolean
target
target_id

model_query Model Query

Execute AINode model-query SQL against the selected IoTDB target.

ParameterTypeDescription
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.

ParameterTypeDescription
input_sql *string
model_id *string
generate_timeboolean
output_lengthinteger
target
target_id

model_inference Model Inference

Execute Tree-dialect AINode inference SQL.

ParameterTypeDescription
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.

ParameterTypeDescription
model_sql *string
confirm_destructiveboolean
target
target_id