Spark SQL MCP Server

Query Spark SQL clusters via Thrift/HiveServer2. Works with Spark, EMR, Hive, Impala.

Local serverstdio

What is the Spark SQL MCP Server?

Query Spark SQL clusters via Thrift/HiveServer2. Works with Spark, EMR, Hive, Impala.

What the server does

An MCP server that enables AI assistants to query Spark SQL clusters via the Thrift/HiveServer2 protocol.

  • Query Spark SQL — — Execute read-only SQL queries against your Spark cluster
  • Schema Discovery — — List databases, tables, and describe table structures
  • Multiple Auth Methods — — NONE, LDAP, NOSASL, CUSTOM, and Kerberos authentication
  • EMR Compatible — — Works with AWS EMR clusters out of the box
  • Read-Only Enforcement — — Only SELECT, SHOW, DESCRIBE, EXPLAIN, and WITH statements are allowed
  • Safety Defaults — — Automatic LIMIT clause on unbounded queries, sanitized error messages

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
list_databasesList all available databases
list_tablesList tables in a database
describe_tableGet table schema (columns, types)
execute_queryRun read-only SQL queries with formatted results

How to install the Spark SQL MCP Server

{
  "mcpServers": {
    "spark-sql": {
      "command": "uvx",
      "args": ["spark-sql-mcp-server"],
      "env": {
        "SPARK_HOST": "your-value",
        "SPARK_PORT": "your-value",
        "SPARK_AUTH": "your-value",
        "SPARK_DATABASE": "your-value",
        "SPARK_USERNAME": "your-value",
        "SPARK_PASSWORD": "your-value",
        "SPARK_KERBEROS_SERVICE_NAME": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
SPARK_HOSTEndpoint or connection string the server talks to.Optional
SPARK_PORTConfiguration value read at startup.Optional
SPARK_AUTHConfiguration value read at startup.Optional
SPARK_DATABASEConfiguration value read at startup.Optional
SPARK_USERNAMEConfiguration value read at startup.Optional
SPARK_PASSWORDConfiguration value read at startup.Optional
SPARK_KERBEROS_SERVICE_NAMEConfiguration value read at startup.Optional

Example prompts to try

  • “Use Spark SQL to list databases.”
  • “Use Spark SQL to list tables.”
  • “Use Spark SQL to describe table.”

Frequently asked questions

Query Spark SQL clusters via Thrift/HiveServer2. Works with Spark, EMR, Hive, Impala. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.