Spark Sql Mcp Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Spark Sql Mcp Server (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<!-- mcp-name: io.github.aidancorrell/spark-sql-mcp-server -->
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.
pip install spark-sql-mcp-serverOr run directly with uvx:
uvx spark-sql-mcp-serverexport SPARK_HOST="your-emr-master-node.amazonaws.com"
export SPARK_PORT="10000" # default
export SPARK_DATABASE="default" # default
export SPARK_AUTH="NONE" # NONE | LDAP | KERBEROS | CUSTOM | NOSASLGlobal (all projects) — add to ~/.claude.json under your project's mcpServers:
{
"mcpServers": {
"spark-sql": {
"command": "uvx",
"args": ["spark-sql-mcp-server"],
"env": {
"SPARK_HOST": "your-emr-master-node.amazonaws.com",
"SPARK_PORT": "10000",
"SPARK_AUTH": "NONE"
}
}
}
}Project-level — add to .claude/mcp.json in your repo:
{
"mcpServers": {
"spark-sql": {
"command": "uvx",
"args": ["spark-sql-mcp-server"],
"env": {
"SPARK_HOST": "your-emr-master-node.amazonaws.com",
"SPARK_PORT": "10000",
"SPARK_AUTH": "NONE"
}
}
}
}Add to your claude_desktop_config.json:
{
"mcpServers": {
"spark-sql": {
"command": "uvx",
"args": ["spark-sql-mcp-server"],
"env": {
"SPARK_HOST": "your-emr-master-node.amazonaws.com",
"SPARK_PORT": "10000"
}
}
}
}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 |
export SPARK_AUTH="NONE"export SPARK_AUTH="LDAP"
export SPARK_USERNAME="your-username"
export SPARK_PASSWORD="your-password"export SPARK_AUTH="KERBEROS"
export SPARK_KERBEROS_SERVICE_NAME="hive" # default
# Ensure you have a valid Kerberos ticket (kinit) ssh -i your-key.pem -L 10000:localhost:10000 hadoop@your-emr-masterSPARK_HOST=localhostgit clone https://github.com/aidancorrell/spark-sql-mcp-server.git
cd spark-sql-mcp-server
pip install -e ".[dev]"
pytest
ruff check .A Docker Compose setup provides a local Spark Thrift Server with sample data for integration testing.
# Start the Spark Thrift Server
cd docker && docker compose up -d
# Wait for it to be ready (takes ~30s on first start)
docker logs -f spark-thrift-server # look for "Sample data loaded."
# Run integration tests
pytest -m integration -v
# Tear down
cd docker && docker compose down -vThe 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).
#### Using the local server with Claude Code
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:
{
"spark-sql": {
"command": "uvx",
"args": ["spark-sql-mcp-server"],
"env": {
"SPARK_HOST": "localhost",
"SPARK_PORT": "10000",
"SPARK_AUTH": "NONE"
}
}
}Project-level — add to .claude/mcp.json:
{
"mcpServers": {
"spark-sql": {
"command": "uvx",
"args": ["spark-sql-mcp-server"],
"env": {
"SPARK_HOST": "localhost",
"SPARK_PORT": "10000",
"SPARK_AUTH": "NONE"
}
}
}
}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
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.