apache/iotdb-mcp-server
Apache IoTDB MCP Server
4550cffb51cfiotdb-mcp-server0.2.0 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 258 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
- Supply Chain: the dependency files state no exact versions the scanner could check, so it has no number
Top risks in plain words
- INFONo published risk: no tool declared to run commands, files, addresses or queries of the caller's choice, no known vulnerability in a production package, no advisory. Not every path through the code could be followed. Code findings appear here only after a person has verified them.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Give it a narrowly scoped token
Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 58 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
alter_table_ddl, alter_timeseries_ddl, cleanup_result_store, connect_iotdb_target, count_devices, count_nodes and 36 morealter_table_ddl, alter_timeseries_ddl, cleanup_result_store, connect_iotdb_target, count_devices, count_nodes and 51 moreNo tool was seen to: start other programs on the machine; connect to the internet or other hosts; read passwords, tokens or keys; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files42 tools · alter_table_ddl, alter_timeseries_ddl, cleanup_result_store +39
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (58: 58 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
alter_table_ddltool Execute table-model ALTER TABLE DDL.FilesEnv varsoutside text
Execute table-model ALTER TABLE DDL.
alter_timeseries_ddltool Execute tree-model ALTER TIMESERIES DDL.FilesEnv varsoutside text
Execute tree-model ALTER TIMESERIES DDL.
cleanup_result_storetool Run TTL and quota cleanup for ResultStore entries.FilesEnv varsoutside text
Run TTL and quota cleanup for ResultStore entries.
connect_iotdb_targettool Authenticate once and publish only after success.FilesEnv varsoutside text
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.count_devicestool Count devices under a tree path pattern.FilesEnv varsoutside text
Count devices under a tree path pattern.
count_nodestool Count nodes under a tree path.FilesEnv varsoutside text
Count nodes under a tree path.
count_timeseriestool Count timeseries under a tree path pattern.FilesEnv varsoutside text
Count timeseries under a tree path pattern.
create_databasetool Create a database/storage group in the selected IoTDB target.FilesEnv varsoutside text
Create a database/storage group in the selected IoTDB target.
create_table_ddltool Execute table-model CREATE TABLE DDL.FilesEnv varsoutside text
Execute table-model CREATE TABLE DDL.
create_timeseries_batch_ddltool Execute a batch of tree-model CREATE TIMESERIES DDL in one session pipeline.FilesEnv varsoutside text
Execute a batch of tree-model CREATE TIMESERIES DDL in one session pipeline.
Supported prefixes in each statement:
- CREATE TIMESERIES
- CREATE ALIGNED TIMESERIEScreate_timeseries_ddltool Execute tree-model CREATE TIMESERIES DDL.FilesEnv varsoutside text
Execute tree-model CREATE TIMESERIES DDL.
Supported prefixes:
- CREATE TIMESERIES
- CREATE ALIGNED TIMESERIESdelete_resulttool Delete one cached ResultStore result.Env vars
Delete one cached ResultStore result.
describe_iotdb_targettool Describe one IoTDB target selected by id or selector fields.Env vars
Describe one IoTDB target selected by id or selector fields.
describe_tabletool Describe schema for a table in current table-model database.FilesEnv varsoutside text
Describe schema for a table in current table-model database.
drop_databasetool Drop a database/storage group in the selected IoTDB target.FilesEnv varsoutside text
Drop a database/storage group in the selected IoTDB target.
drop_table_ddltool Execute table-model DROP TABLE DDL (destructive).FilesEnv varsoutside text
Execute table-model DROP TABLE DDL (destructive).
drop_timeseries_ddltool Execute tree-model DROP/DELETE TIMESERIES DDL (destructive).FilesEnv varsoutside text
Execute tree-model DROP/DELETE TIMESERIES DDL (destructive).
execute_udf_querytool Execute one read-only IoTDB UDF SELECT built from validated inputs.FilesEnv varsoutside text
Execute one read-only IoTDB UDF SELECT built from validated inputs.
explain_querytool Execute EXPLAIN for one statement against the selected IoTDB target.Env vars
Execute EXPLAIN for one statement against the selected IoTDB target.
export_querytool Execute one tree-dialect read query and export its result set.Env vars
Execute one tree-dialect read query and export its result set.
export_table_querytool Execute one table-dialect read query and export its result set.Env vars
Execute one table-dialect read query and export its result set.
export_udf_querytool Execute one read-only IoTDB UDF SELECT and export the result set.Env vars
Execute one read-only IoTDB UDF SELECT and export the result set.
get_iotdb_session_policytool Inspect effective IoTDB MCP permissions for this running session.FilesEnv varsoutside text
Inspect effective IoTDB MCP permissions for this running session.
inspect_sql_permissiontool Inspect SQL permission, risk, and approval requirements without executing it.FilesEnv varsoutside text
Inspect SQL permission, risk, and approval requirements without executing it.
list_child_nodestool List child nodes under a tree path.FilesEnv varsoutside text
List child nodes under a tree path.
list_child_pathstool List child paths under a tree path.FilesEnv varsoutside text
List child paths under a tree path.
list_databasestool List databases in the selected IoTDB target.Env vars
List databases in the selected IoTDB target.
list_devicestool List devices under a tree path pattern.FilesEnv varsoutside text
List devices under a tree path pattern.
list_iotdb_targetstool List registered IoTDB targets with redacted credentials.Env vars
List registered IoTDB targets with redacted credentials.
list_result_storetool List ResultStore entries for the current session by default.FilesEnv varsoutside text
List ResultStore entries for the current session by default.
list_tablestool List all tables in current table-model database.FilesEnv varsoutside text
List all tables in current table-model database.
list_timeseriestool List timeseries under a tree path pattern.FilesEnv varsoutside text
List timeseries under a tree path pattern.
list_udf_functionstool List IoTDB functions/UDFs visible to the selected target via SHOW FUNCTIONS.FilesEnv varsoutside text
List IoTDB functions/UDFs visible to the selected target via SHOW FUNCTIONS.
metadata_querytool Execute metadata SQL against the selected IoTDB target.FilesEnv varsoutside text
Execute metadata SQL against the selected IoTDB target.
model_commandtool Execute AINode model-management command SQL.FilesEnv varsoutside text
Execute AINode model-management command SQL.
model_inferencetool Execute Tree-dialect AINode inference SQL.FilesEnv varsoutside text
Execute Tree-dialect AINode inference SQL.
model_querytool Execute AINode model-query SQL against the selected IoTDB target.FilesEnv varsoutside text
Execute AINode model-query SQL against the selected IoTDB target.
prepare_iotdb_targettool Create a credential-free, non-routable target candidate.
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.prepare_model_inference_requesttool Build and validate Tree-dialect AINode CALL INFERENCE SQL.Env vars
Build and validate Tree-dialect AINode CALL INFERENCE SQL.
prepare_udf_querytool Build a conservative read-only SQL plan for invoking an IoTDB UDF.Env vars
Build a conservative read-only SQL plan for invoking an IoTDB UDF.
read_querytool Execute one table-dialect read query and return rows.FilesEnv varsoutside text
Execute one table-dialect read query and return rows.
read_result_pagetool Read one page from a previously returned ResultStore result_id.FilesEnv varsoutside text
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.read_result_pagestool Read multiple ResultStore pages in one MCP call.FilesEnv varsoutside text
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.register_iotdb_targettool Compatibility entry point that verifies credentials before registration.FilesEnv varsoutside text
Compatibility entry point that verifies credentials before registration.
reload_iotdb_targetstool Reload IoTDB targets from env, a targets file, or an explicit JSON string.Env vars
Reload IoTDB targets from env, a targets file, or an explicit JSON string.
remember_iotdb_target_credentialtool Record the selected target's current credential as last-known-good.Env vars
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.remove_iotdb_targettool Remove an IoTDB target from this running MCP process.Env vars
Remove an IoTDB target from this running MCP process.
reset_iotdb_session_policytool Reset overrides; any resulting widening requires the same approval as set.FilesEnv varsoutside text
Reset overrides; any resulting widening requires the same approval as set.
select_querytool Execute one tree-dialect read query and return rows.FilesEnv varsoutside text
Execute one tree-dialect read query and return rows.
Use target_id or target selector fields to choose a registered IoTDB target.set_default_iotdb_targettool Set the default IoTDB target for this running MCP process.Env vars
Set the default IoTDB target for this running MCP process.
set_iotdb_session_policytool Request session permissions bounded by the immutable deployment policy.FilesEnv varsoutside text
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.sql_driver_policytool Show current sql_driver policy and statement whitelists.FilesEnv varsoutside text
Show current sql_driver policy and statement whitelists.
sql_executetool Execute exactly one SQL statement on the selected IoTDB target.FilesEnv varsoutside text
Execute exactly one SQL statement on the selected IoTDB target.
The selected target's dialect determines the whitelist and session pool.sql_executor_batchtool Execute many readonly SQL statements in parallel and store each result.FilesEnv varsoutside text
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.ttl_commandtool Execute TTL command SQL.FilesEnv varsoutside text
Execute TTL command SQL.
Supported prefixes:
- SET TTL
- UNSET TTLttl_querytool Execute TTL query SQL.FilesEnv varsoutside text
Execute TTL query SQL.
Supported prefixes:
- SHOW TTL ON
- SHOW ALL TTLuse_databasetool Switch current database in a table-model IoTDB target.Env vars
Switch current database in a table-model IoTDB target.
write_querytool Execute exactly one write statement on the selected IoTDB target.FilesEnv varsoutside text
Execute exactly one write statement on the selected IoTDB target.
Text the model reads (58)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
list_databases tool
List databases in the selected IoTDB target.
create_database tool
Create a database/storage group in the selected IoTDB target.
drop_database tool
Drop a database/storage group in the selected IoTDB target.
use_database tool
Switch current database in a table-model IoTDB target.
explain_query tool
Execute EXPLAIN for one statement against the selected IoTDB target.
metadata_query tool
Execute metadata SQL against the selected IoTDB target.
list_timeseries tool
List timeseries under a tree path pattern.
list_devices tool
List devices under a tree path pattern.
list_child_paths tool
List child paths under a tree path.
list_child_nodes tool
List child nodes under a tree path.
count_timeseries tool
Count timeseries under a tree path pattern.
count_devices tool
Count devices under a tree path pattern.
count_nodes tool
Count nodes under a tree path.
list_tables tool
List all tables in current table-model database.
describe_table tool
Describe schema for a table in current table-model database.
model_query tool
Execute AINode model-query SQL against the selected IoTDB target.
prepare_model_inference_request tool
Build and validate Tree-dialect AINode CALL INFERENCE SQL.
model_inference tool
Execute Tree-dialect AINode inference SQL.
model_command tool
Execute AINode model-management command SQL.
select_query tool
Execute one tree-dialect read query and return rows.
Use target_id or target selector fields to choose a registered IoTDB target.export_query tool
Execute one tree-dialect read query and export its result set.
read_query tool
Execute one table-dialect read query and return rows.
export_table_query tool
Execute one table-dialect read query and export its result set.
read_result_page tool
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.read_result_pages tool
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.list_result_store tool
List ResultStore entries for the current session by default.
cleanup_result_store tool
Run TTL and quota cleanup for ResultStore entries.
delete_result tool
Delete one cached ResultStore result.
get_iotdb_session_policy tool
Inspect effective IoTDB MCP permissions for this running session.
set_iotdb_session_policy tool
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.reset_iotdb_session_policy tool
Reset overrides; any resulting widening requires the same approval as set.
sql_driver_policy tool
Show current sql_driver policy and statement whitelists.
inspect_sql_permission tool
Inspect SQL permission, risk, and approval requirements without executing it.
sql_executor_batch tool
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.sql_execute tool
Execute exactly one SQL statement on the selected IoTDB target.
The selected target's dialect determines the whitelist and session pool.create_table_ddl tool
Execute table-model CREATE TABLE DDL.
alter_table_ddl tool
Execute table-model ALTER TABLE DDL.
drop_table_ddl tool
Execute table-model DROP TABLE DDL (destructive).
list_iotdb_targets tool
List registered IoTDB targets with redacted credentials.
describe_iotdb_target tool
Describe one IoTDB target selected by id or selector fields.
prepare_iotdb_target tool
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.connect_iotdb_target tool
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.register_iotdb_target tool
Compatibility entry point that verifies credentials before registration.
remember_iotdb_target_credential tool
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.remove_iotdb_target tool
Remove an IoTDB target from this running MCP process.
set_default_iotdb_target tool
Set the default IoTDB target for this running MCP process.
reload_iotdb_targets tool
Reload IoTDB targets from env, a targets file, or an explicit JSON string.
create_timeseries_ddl tool
Execute tree-model CREATE TIMESERIES DDL.
Supported prefixes:
- CREATE TIMESERIES
- CREATE ALIGNED TIMESERIEScreate_timeseries_batch_ddl tool
Execute a batch of tree-model CREATE TIMESERIES DDL in one session pipeline.
Supported prefixes in each statement:
- CREATE TIMESERIES
- CREATE ALIGNED TIMESERIESalter_timeseries_ddl tool
Execute tree-model ALTER TIMESERIES DDL.
drop_timeseries_ddl tool
Execute tree-model DROP/DELETE TIMESERIES DDL (destructive).
ttl_command tool
Execute TTL command SQL.
Supported prefixes:
- SET TTL
- UNSET TTLttl_query tool
Execute TTL query SQL.
Supported prefixes:
- SHOW TTL ON
- SHOW ALL TTLlist_udf_functions tool
List IoTDB functions/UDFs visible to the selected target via SHOW FUNCTIONS.
prepare_udf_query tool
Build a conservative read-only SQL plan for invoking an IoTDB UDF.
execute_udf_query tool
Execute one read-only IoTDB UDF SELECT built from validated inputs.
export_udf_query tool
Execute one read-only IoTDB UDF SELECT and export the result set.
write_query tool
Execute exactly one write statement on the selected IoTDB target.
What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 58 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 58 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 58 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Requests any addressNo tool sends a request to an address the caller supplies — 58 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 58 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processesNot seen in the traced code of 58 capabilities; 58 more call code the scanner could not follow, where it may happen
- Tools that touch files42 of 58 capabilities touch files; 16 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 58 capabilities; 58 more call code the scanner could not follow, where it may happen
Where the code is: 58 handlers in 14 files at commit 4550cffb51cf
src/iotdb_mcp_server/services/database.pylist_databases, create_database, drop_database, use_databasesrc/iotdb_mcp_server/services/explain.pyexplain_querysrc/iotdb_mcp_server/services/metadata.pymetadata_query, list_timeseries, list_devices, list_child_paths, list_child_nodes, count_timeseries, count_devices, count_nodes, list_tables, describe_tablesrc/iotdb_mcp_server/services/model.pymodel_query, prepare_model_inference_request, model_inference, model_commandsrc/iotdb_mcp_server/services/query.pyselect_query, export_query, read_query, export_table_querysrc/iotdb_mcp_server/services/results.pyread_result_page, read_result_pages, list_result_store, cleanup_result_store, delete_resultsrc/iotdb_mcp_server/services/runtime_policy.pyget_iotdb_session_policy, set_iotdb_session_policy, reset_iotdb_session_policysrc/iotdb_mcp_server/services/sql_driver.pysql_driver_policy, inspect_sql_permission, sql_executor_batch, sql_executesrc/iotdb_mcp_server/services/table.pycreate_table_ddl, alter_table_ddl, drop_table_ddlsrc/iotdb_mcp_server/services/targets.pylist_iotdb_targets, describe_iotdb_target, prepare_iotdb_target, connect_iotdb_target, register_iotdb_target, remember_iotdb_target_credential, remove_iotdb_target, set_default_iotdb_target, reload_iotdb_targetssrc/iotdb_mcp_server/services/timeseries.pycreate_timeseries_ddl, create_timeseries_batch_ddl, alter_timeseries_ddl, drop_timeseries_ddlsrc/iotdb_mcp_server/services/ttl.pyttl_command, ttl_querysrc/iotdb_mcp_server/services/udf.pylist_udf_functions, prepare_udf_query, execute_udf_query, export_udf_querysrc/iotdb_mcp_server/services/write.pywrite_query
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: pyproject.toml
- Lockfiles checked against OSVNothing could be resolved to exact versions; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
- MCP SDK versionfastmcp >=2.8.1
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 58 capabilities; 58 more call code the scanner could not follow, where it may happen
- Environment variables57 capabilities read environment variables (often API keys)
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | fastmcp >=2.8.1 |
| Servers in the code | 2 (iotdb_mcp_server, policy-test) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-09-17 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 5 catalogs (awesome_habitoai, awesome_tensorblock, github_search, glama, mcp_toplist) |
|---|---|
| License | Apache-2.0 |
| Created | 2025-04-02 |
| Topics | big-data database iot mcp-server python timeseries tsdb |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.