
semyonsinchenko/pyspark-mcp-server
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
PySpark의 MPC 서버는 LakeSail에 의해 inpired
개요
피에스파크 MCP Server는 Apache Spark의 Model Context Protocol (MCP)의 경량 서버 구현입니다. 이 MCP 서버의 기본 목적은 AI 시스템을 사용하여 쿼리 최적화를 촉진하는 것입니다. 그것은 추가 쿼리 계획 정보와 함께 분석을위한 Spark to AI 시스템에서 논리 및 물리적 쿼리 계획을 제공합니다. 또한, 서버는 카탈로그 및 테이블 정보를 노출하여 Spark에 의해 구동되는 데이터 호수의 데이터 발견 기능을 가능하게 합니다. 설치 후, pyspark-mcp 명령을 사용하여 서버를 시작합니다. CLI는 Spark-submit 구성을 자동으로 처리합니다. 모든 표준 스파크 서브 옵션은 지원됩니다 : 모든 스파크 하위 옵션 (--conf, --jars, --packages, --executor-memory 등)는 자동으로 통과됩니다. - Python >=3.11, = 2.10.6 - loguru - pyspark >= 3.5 다음 도구는 PySpark MCP Server에 포함되어 있습니다
개요(AI 번역)
hi# PySpark MCP 서버
묘사
피에스파크 MCP Server는 Apache Spark의 Model Context Protocol (MCP)의 경량 서버 구현입니다.
이 MCP 서버의 기본 목적은 AI 시스템을 사용하여 쿼리 최적화를 촉진하는 것입니다. 그것은 추가 쿼리 계획 정보와 함께 분석을위한 Spark to AI 시스템에서 논리 및 물리적 쿼리 계획을 제공합니다. 또한, 서버는 카탈로그 및 테이블 정보를 노출하여 Spark에 의해 구동되는 데이터 호수의 데이터 발견 기능을 가능하게 합니다.
빠른 시작
설치
서버 실행
설치 후, pyspark-mcp 명령어를 사용하여 서버 시작:
CLI는 spark-submit 구성을 자동으로 처리합니다. 모든 표준 스파크 서브 옵션은 지원됩니다 :
CLI 옵션
| 옵션 | 기본 | 설명 |
|---|---|---|
| [T2] | local[*] |
불꽃 마스터 URL |
| [T4] | [T5] | MCP 서버 호스트 주소 |
| [T6] | 8090 |
MCP 서버 포트 번호 |
--spark-submit |
spark-submit |
스파크-submit 실행 가능 |
--dry-run |
- | 실행하지 않고 프린트 명령 |
모든 스파크 하위 옵션 (--conf], --jars], --packages], --executor-memory] 등.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
hi# PySpark MCP Server
Description
PySpark MCP Server is a lightweight server implementation of Model Context Protocol (MCP) for Apache Spark.
The primary purpose of this MCP server is to facilitate query optimization using AI systems. It provides both logical and physical query plans from Spark to AI systems for analysis, along with additional query plan information. Furthermore, the server exposes catalog and table information, enabling data discovery capabilities in data lakes powered by Spark.
Quick Start
Installation
pip install pyspark-mcp
Running the Server
After installation, use the pyspark-mcp command to start the server:
pyspark-mcp --master "local[*]" --host 127.0.0.1 --port 8090
The CLI automatically handles spark-submit configuration. All standard spark-submit options are supported:
# With additional Spark configuration
pyspark-mcp --master "local[*]" --conf spark.driver.memory=4g
# YARN cluster mode
pyspark-mcp --master yarn --deploy-mode client --num-executors 4
# With additional JARs
pyspark-mcp --master "local[*]" --jars /path/to/connector.jar
# Preview the spark-submit command without running
pyspark-mcp --master "local[*]" --dry-run
# With GraphFrames package
pyspark-mcp --master "local[*]" --packages io.graphframes:graphframes-spark3_2.12:0.10.1
CLI Options
| Option | Default | Description |
|---|---|---|
--master |
local[*] |
Spark master URL |
--host |
127.0.0.1 |
MCP server host address |
--port |
8090 |
MCP server port number |
--spark-submit |
spark-submit |
Path to spark-submit executable |
--dry-run |
- | Print command without executing |
All spark-submit options (--conf, --jars, --packages, --executor-memory, etc.) are passed through automatically.
Adding the running MCP to the Claude-code
# Must run one server on a different port per Claude instance
claude mcp add --transport http pyspark-mcp http://127.0.0.1:8090/mcp
Dependencies
- Python >=3.11,<4.0
- fastmcp >= 2.10.6
- loguru
- pyspark >= 3.5
Bundled MCP tools
The following tools are included in the PySpark MCP Server:
| MCP Tool | Description |
|---|---|
| Get the version of PySpark | Get the version number from the current PySpark Session |
| Get Analyzed Plan of the query | Extracts an analyzed logical plan from the provided SQL query |
| Get Optimized Plan of the query | Extracts an optimized logical plan from the provided SQL query |
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →