DE

dataring-engineering/mcp-server-trino

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

18 stars 13 forks 품질 49 트렌드 22MIT

Trino를 위한 MCP 서버

개요

이 저장소는 MCP (Model-Control-Protocol) 서버를 제공하여 Python을 사용하여 Trino를 통해 목록 및 쿼리 테이블을 나열할 수 있습니다. - MCP : MCP는 AI 모델, 데이터 및 도구 브리징 프로토콜입니다. 이 예제 MCP 서버 제공 : - MCP 리소스로 Trino 테이블 목록 - MCP를 통해 테이블 내용을 읽는 능력 - Trino - Trino에 대한 임의 SQL 쿼리를 실행하기위한 도구 - Trino : 대용량 데이터 분석을위한 빠르고 분산 SQL 쿼리 엔진. 이 서버는 Trino 호스트, 카탈로그 및 스키마에 연결하기 위해 Trino의 Python 클라이언트 (trino.dbapi)를 사용합니다. - Python 3.9+ (또는 mcp, trino 및 asyncio와 호환되는 버전) - trino (trino의 파이썬 드라이버) - mcp (모델 제어 Protocol Python 라이브러리) 서버는 환경변수에서 Trino 연결 세부사항을 읽습니다:

개요(AI 번역)

이 저장소는 MCP (Model-Control-Protocol) 서버를 제공하여 Python을 사용하여 Trino를 통해 목록 및 쿼리 테이블을 나열할 수 있습니다.

개요

  • MCP : MCP는 AI 모델, 데이터 및 도구 브리징 프로토콜입니다. 이 예제 MCP 서버는 다음과 같습니다.
  • MCP 자원으로 Trino 테이블의 목록
  • MCP를 통해 테이블 내용을 읽는 능력
  • Trino에 대한 arbitrary SQL 쿼리 실행을위한 도구
  • Trino : 대용량 데이터 분석을위한 빠르고 분산 SQL 쿼리 엔진. 이 서버는 Trino 호스트, 카탈로그 및 스키마에 연결하기 위해 Trino의 Python 클라이언트 (trino.dbapi)를 사용합니다.

요구 사항

  • Python 3.9+ (또는 mcp, trino 및 asyncio와 호환되는 버전)
  • trino (트리노의 파이썬 드라이버)
  • mcp (모델-Control-Protocol Python 라이브러리)

구성

서버는 환경변수에서 Trino 연결 세부사항을 읽습니다:

변수 설명 기본
TRINO_HOST 트리노 서버 호스트명 또는 IP [T1]]
TRINO_PORT 트리노 서버포트 [T3]
TRINO_USER 트리노 사용자명 *필수 *

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

Trino MCP Server

This repository provides an MCP (Model-Control-Protocol) server that allows you to list and query tables via Trino using Python.

Overview

  • MCP: MCP is a protocol for bridging AI models, data, and tools. This example MCP server provides:
    • A list of Trino tables as MCP resources
    • Ability to read table contents through MCP
    • A tool for executing arbitrary SQL queries against Trino
  • Trino: A fast, distributed SQL query engine for big data analytics. This server makes use of Trino’s Python client (trino.dbapi) to connect to a Trino host, catalog, and schema.

Requirements

  • Python 3.9+ (or a version compatible with mcp, trino, and asyncio)
  • trino (the Python driver for Trino)
  • mcp (the Model-Control-Protocol Python library)

Configuration

The server reads Trino connection details from environment variables:

Variable Description Default
TRINO_HOST Trino server hostname or IP localhost
TRINO_PORT Trino server port 8080
TRINO_USER Trino user name required
TRINO_PASSWORD Trino password (optional, depends on your authentication setup) (empty)
TRINO_CATALOG Default catalog to use (e.g., hive, tpch, postgresql, etc.) required
TRINO_SCHEMA Default schema to use (e.g., default, public, etc.) required

Usage

{
  "mcpServers": {
    "trino": {
      "command": "uv",
      "args": [
        "--directory", 
        "",
        "run",
        "mcp_server_trino"
      ],
      "env": {
        "TRINO_HOST": "",
        "TRINO_PORT": "",
        "TRINO_USER": "",
        "TRINO_PASSWORD": "",
        "TRINO_CATALOG": "",
        "TRINO_SCHEMA": ""
      }
    }
  }
}

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "trino": { "command": "uv", "args": [ "--directory", "<path_to_mcp_server_trino>", "run", "mcp_server_trino" ], "env": { "TRINO_HOST": "<host>", "TRINO_PORT": "<port>", "TRINO_USER": "<user>", "TRINO_PASSWORD": "<password>", "TRINO_CATALOG": "<catalog>", "TRINO_SCHEMA": "<schema>" } } } }