Skip to main content
Glama
avelloal

Apache Hive MCP Server

by avelloal

Apache Hive MCP Server

Un servidor MCP para Apache Hive (HiveServer2), construido con FastMCP. Se conecta a cualquier endpoint compatible con HiveServer2 — Apache Hive de código abierto, Cloudera CD P Base o Cloudera CD P Public Cloud (CDW) — y expone dos herramientas de solo lectura que un agente LLM puede invocar.


Resumen del proyecto

  • Qué es — un servidor protocolo Model Context Protocol que permite a un agente LLM consultar Apache Hive: enumerar tablas y ejecutar SQL de solo lectura, con resultads devueltos as JSON.

  • Paridad de funccionalidades — es un espejo del Impala/Iceberg MCP server de Cloudera: las mismas herramientas execute_query + get_schema y estructura, con la capa de conexión reemplazada por HiveServer2 mediante impyla.

  • Funcciona en todos los lugares donde funciona HiveServer2 — Apache Hive de código abierto, P CDP Base (Kerberos/LDAP) y CDP Public Cloud / CDW (Knox, LDAP sobre HTTPS). Autentication, transporte y TLS se controlde con variables de entterno HIVE_*.

  • Seguro por defectexecute_query impone un prefijo de guarda de solo lectura (SELECT/SHOW/DESCRIBE/WITH); las operaciones de textur y DDL se rechazan antes de abrir una a conexión.

  • Transportestdio (predeterminado), http (predeterminado), http), sse, seleccionado vía MCP_TRANSPORT.

  • Pila tecnológica — Python ≥3.10, FastMCP, impyla, uv. 11 pruebas (con conexión called simulada — no se requiera Hive real).


Related MCP server: Cloudera Iceberg MCP Server

Herramientas

Tool

Signature

Descripción

execute_query

execute_query(query: str) -> str

Ejecuta una consulta SQL de solo lectura (SELECT, SHOW, DESCRIBE, WITH) y devuelve results as un array JSON de objetos con clave por columna. Las operación de escritura se rechazan un string de error.

get_schema

get_schema() -> str

Ejecuta SHOW TABLES contra si database de datos configurada y devuelve una lista de string con the table list.


Configuración

toda la config ur via variables de env (or a file .env in the project root).*

Variable

Valor predeterminado

Descripción

HIVE_HOST

localhost

Hostname or IP de HiveServer2

V V

`local...

HIVE_PORT

10000

Puerto de HiveServer2

HIVE_DATABASE

default

Base and the database to the conex

HIVE_USER

(vacío)

Usuario (delelo vacío for NOSASL/Kerberos)

HIVE_PASSWORD

(vacío)

Contraseña (utila with PLAIN/LDAP)

IVE_AUTH_MECANISM

PLAIN

Método de autircación NOSA, PLAIN, LDAP, GSSAPI

HIVE_USE_HTTP_TRANSPORT

false

Use of HTTP transport vs. thrift binaria

HIVE_HTP_PATH

clis vertical

Path HTTP when HIVE_USE_HTTP_TRANSPORT=true

HIVE_USE_SEL

false

SSL activo for all the connexion thrift

HIVE_KERBEROS_SERVCE_NAME

hive

SE principal name for Kerberos (solo GSSAPI)

MCP_TRANSPORT

stdio

MCP transport: stdio, http o sse

Copia .env.example a .env and fill los values.


Ajustes predeinidos de despliegue

"de local" para all descriptors: " development (Docker HiveServer2)"

HIVE_HOST=localhost
HIVE_PORT=10000
HIVE_DATABASE=default
HIVE_AUTH_MECHANISM=NOSASL
MCP_TRANSPORT=stdio

CDP Public Cloud (CDW Virtual Warehuse)

HIVE_HOST=<coordinator-hostname>.dw.cloudera.site
HIVE_PORT=443
HIVE_DATABASE=default
HIVE_USER=<workload-username>
HIVE_PASSWORD=<workload-password>
HIVE_AUTH_MECHANISM=LDAP
HIVE_USE_HTTP_TRANSPORT=true
HIVE_HTTP_PATH=cliservice
HIVE_USE_SSL=true
MCP_TRANSPORT=stdio

CDP Base / on-premises con Kerberos

HIVE_HOST=<hiveserver2-host.example.com>
HIVE_PORT=10000
HIVE_DATABASE=default
HIVE_AUTH_MECHANISM=GSSAPI
HIVE_KERBEROS_SERVICE_NAME=hive
MCP_TRANSPORT=stdio

Obtén un ticket de Kerberos (kinit) before iniciar el servidor.


Ejecución

# Install
pip install -e .
# or with uv:
uv sync

# Copy and edit config
cp .env.example .env

# Start (stdio transport, for use with an MCP host)
uv run hive-mcp-server

Configuración del client MCP

Los hosts MCP (Claude Desktop, Cloudera AI Agent Studio, etc.) registran servidores with a mcpServers JSON block. uvx ejecuta este servidor directamente desde GitHub — no no local install, no publishing en PyPI. Fill in — "Complet los values HIVE_* de tu enterno (see Configuración and los presets anteriores).

{
    "mcpServers": {
        "Hive": {
            "command": "uvx",
            "args": [
                "--from",
                "git+https://github.com/avelloal/hive-mcp-server@v0.1.0",
                "hive-mcp-server"
            ],
            "env": {
                "HIVE_HOST": "<coordinator-hostname>.dw.cloudera.site",
                "HIVE_PORT": "443",
                "HIVE_DATABASE": "default",
                "HIVE_USER": "<workload-username>",
                "HIVE_PASSWORD": "<workload-password>",
                "HIVE_AUTH_MECHANISM": "LDAP",
                "HIVE_USE_HTTP_TRANSPORT": "true",
                "HIVE_HTTP_PATH": "cliservice",
                "HIVE_USE_SSL": "true"
            }
        }
    }
}

El example above is aimed at CDP Public Cloud / CDW. For targets locales o Kerberos, cambia values env utilizo "prestes anteriores". @v0.1.0 fija un release — drop the shoe to follow the last or bump it for a newer.

Para Cloudera AI Agent Studio in particular (empas de registro, format de values, limit notes of stdio/uvx), see examples/agent-studio/.


Prueba de humo

  1. un HiveServer2 local (e.g. Apache Hive Dock):

    docker run -d -p 10000:10000 apache/hive:3.1.3
  2. Configura .env with local prest in above.

  3. Inicia el servidor:

    uv run hive-mcp-server
  4. En una segund terminal, use the fastmcp dev inspector of any client MCP to call could both herramientas:

    • get_schema() — debe devolver [] o una lista de names

    • execute_query("SHOW DATABASES") — devolver' valid.


Licencia

Apache License 2.0 — see LICENSE.

Install Server
F
license - not found
A
quality
A
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables read-only access to Apache Iceberg tables via Impala, allowing LLMs to inspect database schemas and execute SQL queries to retrieve data from Iceberg tables.
    2
    13
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to interact with Hadoop Hue for executing SQL queries using Hive, SparkSQL, or Impala and managing HDFS files. It supports directory browsing, file transfers, and exporting query results to CSV through the Model Context Protocol.
    8
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to query and explore schemas in Microsoft Fabric lakehouses, warehouses, and SQL databases using natural language, with tools for executing read-only SQL queries and searching tables, columns, and query patterns.
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…

  • Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.

  • Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/avelloal/hive-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server