Cover image
Try Now
2025-04-14

Serveur TDENGINE MCP.

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

TDengine Query MCP Server

License: MIT

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:

git clone https://github.com/Abeautifulsnow/tdengine-mcp.git
cd tdengine-mcp

Then you can run the server directly:

uv run src/tdengine_mcp_server -th 192.100.8.22 -db log -ll debug

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:

uv run src/tdengine_mcp_server

Important: the .env file will have higher priority than the command line arguments.

Install From Pypi by pip command

# Install globally with pip
pip install tdengine_mcp_server

and then run:

python -m tdengine_mcp_server -h

to get the how-to-use infomation.

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

cli usage

$ python3 -m tdengine_mcp_server -h

usage: __main__.py [-h] [-th TAOS_HOST] [-tp TAOS_PORT] [-tu TAOS_USERNAME] [-pwd TAOS_PASSWORD] [-db TAOS_DATABASE] [-to TAOS_TIMEOUT] [-ll LOG_LEVEL]

TDengine MCP Server

options:
  -h, --help            show this help message and exit
  -th, --taos-host TAOS_HOST
                        TDengine host address. Default: `localhost`
  -tp, --taos-port TAOS_PORT
                        TDengine port number. Default: `6041`
  -tu, --taos-username TAOS_USERNAME
                        TDengine username. Default: `root`
  -pwd, --taos-password TAOS_PASSWORD
                        TDengine password. Default: `taosdata`
  -db, --taos-database TAOS_DATABASE
                        TDengine database name. Default: `default`
  -to, --taos-timeout TAOS_TIMEOUT
                        TDengine connection timeout. Default: `30`
  -ll, --log-level LOG_LEVEL
                        Log level. Default: `INFO`

Integration with AI Assistants

Your AI assistant can interact with TDengine databases through the MCP server. Here are some examples:

Example queries:

Can you use the query tool to show me the first 10 records from the database?
I need to analyze our sales data. Can you run a SQL query to get the total sales per region for last month from the development database?
Can you list all the available databases we have?

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:

Use the query tool to run:

SELECT * FROM customers WHERE itemid > '2025-01-01' LIMIT 10;

2. info

Get detailed information about your stable:

Use the info tool to check the meta info about the specified stable.

DESCRIBE disks_info;

Security Considerations

  • ✅ Only read-only queries are allowed (SELECT, SHOW, DESCRIBE)

Troubleshooting

Connection Issues

If you're having trouble connecting:

  1. Verify your database credentials in your MCP configuration
  2. Ensure the TDengine server is running and accessible
  3. Check for firewall rules blocking connections
  4. 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.

相关推荐

  • av
  • Exécutez sans effort LLM Backends, API, Frontends et Services avec une seule commande.

  • 1Panel-dev
  • 🔥 1Panel fournit une interface Web intuitive et un serveur MCP pour gérer des sites Web, des fichiers, des conteneurs, des bases de données et des LLM sur un serveur Linux.

  • rulego
  • ⛓️RULEGO est un cadre de moteur de règle d'orchestration des composants de nouvelle génération légère, intégrée, intégrée et de nouvelle génération pour GO.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 LLM 资料总结 (数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Résumé des meilleures ressources LLM du monde.

  • Onelevenvy
  • Flock est une plate-forme à faible code de workflow pour construire rapidement des chatbots, un chiffon et coordonner des équipes multi-agents, alimentée par Langgraph, Langchain, Fastapi et NextJs. (Flock 是一个基于 Workflow 工作流的低代码平台 , 用于快速构建聊天机器人、 Rag 、 Agent 和 和 , 采用 采用 采用 采用 Langgraph 、 Langchain 、 Fastapi 和 ,))

  • Byaidu
  • PDF Traduction de papier scientifique avec formats conservés - 基于 AI 完整保留排版的 PDF 文档全文双语翻译 , 支持 Google / Deepl / Olllama / Openai 等服务 , 提供 CLI / GUI / MCP / DOCKER / ZOTERO

  • n8n-io
  • Plateforme d'automatisation de workflow à code équitable avec des capacités d'IA natives. Combinez le bâtiment visuel avec du code personnalisé, de l'auto-hôte ou du cloud, 400+ intégrations.

  • hkr04
  • SDK C ++ MCP (Protocole de contexte modèle léger)

  • sigoden
  • Créez facilement des outils et des agents LLM à l'aide de fonctions Plain Bash / JavaScript / Python.

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 QQ / 微信 (企业微信、个人微信) / 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 Chatgpt 、 Deepseek 、 Dify 、 Claude 、 GEMINI 、 XAI 、 PPIO 、 OLLAMA 、 LM Studio 、阿里云百炼、火山方舟、 Siliconflow 、 Qwen 、 Moonshot 、 ChatGlm 、 Sillytraven 、 MCP 等 LLM 的机器人 / Agent | Plateforme de bots de messagerie instantanée basés sur LLM, prend en charge Discord, Telegram, WeChat, Lark, Dingtalk, QQ, Slack

  • lasso-security
  • Une passerelle basée sur un plugin qui orchestre d'autres MCP et permet aux développeurs de s'appuyer sur des agents de qualité d'entreprise informatiques.

    Reviews

    3.7 (7)
    Avatar
    user_Rax8oar0
    2025-04-24

    I've been using tdengine-mcp for a while now and it has significantly improved my data management tasks. The user interface is intuitive and the performance is impressive. It's clear that Abeautifulsnow put a lot of effort into developing this tool. Highly recommend it to anyone in need of a reliable data management solution!

    Avatar
    user_FafhdPBQ
    2025-04-24

    As an avid user of tdengine-mcp, I can't recommend this product enough. Developed by Abeautifulsnow, it offers exceptional performance and reliability. From seamless integration to its intuitive interface, this tool has significantly streamlined my data management processes. It's a game-changer for anyone serious about data handling.

    Avatar
    user_CNQZijax
    2025-04-24

    As a dedicated user of tdengine-mcp, I must say this application exceeded my expectations in terms of performance and ease of use. Developed by Abeautifulsnow, it seamlessly handles massive data streams and shows outstanding reliability. The user interface is intuitive, making it perfect for both newcomers and experienced professionals. Highly recommend!

    Avatar
    user_2Jmt0TfO
    2025-04-24

    I've been using tdengine-mcp by Abeautifulsnow and it has completely transformed my data management experience. Its intuitive interface and powerful features make it easier to handle complex datasets efficiently. If you're looking for a reliable solution to manage your data, I highly recommend giving tdengine-mcp a try.

    Avatar
    user_TDQlaZiE
    2025-04-24

    TDengine-MCP is a fantastic tool developed by Abeautifulsnow that has significantly improved my data processing capabilities. Its efficiency and reliability in handling large-scale data streams are remarkable. The user interface is intuitive, and the overall performance is outstanding. Highly recommend for anyone dealing with big data!

    Avatar
    user_h3nm35cy
    2025-04-24

    As a dedicated user of tdengine-mcp, I am impressed by its seamless data integration and robust performance. Developed by Abeautifulsnow, this tool offers exceptional efficiency and reliability. It streamlines my data management tasks effortlessly and has significantly enhanced my productivity. Highly recommended for anyone looking to optimize their data processes!

    Avatar
    user_wtj39oNb
    2025-04-24

    I've been using tdengine-mcp by Abeautifulsnow, and it has significantly enhanced my data processing capabilities. The product is intuitive, efficient, and user-friendly. I highly recommend it to anyone looking for a reliable and powerful tool to streamline their data management tasks. The seamless integration and robust performance make it a standout choice in its category.