Apache Spark History

v1.0.0Databasesstable

MCP Server and CLI for Apache Spark History Server. Debug Spark applications from AI agents, scripts, or the terminal.

apache-sparkbig-datadata-processingkubernetesmcp
Share:
172
Stars
0
Downloads
0
Weekly
0/5

What is Apache Spark History?

Apache Spark History is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server and cli for apache spark history server. debug spark applications from ai agents, scripts, or the terminal.

MCP Server and CLI for Apache Spark History Server. Debug Spark applications from AI agents, scripts, or the terminal.

This server falls under the Databases and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • MCP Server and CLI for Apache Spark History Server. Debug Sp

Use Cases

Debug Spark applications from agents
View application logs and metrics
Big data debugging
kubeflow

Maintainer

LicenseApache-2.0
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-apache-spark-history

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Apache Spark History

The Apache Spark History MCP Server connects AI agents and LLM clients to the Apache Spark History Server API, exposing 21 tools for diagnosing and analyzing Spark applications. It lets you list applications, inspect job and stage timelines, compare SQL execution plans, identify bottlenecks, and get executor resource usage — all from natural language queries. Engineers running Spark on Kubernetes or standalone clusters can use this server to answer performance questions like 'Why is my ETL slower than yesterday?' without leaving their AI assistant. A companion CLI (`shs`) provides the same capabilities for scripting and terminal workflows.

Prerequisites

  • Python 3.9+ and `uv` or `uvx` installed (pip install uv)
  • A running Apache Spark History Server with a reachable HTTP URL
  • Network access from the MCP host to the Spark History Server endpoint
  • An MCP-compatible client such as Claude Desktop, Claude Code, or Cursor
  • Optional: Spark cluster credentials (username/password) if the History Server requires authentication
1

Install the MCP server via uvx

Use `uvx` to run the server directly from PyPI without a manual install step. This is the recommended approach for MCP clients that launch the server as a subprocess.

uvx --from mcp-apache-spark-history-server spark-mcp
2

Create a config.yaml file

The server reads its Spark History Server endpoints from a YAML config file. Create `~/.config/spark-mcp/config.yaml` (or any path you prefer) and define one or more named server entries.

servers:
  prod:
    url: http://spark-history.example.com:18080
    auth:
      username: admin
      password: secret
    include_plan_description: false
mcp:
  transport: stdio
  port: 18888
3

Set environment variables (alternative to config file)

All config keys can be overridden with environment variables, which is useful for containerised deployments. Prefix server-specific keys with `SHS_SERVERS_<NAME>_`.

export SHS_SERVERS_PROD_URL=http://spark-history.example.com:18080
export SHS_SERVERS_PROD_AUTH_USERNAME=admin
export SHS_SERVERS_PROD_AUTH_PASSWORD=secret
export SHS_MCP_TRANSPORT=stdio
4

Add the server to your MCP client configuration

Register the server in your MCP client's config file so it is launched automatically. The example below uses Claude Desktop with `claude_desktop_config.json`.

5

Verify the connection

Run the CLI tool to confirm the server can reach your Spark History Server and list applications.

uvx --from mcp-apache-spark-history-server shs apps

Apache Spark History Examples

Client configuration

Claude Desktop config block that launches the Spark History MCP server via uvx with a config file path passed as an argument.

{
  "mcpServers": {
    "spark-history": {
      "command": "uvx",
      "args": ["--from", "mcp-apache-spark-history-server", "spark-mcp"],
      "env": {
        "SHS_SERVERS_PROD_URL": "http://spark-history.example.com:18080",
        "SHS_MCP_TRANSPORT": "stdio"
      }
    }
  }
}

Prompts to try

Natural-language queries you can ask once the server is connected.

- "List my last 10 Spark applications and show their status"
- "Find the slowest SQL queries in application app-20240601-001 and explain why they are slow"
- "Compare the execution plan for SQL query 42 between yesterday's run and today's"
- "Show executor resource usage and identify any stragglers in the current ETL job"
- "Why is my Spark job running slower than it did last week?"

Troubleshooting Apache Spark History

Server starts but returns 'connection refused' when calling tools

Verify the Spark History Server URL is correct and reachable from the machine running the MCP server. Check that the port (default 18080) is open and test with `curl http://spark-history.example.com:18080/api/v1/applications`.

Authentication errors when listing applications

Ensure `SHS_SERVERS_<NAME>_AUTH_USERNAME` and `SHS_SERVERS_<NAME>_AUTH_PASSWORD` are set correctly, or that the `auth.username` / `auth.password` fields in config.yaml match the Spark History Server credentials.

`uvx` command not found

Install `uv` first with `curl -LsSf https://astral.sh/uv/install.sh | sh`, then reload your shell. Alternatively install the package directly with `uv tool install mcp-apache-spark-history-server` and run `spark-mcp`.

Frequently Asked Questions about Apache Spark History

What is Apache Spark History?

Apache Spark History is a Model Context Protocol (MCP) server that mcp server and cli for apache spark history server. debug spark applications from ai agents, scripts, or the terminal. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Apache Spark History?

Follow the installation instructions on the Apache Spark History GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Apache Spark History?

Apache Spark History works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Apache Spark History free to use?

Yes, Apache Spark History is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Databases MCP Servers

Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-apache-spark-history": { "command": "npx", "args": ["-y", "mcp-apache-spark-history"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Apache Spark History?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides