Integrations
Supports configuration through environment variables using .env files for setting database connection parameters and logging preferences.
Provides issue tracking functionality through GitHub's repository system, allowing users to report problems or request support for the TDengine MCP server.
Allows installation of the TDengine MCP server package directly from the Python Package Index using pip.
TDengine Query MCP Server
A Model Context Protocol (MCP) server that provides read-only TDengine database queries for AI assistants. Execute queries, explore database structures, and investigate your data directly from your AI-powered tools.
Supported AI Tools
This MCP server works with any tool that supports the Model Context Protocol, including:
- Cursor IDE: Set up in
.cursor/mcp.json
- Anthropic Claude: Use with a compatible MCP client
- Other MCP-compatible AI assistants: Follow the tool's MCP configuration instructions
Features & Limitations
What It Does
- ✅ Execute read-only TDengine queries (SELECT, SHOW, DESCRIBE only)
- ✅ Provide database/stable information and metadata
- ✅ List available database and stables
What It Doesn't Do
- ❌ Execute write operations (INSERT, UPDATE, DELETE, CREATE, ALTER, etc.)
- ❌ Provide database design or schema generation capabilities
- ❌ Function as a full database management tool
This tool is designed specifically for data investigation and exploration through read-only queries. It is not intended for database administration, schema management, or data modification.
How to use
Run from source code
The recommended way to use this MCP server is to run it directly with uv
without installation. This is how both Claude Desktop and Cursor are configured to use it in the examples below.
If you want to clone the repository:
Then you can run the server directly:
Alternatively you can change the .env
file in the src/tdengine_mcp_server/
directory to set the environment variables and run the server with the following command:
Important: the .env file will have higher priority than the command line arguments.
Install From Pypi by pip
command
and then run:
Install by uvx
command
Install From smithery by npx
command
You can change the client after the --client
option with alternatives claude
, 'windsurf' and so on. Also you can refer to this: smithery/tdengine-mcp-server
Configuration Options
.env file
Environment Variable | Description | Default |
---|---|---|
LOG_LEVEL | Set the log level (DEBUG, INFO, WARN, ERROR) | INFO |
TDENGINE_HOST | Database host for environment | localhost |
TDENGINE_PORT | Database port | 6041 |
TDENGINE_USERNAME | Database username | root |
TDENGINE_PASSWORD | Database password | taosdata |
TDENGINE_DATABASE | Database name | log |
TDENGINE_TIMEOUT | Set the connection timeout in seconds | 30 |
TRANSPORT | Control the transport to use | stdio |
cli usage
Integration with AI Assistants
Your AI assistant can interact with TDengine databases through the MCP server. Here are some examples:
Example queries:
Using TDengine MCP Tools
The TDengine Query MCP server provides three main tools that your AI assistant can use:
1. query
Execute read-only SQL queries against a specific stable:
2. info
Get detailed information about your stable:
Security Considerations
- ✅ Only read-only queries are allowed (SELECT, SHOW, DESCRIBE)
Troubleshooting
Connection Issues
If you're having trouble connecting:
- Verify your database credentials in your MCP configuration
- Ensure the TDengine server is running and accessible
- Check for firewall rules blocking connections
- Enable debug mode by setting
LOG_LEVEL
in your configuration
Common Errors
Error: Query execution failed
- Verify your SQL syntax
- Check that you're only using supported query types (SELECT, SHOW, DESCRIBE)
- Ensure your query is truly read-only
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
For more information or support, please open an issue on the GitHub repository.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Context Protocol (MCP) server that provides read-only TDengine database queries for AI assistants, allowing users to execute queries, explore database structures, and investigate data directly from AI-powered tools.