mcp-server-starrocks

by hagsmand
Verified

Integrations

  • The MCP server is built with Python, required as a prerequisite (3.8+), and the server is launched using Python commands

  • Used for database connectivity with the StarRocks database, enabling execution of SELECT queries, table management, and database operations

StarRocks MCP 서버

StarRocks 데이터베이스와 상호 작용하기 위한 모델 제어 프로토콜(MCP) 서버입니다. 이 서버는 AI 모델이 정의된 도구 세트를 통해 StarRocks 데이터베이스를 쿼리하고 조작할 수 있는 표준화된 인터페이스를 제공합니다.

개요

StarRocks MCP 서버를 사용하면 AI 모델이 다음을 수행할 수 있습니다.

  • StarRocks 데이터베이스에서 SELECT 쿼리 실행
  • 사용 가능한 테이블 나열
  • 테이블 스키마 설명
  • 새 테이블 만들기(읽기 전용 모드가 아닌 경우)
  • INSERT, UPDATE, DELETE와 같은 쓰기 작업 실행(읽기 전용 모드가 아닌 경우)

설치

필수 조건

  • 파이썬 3.8 이상
  • StarRocks 데이터베이스 인스턴스
  • SQLAlchemy
  • MCP 파이썬 라이브러리

소스에서 설치

지엑스피1

Smithery에서 설치

npm에서 @smithery/sdk @modelcontextprotocol/sdk를 설치합니다.

MCP Inspector 사용

npx @modelcontextprotocol/inspector uv --directory ~/mcp-server-starrocks mcp-server-starrocks를 실행합니다.

용법

서버 시작

python -m mcp_server_starrocks.server --host <starrocks-host> --port <starrocks-port> --user <username> --database <database-name> [--password <password>] [--readonly]

명령줄 인수:

  • --host : StarRocks 서버 호스트(필수)
  • --port : StarRocks 서버 포트(기본값: 9030)
  • --user : StarRocks 사용자 이름(필수)
  • --database : StarRocks 데이터베이스 이름(필수)
  • --password : StarRocks 비밀번호(필요한 경우)
  • --readonly : 서버를 읽기 전용 모드로 실행합니다(선택 사항)

사용 가능한 도구

서버는 다음과 같은 도구를 제공합니다.

읽기 전용 도구:

  • read-query : StarRocks 데이터베이스에서 SELECT 쿼리를 실행합니다.
  • list-tables : StarRocks 데이터베이스의 모든 테이블을 나열합니다.
  • describe-table : 특정 테이블의 스키마를 설명합니다.

쓰기 도구(읽기 전용 모드가 아닐 때 사용 가능):

  • write-query : INSERT, UPDATE 또는 DELETE 쿼리를 실행합니다.
  • create-table : StarRocks 데이터베이스에 새 테이블을 만듭니다.

예시

테이블 나열

{ "name": "list-tables", "arguments": {} }

SELECT 쿼리 실행

{ "name": "read-query", "arguments": { "query": "SELECT FROM my_table LIMIT 10" } }

테이블 설명

{ "name": "describe-table", "arguments": { "table_name": "my_table" } }

(읽기 전용 모드가 아닌 경우) 테이블 생성

{ "name": "create-table", "arguments": { "query": "CREATE TABLE new_table (id INT, name VARCHAR(100))" } }

특허

MIT 라이센스

기여하다

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

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

이 MCP 서버는 Starrocks에 대한 연결을 제공하므로 최소한의 노력으로 이 쿼리 엔진을 탐색할 수 있습니다.

  1. Overview
    1. Installation
      1. Prerequisites
      2. Install from source
      3. Install from Smithery
      4. Using MCP Inspector
    2. Usage
      1. Starting the server
      2. Available Tools
    3. Examples
      1. Listing tables
      2. Executing a SELECT query
      3. Describing a table
      4. Creating a table (when not in read-only mode)
    4. License
      1. Contributing
        ID: qjidoviad2