1. Conduid
  2. Developer Tools
  3. Pyspark MCP Server
MCP server · Developer Tools

Pyspark MCP Server

MPC Server for PySpark inpired by the LakeSail

Unclaimed Apache-2.0 last commit 7 months ago devtools
64Good

Scored 3 days ago · breakdown

About Pyspark MCP Server

Pyspark MCP Server is an MCP server published by SemyonSinchenko in the Developer Tools category: mPC Server for PySpark inpired by the LakeSail.

The repository has 18 stars and 8 forks, with the last commit 7 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/SemyonSinchenko/pyspark-mcp-server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Pyspark MCP Server

Powered by Claude · Grounded in docs

I know everything about Pyspark MCP Server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 4 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.0.6v0.0.6 · 26 Feb 2026What's Changed black/flake8/isort --> ruff, mypy --> ty by @russelljurney-upside in https://github.com/SemyonSinchenko/pyspark-mcp-server/pull/14 Fix timeouts, release ports, check for port availability up front, catch exception and print…
v0.0.5v0.0.5 · 1 Feb 2026What's Changed Rename tools without spaces in names to be compliant with MCP standard by @russelljurney-upside in https://github.com/SemyonSinchenko/pyspark-mcp-server/pull/12 New Contributors @russelljurney-upside made their first…
v0.0.4v0.0.4 · 25 Dec 2025Now catching CTRL-C to prevent port hanging by properly exiting the MCP server. Otherwise the port would hand and you'd have to `lsof -i :<port>` and then kill the hanging process.
v0.0.3v0.0.3 · 20 Dec 2025What's Changed Make the thing runnable from the CLI by @rjurney in https://github.com/SemyonSinchenko/pyspark-mcp-server/pull/5 Full Changelog: https://github.com/SemyonSinchenko/pyspark-mcp-server/compare/v0.0.2...v0.0.3
v0.0.2v0.0.2 · 24 Sep 2025Full Changelog: https://github.com/SemyonSinchenko/pyspark-mcp-server/compare/v0.0.1...v0.0.2

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
Get size estimation for the query results Extracts a size and units from the query plan explain
Get tables from the query plan Extracts all the tables (relations) from the query plan explain
Get the current Spark Catalog Get the catalog that is the default one for the current SparkSession
Check does database exist Check if the database with a given name exists in the current Catalog
Get the current default database Get the current default database from the default Catalog
List all the databases in the current catalog List all the available databases from the current Catalog
List available catalogs List all the catalogs available in the current SparkSession
List tables in the current catalog List all the available tables in the current Spark Catalog
Get a comment of the table Extract comment of the table or returns an empty string
Get table schema Get the spark schema of the table in the catalog
Returns a schema of the result of the SQL query Run query, get the result, get the schema of the result and return a JSON-value of the schema
Read first N lines of the text file Read the first N lines of the file as a plain text. Useful to determine the format

README fetched from the repository 4 days ago. The original is authoritative.

Questions

About Pyspark MCP Server

How do I install Pyspark MCP Server?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Pyspark MCP Server safe to use with an AI agent?

Its trust score is 64 out of 100 (good). It passes 4 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Pyspark MCP Server still maintained?

The last commit was 7 months ago and 2 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.