MCP-Ambari-API
Read-only MCP server for inspecting Apache Ambari clusters and Ambari Metrics data.
Retrieve cluster information, service lists/status, service components, and service details.
Inspect active requests, request status/progress, and per-host request task breakdowns.
List hosts and get detailed host information, including components and hardware/status data.
List Ambari users and retrieve details for a specific user.
Query current and historical alerts, with filters for service, host, state, definition, maintenance state, and time range.
Introspect Ambari service configurations in bulk or for a specific configuration type.
Discover Ambari Metrics app IDs, metric metadata, and common metric catalogs.
Fetch exact-name Ambari Metrics time-series data with duration, host grouping, and aggregation options.
Generate HDFS
dfsadmin-style capacity and DataNode reports.This schema exposes only
get_*read-only tools; no state-changingset_*write tools are listed.
Provides comprehensive management of Apache Hadoop clusters through Ambari API, enabling service control (start/stop/restart HDFS, YARN, Spark, etc.), configuration management, real-time monitoring, alert management, host administration, and user management via natural language commands.
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., "@MCP-Ambari-API show me the status of all HDFS services"
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.
MCP Ambari API
Manage and inspect Apache Ambari clusters from Claude Desktop, OpenWebUI, or any MCP client.
MCP Ambari API turns common Hadoop operations into MCP tools. It can inspect cluster health, services, hosts, alerts, configurations, requests, and Ambari Metrics data, and can perform service operations with safety guidance for high-impact actions.
Example requests:
“Show the current status of every service.”
“List critical Ambari alerts and their affected hosts.”
“Generate an HDFS capacity report.”
“Find NameNode heap metrics available in AMS.”
“Restart HDFS after showing me the affected components.”
More requests to try: see Example queries by area for cluster and services, service operations, requests and tasks, hosts, configurations, users, alerts, and metrics.
Quick start
Choose one installation method. MCPB is the shortest path for Claude Desktop; Docker Compose provides the full OpenWebUI, MCP server, and optional MCPO stack.
Claude Desktop with MCPB
Prerequisites:
Claude Desktop for macOS or Windows with MCPB extension support
Network access from the desktop to the Ambari server and, when used, the Ambari Metrics collector
Download
mcp-ambari-api-<version>.mcpbfrom the latest GitHub Release.In Claude Desktop, open Settings → Extensions → Advanced settings → Install Extension….
Select the downloaded bundle.
Enter the Ambari host, port, username, password, cluster name, and Metrics collector settings. The password is declared as a sensitive field.
Ask a read-only verification question such as “Show the Ambari cluster status.”
The bundle uses stdio transport, uv, and Python 3.12; it does not expose a
listening port.
MCPB settings are stored by the desktop host and are not written into this
repository.
OpenWebUI with Docker Compose
Prerequisites:
Docker Engine with Docker Compose
A reachable Ambari cluster
An OpenWebUI model provider and a model that supports tool calling
git clone https://github.com/call518/MCP-Ambari-API.git
cd MCP-Ambari-API
cp .env.example .env
cp mcp-config.json.http mcp-config.json.http.local
chmod 600 .env mcp-config.json.http.localEdit .env with the Ambari connection values. If remote MCP authentication is
enabled, replace <REMOTE_SECRET_KEY> in both .env and
mcp-config.json.http.local with the same strong secret.
docker compose up -d
docker compose psDefault host endpoints:
Service | URL | Purpose |
OpenWebUI |
| Chat interface |
MCP server |
| Direct Streamable HTTP MCP |
MCPO |
| Optional OpenAPI compatibility layer |
The published ports bind to 127.0.0.1 by default. Set
DOCKER_BIND_ADDRESS only when remote access is required, and enable
authentication plus TLS at the network boundary before exposing the services.
Configure OpenWebUI
Open http://localhost:3001, create the administrator account, and configure a
model provider under Settings → Admin → Connections. For OpenAI, add a
connection with these values:
Field | Value |
URL |
|
Auth |
|
API key | Your OpenAI API key |
API Type |
|
Chat Completions must be used with the Quick Start's default
DEFAULT_MODEL_PARAMS={"reasoning_effort":"none"} setting. To use an OpenAI
reasoning model with reasoning enabled instead, set DEFAULT_MODEL_PARAMS={}
before the first start, select Responses, and leave Reasoning Effort at
Default in the global, per-model, and chat settings. Mixing Responses
with reasoning_effort=none, or Chat Completions with another reasoning
effort, can cause tool calls to fail.
Confirm that the model appears in a new chat, then add one of the following external tool-server connections under Settings → Admin → Tools → Integrations.
Option A: Direct MCP (recommended)
Add a connection of type MCP (Streamable HTTP) using the URL visible from the
OpenWebUI container:
http://mcp-server:8000/mcpUse http://localhost:18001/mcp only from a client running on the Docker host.
Use authentication None unless REMOTE_AUTH_ENABLE=true; when authentication
is enabled, use Bearer with the configured REMOTE_SECRET_KEY.
Option B: MCPO (OpenAPI)
Add a connection of type OpenAPI with this URL:
http://mcpo-proxy:8000/mcp-ambari-apiMCPO is not required for OpenWebUI; it remains in the standard stack for
OpenAPI-compatible clients. Use the Compose service URLs above rather than
localhost because OpenWebUI resolves them from inside its container.
To start without MCPO:
docker compose up -d mcp-server open-webuiOther installation methods
PyPI with uvx
{
"mcpServers": {
"mcp-ambari-api": {
"command": "uvx",
"args": ["--python", "3.12", "mcp-ambari-api"],
"env": {
"AMBARI_HOST": "ambari.example.com",
"AMBARI_PORT": "8080",
"AMBARI_USER": "<AMBARI_USER>",
"AMBARI_PASS": "<AMBARI_PASSWORD>",
"AMBARI_CLUSTER_NAME": "<AMBARI_CLUSTER_NAME>",
"MCP_LOG_LEVEL": "INFO"
}
}
}
}Remote Streamable HTTP
{
"mcpServers": {
"mcp-ambari-api": {
"type": "streamable-http",
"url": "https://mcp.example.com/mcp",
"headers": {
"Authorization": "Bearer <REMOTE_SECRET_KEY>"
}
}
}
}Related MCP server: Ambari MCP Server
Capabilities
Cluster, service, component, host, request, user, alert, and configuration inspection
Service, all-services, and host component start, stop, and restart
HDFS
dfsadmin-style capacity and DataNode reportsLive Ambari Metrics metadata discovery and exact-name time-series queries
stdio and Streamable HTTP transports
Optional bearer authentication for Streamable HTTP
Cross-tool safety and reporting rules are sent to clients as MCP server
instructions from
server_instructions.md. Tool availability
can evolve, so MCP clients should use tools/list rather than relying on a
copied static tool list.
Read and write tools
Kind | Name prefix | MCP annotations | Tag | Behavior |
Read |
|
|
| Sends only GET requests to Ambari and AMS |
Write |
|
|
| Changes cluster state |
Write tools take action = start, stop, or restart:
set_service_state, set_all_services_state, and set_host_component_state.
Read-only mode is on by default: write tools are not listed and calls to them
are rejected. To enable write tools, set MCP_READ_ONLY=false or pass
--read-write; in Claude Desktop (MCPB), turn off Read-only mode.
Configuration
CLI arguments take precedence over environment variables, which take precedence over defaults.
Server settings
Variable | Default | Description |
|
|
|
|
| HTTP bind address |
|
| HTTP listen port |
|
| Log level |
|
| Enable HTTP bearer authentication |
| empty | Required when authentication is enabled |
|
| Expose only read tools ( |
CLI equivalents are --type, --host, --port, --auth-enable /
--auth-disable, --secret-key, and --read-only / --read-write.
Ambari settings
Variable | Default | Description |
|
| Ambari server host |
|
| Ambari server port |
|
| Ambari username |
|
| Ambari password |
|
| Default target cluster |
| Ambari host | Metrics collector host |
|
| Metrics collector port |
|
| Metrics collector protocol |
|
| Metrics request timeout in seconds |
Metrics workflow
Ambari metric names are exact identifiers rather than natural-language labels. Use this sequence:
Call
get_ambari_metric_appsto discover valid app IDs.Call
get_common_metrics_catalogorget_ambari_metrics_metadatato find an exact metric name.Call
get_ambari_metricswith an explicitapp_idand exact metric name.
Example:
get_ambari_metrics(
metric_names="jvm.JvmMetrics.MemHeapUsedM",
app_id="namenode",
duration="1h",
group_by_host=true
)Safety and security
Keep
.envandmcp-config.json.http.localoutside Git. The tracked files contain placeholders only.Use a unique, strong
REMOTE_SECRET_KEY; never reuse an Ambari password as the MCP bearer token.Plain HTTP does not protect credentials in transit. Use a TLS reverse proxy for remote access.
Keep unauthenticated development services bound to localhost.
Write tools are disabled by default. Enable them (
MCP_READ_ONLY=false) only where service operations are needed, and reviewset_*tool calls (start, stop, restart) before approving them in the MCP client.
Compatibility
Python
3.12.xMCP stdio and Streamable HTTP transports
Claude Desktop MCPB through the UV runtime
Docker Compose stack with OpenWebUI
0.13.3Apache Ambari environments that expose the Ambari REST API; exact behavior can vary by Ambari and Hadoop component version
Troubleshooting
OpenAI reasoning model rejects tool calls
The connection's API Type and Reasoning Effort must match:
Setup | API Type | Reasoning Effort |
Quick Start default |
|
|
Reasoning with tools |
|
|
The Compose example seeds the Quick Start default into OpenWebUI with:
DEFAULT_MODEL_PARAMS={"reasoning_effort":"none"}OpenWebUI stores this value in its database on first startup. For an existing
open-webui-data volume, set Reasoning Effort to none in the Admin UI or
per-model settings instead. Per-chat settings can override both. Do not delete
the data volume as a troubleshooting shortcut. If using Responses, remove
the parameter from the global, per-model, and chat settings and leave Reasoning
Effort at Default. Remove the global parameter if the selected provider does
not support it.
MCPO returns 401 Unauthorized
Check, without printing the secret itself:
REMOTE_AUTH_ENABLEin.env.Whether
REMOTE_SECRET_KEYis set.Whether
mcp-config.json.http.localstill contains the placeholder.Whether its bearer token matches the server secret.
Whether the MCPO container was recreated after the change.
An error emitted while cleaning up the connection can follow the initial 401; diagnose the first HTTP error first.
Direct MCP works but MCPO fails
These are separate client paths. Verify the direct endpoint
http://mcp-server:8000/mcp and the MCPO-mounted local config independently.
Ambari connection fails
Verify host reachability from the process or container, Ambari credentials,
cluster name spelling, and the server port. localhost inside a container is
the container itself; use host.docker.internal for a service on the Docker
host.
Development
Install and run with the existing uv project:
uv sync --dev
uv run ruff check src tests scripts
uv run pytestRun MCP Inspector against local source:
./run-mcp-inspector-local.shBuild a local MCPB using a canonical semantic version:
scripts/build-mcpb.sh 0.0.0 /tmp/mcp-ambari-api-mcpb
unzip -l /tmp/mcp-ambari-api-mcpb/mcp-ambari-api-0.0.0.mcpbTagged releases build the wheel, source distribution, and MCPB. Publication to TestPyPI and PyPI completes before the GitHub Release is created with the MCPB attached.
Contributing
Keep changes focused, add tests for behavior changes, and verify documentation commands against the current configuration. Open an issue before making a breaking public API or configuration change.
License
Available Tools
20 toolsget_active_requestsARead-only
Retrieves currently active (in progress) requests/operations in an Ambari cluster. Shows running operations, in-progress tasks, pending requests.
[Tool Role]: Dedicated tool for monitoring currently running Ambari operations
[Core Functions]:
Retrieve active/running Ambari operations (IN_PROGRESS, PENDING status)
Show real-time progress of ongoing operations
Monitor current cluster activity
[Required Usage Scenarios]:
When users ask for "active requests", "running operations", "current requests"
When users ask for "request list", "operation list", "task list"
When users want to see "current tasks", "running tasks", "in progress operations"
When users mention "running", "in progress", "current activity"
When users ask about Ambari requests, operations, or tasks
When checking if any operations are currently running
Returns: Active requests information (success: active request list, failure: error message)
Inputs: no named parameters. Returns: result
get_alerts_historyARead-only
Retrieve current alerts or alert history from Ambari cluster.
[Tool Role]: Unified tool for retrieving both current/active alert status and historical alert events from Ambari cluster
[Core Functions]:
Current mode: Retrieve current alerts for entire cluster, specific service, or specific host
History mode: Retrieve alert history for entire cluster, specific service, or specific host
Support filtering by alert state (CRITICAL, WARNING, OK, UNKNOWN)
Support filtering by definition name
Current mode: Support filtering by maintenance state (ON, OFF)
History mode: Support filtering by time range with from_timestamp/to_timestamp
Support different output formats (detailed, summary, compact, groupedSummary for current)
History mode: Provide pagination support for large datasets
Provide current time context for LLM natural language time calculations
[Required Usage Scenarios]:
Current mode: When users request current alerts, active alerts, or alert status
Current mode: When monitoring immediate cluster health
Current mode: When investigating current issues or troubleshooting active problems
History mode: When users request alert history, past alerts, or historical alert data
History mode: When monitoring alert trends or analyzing alert patterns
History mode: When investigating past alert incidents or troubleshooting
When users mention alert status, current problems, cluster health, alert events, alert timeline, or alert logs
Inputs: mode, limit, format, host_name, +10 more. Returns: result
get_ambari_metric_appsGet Ambari Metric AppsBRead-only
Return discovered AMS appIds, optionally with metric counts.
Inputs: limit, refresh, include_counts. Returns: result
get_ambari_metricsGet Ambari MetricsCRead-only
Fetch time-series metrics (exact metric names only) from Ambari Metrics.
Inputs: metric_names (required), app_id, duration, end_time, +8 more. Returns: result
get_ambari_metrics_metadataGet Ambari Metrics MetadataCRead-only
Retrieve metric metadata from Ambari Metrics service with optional filters.
Inputs: limit, app_id, search, host_filter, +2 more. Returns: result
get_cluster_infoARead-only
Retrieves basic information for an Ambari cluster.
[Tool Role]: Dedicated tool for real-time retrieval of overall status and basic information for an Ambari cluster.
[Core Functions]:
Retrieve cluster name, version, provisioning state, and security type
Provide formatted output for LLM automation and cluster monitoring
[Required Usage Scenarios]:
When users request cluster info, status, or summary
When monitoring cluster health or auditing cluster properties
When users mention cluster overview, Ambari cluster, or cluster details
Returns: Cluster basic information (success: formatted info, failure: English error message)
Inputs: no named parameters. Returns: result
get_cluster_servicesARead-only
Retrieves the list of services with status in an Ambari cluster.
[Tool Role]: Dedicated tool for real-time retrieval of all running services and basic status information in an Ambari cluster
[Core Functions]:
Retrieve cluster service list with status via Ambari REST API
Provide service names, current state, and cluster information
Include detailed link information for each service
Display visual indicators for service status
[Required Usage Scenarios]:
When users mention "service list", "cluster services", "Ambari services"
When cluster status check is needed
When service management requires current status overview
When real-time cluster information is absolutely necessary
[Absolutely Prohibited Scenarios]:
General Hadoop knowledge questions
Service installation or configuration changes
Log viewing or performance monitoring
Requests belonging to other cluster management tools
Returns: Cluster service list with status information (success: service list with status, failure: error message)
Inputs: no named parameters. Returns: result
get_common_metrics_catalogGet Common Metrics CatalogCRead-only
List supported metrics per appId (exact names only).
Inputs: limit, app_id, search, min_score, +1 more. Returns: result
get_configurationsGet ConfigurationsCRead-only
Unified configuration introspection tool (supersedes list_configurations & dump_all_configurations).
Inputs: limit, filter, max_chars, summarize, +3 more. Returns: result
get_current_alertsARead-only
Retrieve current alerts from Ambari cluster.
DEPRECATED: This function is deprecated in favor of get_alerts_history with mode="current". This wrapper is maintained for backward compatibility.
Inputs: format, host_name, cluster_name, service_name, +3 more. Returns: result
get_hdfs_dfsadmin_reportGet HDFS DFSAdmin ReportBRead-only
Produce a DFSAdmin-style capacity and DataNode report using Ambari metrics.
Inputs: cluster_name, lookback_minutes. Returns: result
get_host_detailsARead-only
Retrieves detailed information for a specific host or all hosts in the Ambari cluster.
[Tool Role]: Dedicated tool for retrieving comprehensive host details including metrics, hardware info, and components.
[Core Functions]:
If host_name provided: Query specific host information
If host_name not provided: Query all hosts and their detailed information
Return host hardware specs, state, metrics, and assigned components
Provide formatted output for LLM automation and cluster management
[Required Usage Scenarios]:
When users request specific host details or host status
When users request all hosts details or cluster-wide host information
When auditing or monitoring individual or all cluster nodes
When troubleshooting host-specific issues
Inputs: host_name. Returns: result
get_hostsBRead-only
Retrieves the list of hosts in the Ambari cluster.
[Tool Role]: Dedicated tool for listing all hosts registered in the Ambari cluster.
[Core Functions]:
Query Ambari REST API for host list
Return host names and API links
Provide formatted output for LLM automation and cluster management
[Required Usage Scenarios]:
When users request cluster host list or host details
When auditing or monitoring cluster nodes
Returns: List of hosts (success: formatted list, failure: error message)
Inputs: no named parameters. Returns: result
get_request_statusARead-only
Retrieves the status and progress of a specific Ambari request operation.
[Tool Role]: Dedicated tool for real-time tracking and reporting of Ambari request status.
[Core Functions]:
Query the status, progress, and context of a request by its ID
Provide detailed status (PENDING, IN_PROGRESS, COMPLETED, FAILED, etc.)
Show progress percentage and timing information
Return actionable status for automation and LLM integration
[Required Usage Scenarios]:
When users ask for the status or progress of a specific operation/request
When monitoring or troubleshooting Ambari operations
When tracking bulk or individual service actions
When users mention request ID, operation status, or progress
Inputs: request_id (required). Returns: result
get_request_tasksARead-only
Retrieves task-level details for a specific Ambari request (host-by-host breakdown).
[Tool Role]: Provides granular, per-host task information for an Ambari request, going beyond the summary level offered by get_request_status.
[Core Functions]:
List all tasks (host/role/status/timing) belonging to a request
Filter tasks by status (e.g. FAILED, IN_PROGRESS) or exclude a status (not:COMPLETED)
Filter tasks by hostname to inspect a specific host
Identify which hosts/roles are failing, pending, or still running
[Required Usage Scenarios]:
When users want to know which hosts or roles failed/are pending in an operation
When debugging a partially-failed bulk operation (e.g. "Start all services")
When users ask for task details, host-level progress, or remaining tasks
When request progress is near 100% but not complete and user wants to know what's left
Inputs: request_id (required), host_filter, status_filter. Returns: result
get_service_componentsARead-only
Retrieves detailed components information for a specific service in the Ambari cluster.
[Tool Role]: Dedicated tool for retrieving service component details and host assignments.
[Core Functions]:
List all components for a service, including state and category
Show host assignments and instance counts
Provide formatted output for LLM automation and troubleshooting
[Required Usage Scenarios]:
When users request service component details or host info
When troubleshooting service health or scaling
When users mention component list, host assignments, or service breakdown
Inputs: service_name (required). Returns: result
get_service_detailsARead-only
Retrieves detailed status and configuration information for a specific service in the Ambari cluster.
[Tool Role]: Dedicated tool for retrieving comprehensive service details, including state, components, and configuration.
[Core Functions]:
Retrieve service state, component list, and configuration availability
Provide formatted output for LLM automation and troubleshooting
[Required Usage Scenarios]:
When users request detailed service info or breakdown
When troubleshooting service health or auditing service setup
When users mention service details, service summary, or configuration status
Inputs: service_name (required). Returns: result
get_service_statusARead-only
Retrieves the status information for a specific service in an Ambari cluster.
[Tool Role]: Dedicated tool for real-time retrieval of specific service status and state information
[Core Functions]:
Retrieve specific service status via Ambari REST API
Provide detailed service state information (STARTED, STOPPED, INSTALLING, etc.)
Include service configuration and component information
[Required Usage Scenarios]:
When users ask about specific service status (e.g., "HDFS status", "YARN state")
When troubleshooting service issues
When monitoring specific service health
Inputs: service_name (required). Returns: result
get_userBRead-only
Get detailed information about a specific user.
Inputs: user_name (required). Returns: result
get_usersARead-only
List all users in the Ambari system.
Returns a formatted list of all users with their basic information.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Several tools overlap heavily: get_service_status, get_service_details, and get_service_components all return service state information, and get_cluster_services also lists services with status. Similarly get_hosts and get_host_details (when called without a host_name) return the same data, and get_current_alerts is explicitly a deprecated duplicate of get_alerts_history with mode=current. Descriptions help but boundaries require careful reading.
Every tool follows a predictable get_<noun> snake_case pattern (get_service_status, get_cluster_info, get_request_tasks, get_ambari_metrics). No style mixing or inconsistent verb forms across the 20 tools.
At 20 tools the surface is on the heavy side for a monitoring API, and the count is inflated by redundancy (deprecated get_current_alerts, overlapping service/host tools). The breadth of Ambari concepts (services, hosts, requests, alerts, metrics, users) does justify many tools, but consolidation could trim the set.
Read/inspection coverage is broad—services, components, hosts, requests, tasks, alerts, metrics, and users are all reachable. However there are no mutation operations at all (no start/stop/restart service, no config update, no user create/del), which are core to an Ambari management API, leaving notable gaps.
Maintenance
Related MCP Connectors
MCP-Native LLM Orchestration Agent
LLM Orchestration Agent (Mcp)
LLM Orchestration MCP Agent
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- AlicenseCqualityBmaintenanceMonitor and manage Apache Airflow clusters through natural language queries via MCP tools: DAG inspection, task monitoring, health checks, and cluster analytics without API complexity. * Guide: https://call518.medium.com/mcp-airflow-api-a-model-context-protocol-mcp-server-for-apache-airflow-5dfdfb25354MIT
- AlicenseBqualityNot gradedmaintenanceEnables AI assistants to manage Apache Ambari clusters, including services, hosts, alerts, and configurations via the MCP protocol.401Apache 2.0
- AlicenseAqualityCmaintenanceMCP server exposing Apache Airflow REST API operations as tools — list DAGs, inspect runs and task instances, trigger DAG runs, and check failed DAGs and scheduler health73MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for interacting with QUADS infrastructure systems via API, enabling resource management and automation through LLM applications.MIT