Skip to main content
Glama
FocusSearch

focus_mcp_sql

by FocusSearch

포커스 데이터 MCP 서버 [中文]

MCP(Model Context Protocol) 서버를 사용하면 인공 지능 보조자가 자연어를 SQL 문으로 변환할 수 있습니다.

이미 Text-to-SQL 프레임워크가 너무나 많은데, 왜 또 다른 프레임워크가 필요할까요?

간단히 말해서, focus_mcp_sql은 2단계 SQL 생성 솔루션을 채택하여 LLM의 환각을 제어하고 생성된 SQL 결과에 대한 비기술적 사용자의 신뢰를 실제로 구축합니다.

아래는 focus_mcp_sql과 다른 것들을 비교한 표입니다.

비교 분석 표

다음은 focus_mcp_sql과 다른 LLM 기반 프레임워크를 나란히 비교한 것입니다.

특징

기존 LLM 프레임워크

포커스_mcp_sql

생성 프로세스

블랙박스, 직접 SQL 생성

투명한 2단계(키워드 + SQL)

환각 위험

높음, 모델 품질에 따라 다름

낮음, 제어 가능(키워드 검증)

속도

느리고 대규모 모델 추론에 의존함

빠르고 결정론적인 키워드-SQL

비용

높음, 고급 모델이 필요함

낮음, 대형 모델에 대한 의존도 감소

비기술적 사용자 친화성

낮음, 결과 확인 어려움

높고 쉬운 키워드 검사

특징

  • 모델 초기화 - 자연어를 SQL 문으로 변환

Related MCP server: database-explorer-mcp

필수 조건

  • jdk 23 이상. jdk 다운로드

  • Gradle 8.12 이상. Gradle을 다운로드하세요.

  • Datafocus를 등록하여 베어러 토큰을 얻으세요:

    1. Datafocus 에 계정을 등록하세요

    2. 신청서를 작성하세요

    3. 신청서를 입력하세요

    4. 관리자 -> 인터페이스 인증 -> 베어러 토큰 -> 새 베어러 토큰소지자 토큰

설치

  1. 이 저장소를 복제하세요:

지엑스피1

  1. 서버를 빌드하세요:

gradle clean
gradle bootJar

The jar path: build/libs/focus_mcp_sql.jar

MCP 구성

MCP 설정 파일에 서버를 추가합니다.

{
  "mcpServers": {
    "focus_mcp_data": {
      "command": "java",
      "args": [
        "-jar",
        "path/to/focus_mcp_sql/focus_mcp_sql.jar"
      ],
      "autoApprove": [
        "gptText2sqlStart",
        "gptText2sqlChat"
      ]
    }
  }
}

사용 가능한 도구

1. gptText2sqlStart

초기 모델.

매개변수:

  • model (필수): 테이블 모델

  • bearer (필수): bearer 토큰

  • language (선택 사항): 언어 ['영어','중국어']

예:

{
  "model": {
    "tables": [
      {
        "columns": [
          {
            "columnDisplayName": "name",
            "dataType": "string",
            "aggregation": "",
            "columnName": "name"
          },
          {
            "columnDisplayName": "address",
            "dataType": "string",
            "aggregation": "",
            "columnName": "address"
          },
          {
            "columnDisplayName": "age",
            "dataType": "int",
            "aggregation": "SUM",
            "columnName": "age"
          },
          {
            "columnDisplayName": "date",
            "dataType": "timestamp",
            "aggregation": "",
            "columnName": "date"
          }
        ],
        "tableDisplayName": "test",
        "tableName": "test"
      }
    ],
    "relations": [

    ],
    "type": "mysql",
    "version": "8.0"
  },
  "bearer": "ZTllYzAzZjM2YzA3NDA0ZGE3ZjguNDJhNDjNGU4NzkyYjY1OTY0YzUxYWU5NmU="
}

모델 설명:

이름

휴넷

종류

필수 선택

말하다

모델

몸

물체

이다

없음

" 유형

몸

끈

이다

편집장 유형

" 버전

몸

끈

이다

편집장 버전

» 테이블

몸

[물체]

이다

표 구성도

»» 테이블 표시 이름

몸

끈

否

이름 표시

»» 테이블 이름

몸

끈

否

표원 시 이름

»» 열

몸

[물체]

否

표 참조 표 참조

»»» 열 표시 이름

몸

끈

이다

이름 표시

»»» 열 이름

몸

끈

이다

리원 시네마틱

»»» 데이터 유형

몸

끈

이다

분할편집 유형

»»» 집계

몸

끈

이다

상호 합의 방식

» 관계

몸

[물체]

이다

표 참조 표 참조

»» 조건

몸

[물체]

否

경고판 부품

»»» dstColName

몸

끈

否

차원 表关联列原始name

»»» srcColName

몸

끈

否

사실 표제논리원시인

»» 차원표

몸

끈

否

차원 표원 이름

»» 팩트테이블

몸

끈

否

사실 표의 원년 이름

»» 조인 유형

몸

끈

否

경고 유형

2. gptText2sqlChat

자연어를 SQL로 변환합니다.

매개변수:

  • chatId (필수): 채팅 ID

  • input (필수): 자연어

  • bearer (필수): bearer 토큰

예:

{
  "chatId": "03975af5de4b4562938a985403f206d4",
  "input": "what is the max age",
  "bearer": "ZTllYzAzZjM2YzA3NDA0ZGE3ZjguNDJhNDjNGU4NzkyYjY1OTY0YzUxYWU5NmU="
}

응답 형식

모든 도구는 다음 형식으로 응답을 반환합니다.

{
  "errCode": 0,
  "exception": "",
  "msgParams": null,
  "promptMsg": null,
  "success": true,
  "data": {
  }
}

Visual Studio Code Cline 샘플

  1. vsCode에 cline 플러그인 설치

  2. mcp 서버 구성mcp 서버 구성

  3. 사용

    1. 초기 모델 초기 모델1초기 모델2

    2. 이전: 최대 연령은 몇 살입니까?채팅

연락하다:

https://discord.gg/mFa3yeq9데이터포커스

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to interact with a MySQL database using natural language, automating SQL tasks like querying, inserting, updating, and deleting data.
    1
    -
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to connect to and interact with PostgreSQL, MySQL, SQLite, and MongoDB databases through natural language, supporting schema exploration, query execution, data export, and more.
    13
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to directly query MySQL databases, list tables, and view table structures through natural language.
    18 npm
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables natural language querying of SQL databases using AI, supporting multiple database types and automatic schema discovery.
    1
    MIT