Cloudera Hive MCP Server
This server provides an MCP interface to interact with a Cloudera Data Warehouse Virtual Warehouse (Hive), enabling database exploration and querying via five tools:
list_databases— Retrieve all available databases in the Hive Virtual Warehouse.list_tables— List all tables within a specified database.describe_table— Get schema details (column names, data types, and comments) for a specific table.get_table_sample— Preview the first N rows (1–100, default 10) of a table for quick data exploration.execute_query— Run HiveQL queries; read-only by default (DDL/DML rejected) with a configurable row limit (default 1,000 rows) for safety.
Allows interaction with a Cloudera Data Warehouse Virtual Warehouse (Hive), providing tools for listing databases and tables, describing table schemas, previewing data, and executing HiveQL queries (read-only by default).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cloudera Hive MCP Server what databases are available?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cloudera Hive MCP Server
A standard Model Context Protocol server that exposes a Cloudera Data Warehouse Virtual Warehouse (Hive) to any MCP client — Claude Desktop, Claude Code, the Claude Agent SDK, LangChain, LlamaIndex, Cline, Continue, etc.
Tools
Tool | Purpose |
| List every database in the Virtual Warehouse. |
| List tables in a given database. |
| Return columns, types, and comments for a table. |
| Preview the first N rows (1–100) of a table. |
| Run a HiveQL query. Read-only by default; row-capped for safety. |
Related MCP server: Apache Hive MCP Server
Prerequisites
Python 3.10+
Network access to your Cloudera Virtual Warehouse (typically
*.dw.cloudera.site:443)A workload user + password with query privileges on the target VW
Recommended install: uvx from Git (zero-setup for clients)
uvx is the Python analog of npx. It fetches the package, resolves its
dependencies into an isolated cache, and runs the entry point — no clone,
no venv, no pip install on the client machine.
One-time on the client machine — install uv (ships uvx):
curl -LsSf https://astral.sh/uv/install.sh | sh # macOS / Linux
# Windows: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"Then any MCP client can launch this server with:
uvx --from git+https://github.com/mjain/hive-mcp-server hive-mcp-server(replace the Git URL with your fork / internal mirror)
Environment variables
The server needs Hive credentials in its environment. Every MCP client config
below sets them via an env block — no .env file needed on the client.
Variable | Default | Description |
| (required) | Virtual Warehouse hostname |
|
| HTTPS port |
|
| HiveServer2 HTTP path |
| (required) | Cloudera workload user |
| (required) | Cloudera workload password |
|
| If true, |
|
| Max rows returned by |
|
| Transport passed to |
Client setup
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"hive": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/mjain/hive-mcp-server",
"hive-mcp-server"
],
"env": {
"HIVE_HOST": "your-vw-host.dw.cloudera.site",
"HIVE_USERNAME": "your-workload-user",
"HIVE_PASSWORD": "your-workload-password",
"HIVE_READ_ONLY": "true"
}
}
}
}Fully quit Claude Desktop (⌘Q) and reopen. The five Hive tools appear in the tool tray.
Claude Code CLI
claude mcp add hive \
--env HIVE_HOST=your-vw-host.dw.cloudera.site \
--env HIVE_USERNAME=your-workload-user \
--env HIVE_PASSWORD=your-workload-password \
-- uvx --from git+https://github.com/mjain/hive-mcp-server hive-mcp-serverAdd -s user before hive to make it available in every project.
Claude Agent SDK (Python)
# pip install claude-agent-sdk
import asyncio
from claude_agent_sdk import query, ClaudeAgentOptions
async def main():
options = ClaudeAgentOptions(
mcp_servers={
"hive": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/mjain/hive-mcp-server",
"hive-mcp-server",
],
"env": {
"HIVE_HOST": "your-vw-host.dw.cloudera.site",
"HIVE_USERNAME": "your-workload-user",
"HIVE_PASSWORD": "your-workload-password",
"HIVE_READ_ONLY": "true",
},
}
},
allowed_tools=[
"mcp__hive__list_databases",
"mcp__hive__list_tables",
"mcp__hive__describe_table",
"mcp__hive__get_table_sample",
"mcp__hive__execute_query",
],
)
async for msg in query(
prompt="List all Hive databases, then describe the largest table in the first one.",
options=options,
):
print(msg)
asyncio.run(main())The same {command, args, env} shape works for LangChain's MCP adapter,
LlamaIndex, Cline, Continue, Zed, and every other MCP client.
Local development
Clone and install in editable mode when working on the server itself:
git clone <this repo>
cd hive-mcp-server-claude
python -m venv .venv
source .venv/bin/activate
pip install -e .
cp .env.example .env # fill in credentials
hive-mcp-server # runs on stdio; Ctrl-C to stopSmoke-test the connection:
python -c "from hive_mcp_server.tools.hive_tools import list_databases; print(list_databases())"Code layout
The server follows the same pattern as
cloudera/iceberg-mcp-server:
src/hive_mcp_server/
├── __init__.py # version + main/mcp re-exports
├── server.py # thin MCP registration layer (@mcp.tool wrappers)
└── tools/
├── __init__.py
└── hive_tools.py # config, connection, SQL safety, tool logicTo add a new tool: implement it in tools/hive_tools.py, then add a
matching @mcp.tool() wrapper in server.py whose docstring becomes the
tool description exposed to the LLM.
Transport
By default the server runs on stdio, which is what all MCP clients
(Claude Desktop, Claude Code, etc.) expect. To use the MCP Inspector web
UI instead:
MCP_TRANSPORT=sse hive-mcp-serverPublishing your own fork
Push to any Git host — clients reference the URL:
git init && git add . && git commit -m "initial"
git remote add origin https://github.com/<you>/hive-mcp-server
git push -u origin mainThen everyone points their uvx --from git+... at your URL. To publish to
PyPI so clients can just say uvx hive-mcp-server (no --from):
pip install build twine
python -m build
twine upload dist/*Safety
HIVE_READ_ONLY=true(default) —execute_queryrejectsINSERT / UPDATE / DELETE / DROP / ALTER / TRUNCATE / CREATE / REPLACE / MERGE / GRANT / REVOKE / MSCK / LOAD / EXPORT / IMPORT.HIVE_QUERY_ROW_LIMIT=1000— capsexecute_queryresults so aSELECT *on a billion-row table doesn't blow up the agent's context.Identifier validation —
databaseandtablearguments must match[A-Za-z_][A-Za-z0-9_]*; anything else is rejected before reaching Hive.No credentials in tool arguments — the connection is configured entirely through environment variables; agents cannot see or override them.
License
MIT.
Available Tools
5 toolsdescribe_tableA
Return column names, types, and comments for database.table.
Inputs: table (required), database (required). Returns: result
execute_queryA
Execute a HiveQL query and return results as a list of row dicts.
When HIVE_READ_ONLY is true (the default), write DDL/DML is rejected. Results are capped at HIVE_QUERY_ROW_LIMIT rows.
Inputs: query (required). Returns: result
get_table_sampleA
Preview the first limit rows of database.table (1..100).
Inputs: table (required), database (required), limit. Returns: result
list_databasesA
Retrieve all available databases in the Hive Virtual Warehouse.
Inputs: no named parameters. Returns: result
list_tablesB
Retrieve all tables for a given database.
Inputs: database (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct responsibility: describing table schema, executing queries, sampling data, listing databases, and listing tables. No two tools overlap in purpose, ensuring clear selection.
All tools use a consistent verb_noun pattern in snake_case (e.g., describe_table, execute_query). This makes the toolset predictable and easy to navigate.
With 5 tools, the server covers core Hive operations without being bloated or sparse. Each tool serves a necessary function for a read-only Hive interface.
The tools provide fundamental read-only capabilities: schema discovery, data preview, and query execution. A minor gap is the lack of tools for obtaining table statistics or partition info, but the set is largely complete for its purpose.
Maintenance
Related MCP Connectors
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Amazon Ads, Seller Central, Vendor Central and AMC data for AI agents. Read-only by default.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Access Pollinations models and API capabilities through agent tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides read-only access to Iceberg tables via Apache Impala, enabling LLMs to inspect database schemas and execute SQL queries on Iceberg data.Apache 2.0
- FlicenseAqualityCmaintenanceEnables LLM agents to query Apache Hive/HiveServer2 by listing tables and running read-only SQL, with results returned as JSON.2-
- FlicenseNot gradedqualityCmaintenanceEnables LLM agents to explore and query a Postgres database through secure, read-only tools.-
- AlicenseAqualityCmaintenanceEnables AI agents to safely query and explore Apache Impala clusters with read-only SQL, metadata, statistics, cluster overview, and analysis prompt templates.17Apache 2.0