← Back to directory
K

Kubeflow Spark AI Toolkit

Community
Help AI agents analyze and investigate Apache Spark applications.
Category
Dev Tools #132 of 751
Stars
★ 210 Very popular
Transport
stdio (local process) · Streamable HTTP
Runtime
Python 3.12+
Credentials
No credential needed
License
Apache-2.0
Last commit
Tools
20
58FMRS · C

This MCP server connects to Spark History Server and provides tools for application, job, stage, executor, SQL, performance comparison, and failure analysis. It supports stdio and streamable HTTP, with configurable authentication and multiple servers.

Strongest · Setup experience 14/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
12/20
Maintenance
10/20
Documentation
14/20
Setup experience
14/20
Why each score
Reliability 8/20
The README lists 20 tools, two prompts, transport options, multi-server behavior, and some feature limitations. However, no server source, manifest, CI workflow, or test contents are available to verify startup, the MCP handshake, tool behavior, or error handling, so the score is limited.
Security and permissions 12/20
The documentation says the server queries the Spark REST API and supports username/password, token, and TLS CA configuration. The listed features are primarily read and analysis operations; no delete, deploy, or remote-command operation is shown. Points are deducted because source is unavailable to verify permission boundaries, credential protection, or data flows, and the examples default to HTTP without fully explaining transport protection.
Maintenance 10/20
The repository is identified as Apache-2.0, not archived, and part of the Kubeflow project. The prompt provides no verifiable release history, commit activity, issue response, dependency update, or security-response evidence. Stars and open issue counts do not affect this score.
Documentation 14/20
The README covers installation, configuration, client setup, multi-server use, tool and prompt overviews, limitations, and examples. Points are deducted because there is no reviewable evidence of per-tool parameters and error behavior, cost and troubleshooting information is limited, and only README content is available for review.
Setup experience 14/20
The documentation provides uvx and pip installation paths, stdio configuration examples for Claude Code and Kiro CLI, and the Python version requirement and default address. Points are deducted because setup requires Python 3.12+ and uv, remote deployment connection steps are brief, and there is no verifiable cross-platform execution evidence.

Static review · not runReviewed 2026-12-04

Read the FMRS scoring method →

Fit and risk

What it can accessUses the network

Best for

  • Engineers and data teams who analyze Apache Spark applications through MCP clients.
  • Users with an accessible Spark History Server or Spark UI who need multi-step investigations.

Not for

  • Users who do not use Apache Spark or cannot access a Spark History Server or Spark UI.
  • Users who only need a terminal or scripting interface; the repository provides a separate shs CLI.

Required permissions

  • Network access to the configured Spark History Server or Spark UI.
  • If the server requires authentication, provide the corresponding username and password; token authentication is also configurable.
  • AWS troubleshooting tools require configured AWS credentials and region.

Risks and side effects

  • Results may include operational data such as application configuration, system properties, classpath, exception details, and thread dumps; handle them as sensitive information.
  • Protect configured authentication details and AWS credentials.
  • Cached RDD visibility from the History Server depends on block updates being enabled in event logs; thread dumps are available only from a driver UI.

Setup

Before you start

Runtime:Python 3.12+

Other optional settings (5)
SHS_MCP__TRANSPORT optional Sets the MCP transport mode; the example client configuration uses stdio.
SHS_SERVERS__LOCAL__URL optional Sets the URL for the server named local; the example uses http://localhost:18080.
SHS_MCP__PORT optional Sets the MCP server port; defaults to 18888.
SHS_MCP__DEBUG optional Enables or disables debug mode; defaults to false.
SHS_MCP__ADDRESS optional Sets the bind address; defaults to localhost.

Requires Python 3.12+ and uv. Run uvx --from mcp-apache-spark-history-server spark-mcp, or install with uv tool install mcp-apache-spark-history-server and run spark-mcp. The default target is http://localhost:18080. Configure the Spark History Server URL and optional username and password in a config file; choose the MCP transport there. The stdio client example sets SHS_MCP__TRANSPORT=stdio and SHS_SERVERS__LOCAL__URL.

.mcp.json
{"mcpServers":{"spark-history":{"command":"uvx","args":["--from","mcp-apache-spark-history-server","spark-mcp"],"env":{"SHS_MCP__TRANSPORT":"stdio","SHS_SERVERS__LOCAL__URL":"http://localhost:18080"}}}}

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "spark-history": {
      "command": "uvx",
      "args": [
        "--from",
        "mcp-apache-spark-history-server",
        "spark-mcp"
      ],
      "env": {
        "SHS_MCP__TRANSPORT": "stdio",
        "SHS_SERVERS__LOCAL__URL": "http://localhost:18080"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
[mcp_servers.spark-history]
command = "uvx"
args = ["--from", "mcp-apache-spark-history-server", "spark-mcp"]

[mcp_servers.spark-history.env]
SHS_MCP__TRANSPORT = "stdio"
SHS_SERVERS__LOCAL__URL = "http://localhost:18080"

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Terminal
claude mcp add spark-history -e SHS_MCP__TRANSPORT=stdio -e SHS_SERVERS__LOCAL__URL=http://localhost:18080 -- uvx --from mcp-apache-spark-history-server spark-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Confirm that `list_applications` appears in the client's MCP tool list, then ask it to list the available Spark applications to verify the connection.

Troubleshooting

  1. Check the Spark History Server URL, network connectivity, and service status.
  2. Verify authentication details, TLS verification settings, and any custom CA bundle path.
  3. Check that the config file is at the selected path; client working directories may differ, so use `--config` or `SHS_MCP_CONFIG`.
  4. Confirm the MCP client's transport matches the `SHS_MCP__TRANSPORT` setting.
  5. If cached RDDs are absent, check whether `spark.eventLog.logBlockUpdates.enabled` was enabled.

Things to try

Once connected, you can ask your AI assistant things like:

  • List the available Spark applications.
  • Find the slowest stages and explain potential bottlenecks.
  • Compare the performance metrics of two SQL executions.

Tools 20

list_applications read-only
Filter applications by status, date, and limit; pass app_id for application details and attempts.
list_jobs read-only
List jobs with status or job ID filters and optional sorting.
list_stages read-only
List stages with status filtering and optional sorting.
get_stage read-only
Get stage details, attempts, and task metric distributions.
list_stage_task_failures read-only
List failed tasks for a stage with exception or stack trace details.
list_executors read-only
Filter and sort executors and their metrics.
get_executor_summary read-only
Aggregate metrics across all executors.
get_resource_usage_timeline read-only
Show executor additions and removals with resource totals over time.
Show 12 more tools
get_executor_thread_dump read-only
Get a JVM thread dump for a driver or executor; available only from a running Spark UI.
list_cached_rdds read-only
List cached RDDs and DataFrames with storage, partition, memory, and disk metrics.
get_environment read-only
Get Spark configuration, JVM information, system properties, and classpath.
list_sql_executions read-only
List curated SQL execution summaries with filtering, sorting, and a limit.
get_sql_execution read-only
Get SQL execution details, with optional plan, node metrics, job summaries, and stage data.
compare_sql_executions read-only
Compare aggregate performance metrics for two SQL executions, with an optional plan structure diff.
get_job_bottlenecks read-only
Identify bottlenecks across stages, tasks, and executors.
compare_job_environments read-only
Diff Spark configurations between two applications.
compare_job_performance read-only
Compare performance metrics between two applications.
compare_stages read-only
Compare two stages using stage metrics and per-task quantiles.
aws_analyze_spark_workload read-only
Run one-shot root cause analysis for a failed or slow Spark workload; requires AWS credentials and region.
aws_spark_code_recommendation read-only
Get code fix recommendations for identified Spark issues; requires AWS credentials and region.

Use cases

Investigate why a Spark application failed and inspect failed task exceptions.
Compare application or SQL execution performance and configuration.
Analyze jobs, stages, executors, and cached data to find performance bottlenecks.
Connect to multiple configured Spark History Servers or query a running application's Spark UI.

Supported clients

Claude Code
Kiro CLI
Claude DesktopPartial support

Listed from the project's documentation, not tested by this site.

Overview

Kubeflow Spark AI Toolkit provides an MCP server that connects to Apache Spark History Server so MCP-compatible clients can query application, job, stage, executor, SQL, and resource data, then compare performance and investigate failures. It supports multiple configured History Servers and can also connect to a running Spark UI. The repository also includes a standalone command-line tool, shs; that tool is separate from the MCP server.

Similar servers

Source revision 512b46c3ddd4 Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/mcp-apache-spark-history-server.svg)](https://followmcp.com/en/servers/mcp-apache-spark-history-server)