TDengine Query MCP Server

MIT License
4

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 쿼리 MCP 서버

AI 비서를 위한 읽기 전용 TDengine 데이터베이스 쿼리를 제공하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. AI 기반 도구에서 직접 쿼리를 실행하고, 데이터베이스 구조를 탐색하고, 데이터를 분석할 수 있습니다.

지원되는 AI 도구

이 MCP 서버는 다음을 포함하여 모델 컨텍스트 프로토콜을 지원하는 모든 도구와 함께 작동합니다.

  • 커서 IDE : .cursor/mcp.json 에 설정
  • Anthropic Claude : 호환되는 MCP 클라이언트와 함께 사용
  • 기타 MCP 호환 AI 어시스턴트 : 도구의 MCP 구성 지침을 따르세요.

기능 및 제한 사항

그것이 하는 일

  • 읽기 전용 TDengine 쿼리(SELECT, SHOW, DESCRIBE만 해당)를 실행합니다.
  • ✅ 데이터베이스/안정적인 정보 및 메타데이터 제공
  • ✅ 사용 가능한 데이터베이스 및 마구간 목록

그것이 하지 않는 것

  • ❌ 쓰기 작업(INSERT, UPDATE, DELETE, CREATE, ALTER 등)을 실행합니다.
  • ❌ 데이터베이스 설계 또는 스키마 생성 기능 제공
  • ❌ 전체 데이터베이스 관리 도구로서의 기능

이 도구는 읽기 전용 쿼리를 통한 데이터 조사 및 탐색을 위해 특별히 설계되었습니다. 데이터베이스 관리, 스키마 관리 또는 데이터 수정에는 사용할 수 없습니다.

사용 방법

소스 코드에서 실행

이 MCP 서버를 사용하는 권장 방법은 설치 없이 uv 사용하여 직접 실행하는 것입니다. 아래 예시에서는 Claude Desktop과 Cursor가 이 방식으로 구성되어 있습니다.

저장소를 복제하려면 다음을 수행하세요.

지엑스피1

그러면 서버를 직접 실행할 수 있습니다.

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

또는 src/tdengine_mcp_server/ 디렉토리에 있는 .env 파일을 변경하여 환경 변수를 설정하고 다음 명령으로 서버를 실행할 수 있습니다.

uv run src/tdengine_mcp_server

중요: .env 파일은 명령줄 인수보다 우선순위가 높습니다 .

pip 명령어로 Pypi에서 설치

# Install globally with pip pip install tdengine_mcp_server

그런 다음 다음을 실행합니다.

python -m tdengine_mcp_server -h

uvx 명령어로 설치

uvx tdengine-mcp-server -h

npx 명령어로 smithery에서 설치

npx -y @smithery/cli@latest install @Abeautifulsnow/tdengine-mcp --client cursor --config '"{}"'

--client 옵션 뒤에 claude , 'windsurf' 등의 다른 옵션을 추가하여 클라이언트를 변경할 수 있습니다. smithery/tdengine-mcp-server 파일도 참조할 수 있습니다.

구성 옵션

.env 파일

환경 변수설명기본
로그 레벨로그 수준(DEBUG, INFO, WARN, ERROR)을 설정합니다.정보
TDENGINE_HOST환경을 위한 데이터베이스 호스트로컬호스트
TD엔진_포트데이터베이스 포트6041
TDENGINE_USERNAME데이터베이스 사용자 이름뿌리
TDENGINE_PASSWORD데이터베이스 비밀번호타오스데이터
TDENGINE_DATABASE데이터베이스 이름통나무
TDENGINE_TIMEOUT연결 시간 초과를 초 단위로 설정하세요30
수송사용할 운송 수단을 제어합니다stdio

CLI 사용법

$ 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` -trans, --transport {sse,stdio} The transport to use. Default: `sse`

AI 어시스턴트와의 통합

AI 비서는 MCP 서버를 통해 TDengine 데이터베이스와 상호 작용할 수 있습니다. 다음은 몇 가지 예입니다.

예시 쿼리:

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?

TDengine MCP 도구 사용

TDengine Query MCP 서버는 AI 어시스턴트가 사용할 수 있는 세 가지 주요 도구를 제공합니다.

1. 질의

특정 안정된 것에 대해 읽기 전용 SQL 쿼리를 실행합니다.

Use the query tool to run: SELECT * FROM customers WHERE itemid > '2025-01-01' LIMIT 10;
2. 정보

귀하의 마구간에 대한 자세한 정보를 얻으세요:

Use the info tool to check the meta info about the specified stable. DESCRIBE disks_info;

보안 고려 사항

  • ✅ 읽기 전용 쿼리만 허용됩니다(SELECT, SHOW, DESCRIBE)

문제 해결

연결 문제

연결에 문제가 있는 경우:

  1. MCP 구성에서 데이터베이스 자격 증명을 확인하세요.
  2. TDengine 서버가 실행 중이고 접근 가능한지 확인하세요.
  3. 연결을 차단하는 방화벽 규칙을 확인하세요
  4. 구성에서 LOG_LEVEL 설정하여 디버그 모드를 활성화하세요.

일반적인 오류

오류: 쿼리 실행에 실패했습니다.

  • SQL 구문을 확인하세요
  • 지원되는 쿼리 유형(SELECT, SHOW, DESCRIBE)만 사용하고 있는지 확인하세요.
  • 귀하의 쿼리가 실제로 읽기 전용인지 확인하세요.

기여하다

기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.


자세한 정보나 지원이 필요하면 GitHub 저장소에서 이슈를 열어 주세요.

-
security - not tested
A
license - permissive license
-
quality - not tested

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.

AI 어시스턴트를 위한 읽기 전용 TDengine 데이터베이스 쿼리를 제공하는 MCP(Model Context Protocol) 서버로, 이를 통해 사용자는 쿼리를 실행하고, 데이터베이스 구조를 탐색하고, AI 기반 도구에서 직접 데이터를 조사할 수 있습니다.

  1. Supported AI Tools
    1. Features & Limitations
      1. What It Does
      2. What It Doesn't Do
    2. How to use
      1. Run from source code
      2. Install From Pypi by pip command
      3. Install by uvx command
      4. Install From smithery by npx command
    3. Configuration Options
      1. .env file
      2. cli usage
    4. Integration with AI Assistants
      1. Using TDengine MCP Tools
    5. Security Considerations
      1. Troubleshooting
        1. Connection Issues
        2. Common Errors
      2. Contributing

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
          Last updated -
          1
          2,728
          1,407
          TypeScript
          MIT License
          • Apple
        • -
          security
          F
          license
          -
          quality
          Implements the Model Context Protocol (MCP) to provide AI models with a standardized interface for connecting to external data sources and tools like file systems, databases, or APIs.
          Last updated -
          16
          Python
          • Apple
          • Linux
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol (MCP) server that wraps the dbt CLI tool, enabling AI coding agents to interact with dbt projects through standardized MCP tools. Developed by Mammoth Growth.
          Last updated -
          8
          Python
          MIT License
          • Linux
          • Apple
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol (MCP) server that enables AI assistants to interact with MySQL databases by executing SQL queries and checking database connectivity.
          Last updated -
          TypeScript
          MIT License
          • Apple
          • Linux

        View all related MCP servers

        ID: k8v8dsx68k