What is MCP-Ambari-API?
A Model Context Protocol (MCP) server for Apache Ambari that brings
natural language operations to Hadoop cluster management. Works with
Claude Desktop, Claude Code, OpenWebUI, or any MCP-compatible LLM client.
Stop juggling Ambari Web UI, curl commands, and SSH sessions. Just ask:
- "Show me the HDFS DFSAdmin report"
- "Restart YARN service in cluster TEST-AMBARI"
- "Which DataNodes have high heap memory usage in the last 30 minutes?"
- "List all current CRITICAL alerts grouped by service"
- "Compare NameNode and DataNode JVM memory over the past hour"
Why I built it
Day-to-day Ambari operations — checking service status, inspecting
configs across host groups, querying AMS metrics, diagnosing alerts —
require constant context switching between the Web UI, CLI, and
documentation. I wanted an LLM agent that could translate operator
intent into precise Ambari REST API calls, with proper safety guards
for destructive operations.
Key Features
- Service Operations: Start/stop/restart HDFS, YARN, Spark, HBase,
and other Hadoop services individually or in bulk
- Configuration Management: Unified
dump_configurations tool with
filtering, summarization, and bulk export across all config types
- AMS Metrics Intelligence: Catalog-driven exact-match queries
against Ambari Metrics Service with auto-discovery of appIds and
metric names
- HDFS DFSAdmin Reports: Generate
hdfs dfsadmin -report-style
capacity and DataNode summaries through natural language
- Alert Management: Unified tool for current and historical alerts
with state, scope, and time-range filtering
- Multi-Cluster Support: Configure multiple Ambari environments and
switch between them via MCP server entries
- Safety Guards: Bulk operations require confirmation, prompt
templates guide LLMs through risky commands
- Bearer Token Auth: Production-ready authentication for
streamable-http mode
- Flexible Transports: stdio for local Claude Desktop,
streamable-http for remote/Docker deployments
Installation
PyPI package available:
uvx --python 3.12 mcp-ambari-api
Claude Desktop config:
{
"mcpServers": {
"mcp-ambari-api": {
"command": "uvx",
"args": ["--python", "3.12", "mcp-ambari-api"],
"env": {
"AMBARI_HOST": "your-ambari-host",
"AMBARI_PORT": "8080",
"AMBARI_USER": "admin",
"AMBARI_PASS": "admin",
"AMBARI_CLUSTER_NAME": "TEST-AMBARI"
}
}
}
}
Or run the full Docker Compose stack with MCP-Server, MCPO Proxy, and
OpenWebUI in 5 minutes.
Tech Stack
- Python 3.12 + asyncio
- FastMCP framework
- Apache Ambari REST API (2.7+)
- stdio and streamable-http transports
- Available on PyPI, Docker Hub, and Smithery
Looking for Feedback
- Which additional Ambari areas should I cover next? (Kerberos config?
Stack/repo management? Service-specific deep dives?)
- How should destructive bulk operations (stop_all_services) be gated
beyond current confirmation prompts?
- Anyone running this against large production clusters — performance
feedback on AMS metric queries welcome
- Cross-version testing reports (Ambari 2.7 vs 3.0 edge cases)
Repo: https://github.com/call518/MCP-Ambari-API
PyPI: https://pypi.org/project/MCP-Ambari-API/
Smithery: https://smithery.ai/server/@call518/mcp-ambari-api
DeepWiki: https://deepwiki.com/call518/MCP-Ambari-API
⭐ Stars, issues, and PRs welcome. The codebase includes an
"Adding Custom Tools" guide for easy extension to your organization's
specific Hadoop monitoring needs.