Query Spark SQL clusters via Thrift/HiveServer2. Works with Spark, EMR, Hive, Impala.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
An MCP server that enables AI assistants to query Spark SQL clusters via the Thrift/HiveServer2 protocol.
Works with any HiveServer2-compatible system: Apache Spark, AWS EMR, Hive, Impala, Presto.
Or run directly with uvx:
Global (all projects) β add to ~/.claude.json under your project's mcpServers:
Project-level β add to .claude/mcp.json in your repo:
Add to your claude_desktop_config.json:
Ask Claude things like:
sales.transactions table"| Tool | Description |
|---|---|
list_databases | List all available databases |
list_tables | List tables in a database |
describe_table | Get table schema (columns, types) |
execute_query | Run read-only SQL queries with formatted results |
SPARK_HOST=localhostA Docker Compose setup provides a local Spark Thrift Server with sample data for integration testing.
The local server comes with sample tables: default.employees, default.orders, and test_db.metrics.
Unit tests run by default with pytest (integration tests are skipped unless -m integration is specified).
With the Docker Spark server running, add it to your MCP config to test the server interactively.
Global β add to ~/.claude.json under your project's mcpServers:
Project-level β add to .claude/mcp.json:
Then start a new Claude Code session and ask it to query the sample data.
The execute_query tool only allows read-only SQL statements. Queries must start with one of: SELECT, SHOW, DESCRIBE, DESC, EXPLAIN, or WITH. All other statement types (DROP, INSERT, DELETE, CREATE, ALTER, SET, ADD JAR, etc.) are rejected before reaching the Spark cluster.
Database errors are sanitized before being returned to the MCP client. Internal details such as server hostnames, file paths, and stack traces are not exposed. Connection failures report only the target host/port and error type.
SparkConfig object masks passwords in its string representationSPARK_PASSWORD is marked as a secret in the MCP registry schemaSPARK_AUTH to LDAP or KERBEROS for authenticated environments.MIT
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/spark-sql)<a href="https://allmcps.com/mcp/spark-sql"><img src="https://allmcps.com/api/badge/spark-sql?style=directory" alt="Spark SQL on AllMCPs" /></a>