Metadata-Version: 2.4
Name: spark-advisor-mcp
Version: 0.1.21
Summary: MCP server exposing spark-advisor tools for Claude Desktop and other MCP clients
Project-URL: Homepage, https://github.com/pstysz/spark-advisor
Project-URL: Repository, https://github.com/pstysz/spark-advisor
Project-URL: Issues, https://github.com/pstysz/spark-advisor/issues
Author: Pawel Stysz
License-Expression: Apache-2.0
Keywords: ai,apache-spark,claude,mcp,model-context-protocol,spark
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: mcp>=1.26
Requires-Dist: spark-advisor-analyzer==0.1.21
Requires-Dist: spark-advisor-cli==0.1.21
Requires-Dist: spark-advisor-hs-connector==0.1.21
Requires-Dist: spark-advisor-models==0.1.21
Requires-Dist: spark-advisor-parser==0.1.21
Requires-Dist: spark-advisor-rules==0.1.21
Description-Content-Type: text/markdown

# spark-advisor-mcp

MCP server exposing spark-advisor tools for Claude Desktop, Cursor, and other MCP clients. Part of the [spark-advisor](https://github.com/pstysz/spark-advisor) ecosystem.

## Install

```bash
pip install spark-advisor-mcp
```

## What it does

Provides 7 MCP tools via FastMCP (stdio transport) for AI-assisted Spark job analysis:

| Tool | Description |
|------|-------------|
| `analyze_spark_job` | Full analysis — rules engine + optional AI recommendations |
| `scan_recent_jobs` | List recent applications from History Server |
| `get_job_config` | Retrieve Spark configuration for a specific job |
| `suggest_config` | Generate optimized spark-defaults.conf |
| `explain_metric` | Explain a specific Spark metric or configuration parameter |
| `get_stage_details` | Detailed metrics for a specific stage |
| `compare_jobs` | Side-by-side comparison of two Spark jobs |

## Setup with Claude Desktop

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "spark-advisor": {
      "command": "spark-advisor-mcp",
      "env": {
        "SA_ANALYZER_AI__API_KEY": "sk-or-...",
        "SA_ANALYZER_AI__BASE_URL": "https://openrouter.ai/api/v1"
      }
    }
  }
}
```

See [full MCP setup guide](https://github.com/pstysz/spark-advisor/blob/main/docs/mcp-setup.md) for Cursor and Claude Code integration.

## Links

- [Main project](https://github.com/pstysz/spark-advisor)
- [MCP setup guide](https://github.com/pstysz/spark-advisor/blob/main/docs/mcp-setup.md)
- [Contributing](https://github.com/pstysz/spark-advisor/blob/main/CONTRIBUTING.md)

## License

Apache 2.0
