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 Serverwhat 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: Cloudera Iceberg 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.
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| database | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description does not disclose behavioral traits such as error conditions, permissions, or side effects. However, as a read-only introspection tool, the lack of detail is less critical.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with no fluff; front-loaded with the main action and resource. Every word adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema provided, the description does not need to detail return values. However, it omits any mention of error handling or prerequisites, which would be helpful for completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Despite 0% schema description coverage, the description adds meaning by specifying the parameters as a fully qualified name (`database.table`), clarifying how the two parameters combine to identify the resource.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Return column names, types, and comments for `database`.`table`', which specifies a precise verb and resource, and distinguishes from siblings like execute_query, get_table_sample, and list_tables.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus siblings or any prerequisites. The description only states what it does, not when to choose it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations given, so description carries full burden. It discloses that write operations are rejected in read-only mode and that row counts are limited. This is sufficient for understanding side effects and limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, no redundant words, and front-loads the core purpose before constraints. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 1 simple parameter and an output schema, the description covers purpose, constraints (read-only, row limit), and behavioral traits. It does not need to explain return values since output schema exists.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the only parameter 'query' is described only as 'HiveQL query'. While this adds some context, it does not elaborate on syntax, encoding, or examples, which would be helpful given low coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Execute' and the resource 'HiveQL query', and specifies the output format as 'list of row dicts'. This distinguishes it from sibling tools like 'describe_table' and 'list_tables', which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit constraints: read-only mode rejects write DDL/DML, and results are capped. It implies usage for running queries but does not explicitly contrast with siblings or specify when to use alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_sampleA
Preview the first limit rows of database.table (1..100).
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| table | Yes | ||
| database | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries the burden. It discloses the limit range (1-100) and that it returns the first rows, but does not specify ordering, permissions, or limitations of the preview.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that immediately conveys the function. It is front-loaded with the verb 'Preview' and includes key constraints (limit range) without wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (not shown), the description adequately explains input and behavior. It specifies the first rows and limit range, though it omits ordering details. For a simple preview tool, this is mostly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, the description adds meaning for the limit parameter (range 1-100) and shows database/table in syntax. However, it does not explain the semantics of database and table beyond their presence in the template.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool previews the first `limit` rows of a specified table, with a specific verb ('Preview') and resource. It differentiates from siblings like execute_query (full queries) and describe_table (schema).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives such as execute_query for more complex queries or describe_table for schema. The description implies quick preview usage but lacks explicit context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_databasesA
Retrieve all available databases in the Hive Virtual Warehouse.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It describes a benign read operation but lacks details such as whether the list is exhaustive or any potential performance implications. Adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence of 10 words, front-loaded with the action. Every word is purposeful with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter tool with an output schema, the description is sufficiently complete. It conveys the essential purpose without needing additional context or annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has zero parameters, and schema description coverage is 100%. Per guidelines, baseline for 0 params is 4. Description adds no param info, which is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Retrieve all available databases in the Hive Virtual Warehouse,' specifying the verb, resource, and context. It distinguishes itself from siblings like list_tables and describe_table.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for obtaining a list of databases. While it doesn't explicitly state when not to use or alternatives, the sibling tool names provide clear context for differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_tablesB
Retrieve all tables for a given database.
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It only states 'Retrieve' which implies a read operation, but lacks details on ordering, pagination, access control, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that gets to the point. It is well front-loaded, though could include more detail without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with an output schema, the description is minimally adequate. It does not explain what information is returned (e.g., table names, schema details), but the output schema may compensate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description does not elaborate on the 'database' parameter (e.g., whether it's a name or ID, required format). It adds no meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Retrieve all tables for a given database' with a specific verb and resource. It clearly distinguishes from sibling tools like 'describe_table' or 'list_databases' by specifying 'tables' and 'database'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance is provided. The description implies usage for listing tables, but does not compare to alternatives like 'describe_table' or 'execute_query'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
describe_table - First observed
execute_query - First observed
get_table_sample - First observed
list_databases - First observed
list_tables
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
- dataOAuthco.thinair
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables 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.214Apache 2.0
- 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
- AlicenseNot gradedqualityDmaintenanceEnables 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.3MIT
- AlicenseAqualityCmaintenanceProvides read-only SQL access to Apache Iceberg tables via HiveServer2, enabling querying, schema discovery, and database listing on Cloudera Data Platform.3Apache 2.0