home / mcp / mcp ambari api server
๐Model Context Protocol (MCP) server for Apache Ambari API integration. This project provides tools for managing Hadoop clusters, including service operations, configuration management, status monitoring, and request tracking.
Configuration
View docs{
"mcpServers": {
"call518-mcp-ambari-api": {
"url": "http://localhost:18001/mcp",
"headers": {
"PYTHONPATH": "/app/src",
"FASTMCP_HOST": "127.0.0.1",
"FASTMCP_PORT": "8000",
"FASTMCP_TYPE": "stdio",
"MCP_LOG_LEVEL": "INFO",
"REMOTE_SECRET_KEY": "YOUR_SECRET_KEY",
"REMOTE_AUTH_ENABLE": "true"
}
}
}
}You can manage an Apache Ambari cluster through natural-language driven MCP tools that translate your commands into Ambari REST calls. This MCP server provides interactive cluster operations, real-time visibility, and automation-friendly interfaces for common administration tasks across Hadoop ecosystems, helping you operate more efficiently with consistent, auditable workflows.
You will interact with the MCP server through an MCP client or OpenWebUI-compatible tooling. Use plain language to query cluster status, start or stop services, inspect configurations, review alerts, and fetch metrics. The tools expose actions for cluster information, service control, configuration handling, host and user management, and alert viewing. For operational safety, long-running or bulk actions are typically guarded by confirmation prompts and structured prompts that explain risk before proceeding.
Typical usage patterns include: asking for current cluster health, listing active requests, inspecting a serviceโs components and hosts, starting or stopping a service across the cluster, exporting configurations, and querying Ambari Metrics for time-series data. You can also retrieve consolidated reports that resemble dfsadmin-style outputs and view real-time metric trends.
Prerequisites: ensure you have Docker and Docker Compose installed if you plan to run the MCP server in containers. You will also need a reachable Ambari cluster (Ambari 2.7+ is recommended) and access credentials for Ambari. If you plan to use the streamable-http transport, prepare a host for remote access and consider enabling Bearer token authentication for production environments.
Step 1: Prepare the Ambari cluster and environment configuration. Create a configuration file and populate Ambari connection details and optional authentication settings.
Step 2: Run the MCP server in stdio (local) mode or in streamable-http (remote) mode depending on your deployment. The local mode uses a command to launch the MCP server process, while the remote mode exposes an HTTP API endpoint you can connect to from your MCP client.
Configuration details include Ambari host, port, user, password, and the cluster name you want to target by default. Optional Ambari Metrics (AMS) collector details can be configured for metric discovery and queries. Security considerations emphasize enabling remote authentication for production deployments and using strong secret keys. The server supports two transport modes: stdio for local setups and streamable-http for remote access, with a priority order for configuration values: CLI arguments take precedence over environment variables, which take precedence over defaults.
Example configurations for running the MCP server are shown below. Ensure you copy the exact command and environment variable names when integrating into your tooling.
This MCP server exposes a collection of tools tailored for Ambari cluster management. They cover cluster information retrieval, service operations, configuration management, host and user administration, and alert handling. You can combine these tools to implement automation workflows that start or stop services in bulk, validate configurations, export summaries, and produce operational reports.
Retrieve basic cluster information and status
List currently active or running operations
Check status and progress of specific requests
List all services with their status
Get detailed status of a specific service
List components and host assignments for a service
Get comprehensive service information
Start a specific service
Stop a specific service
Restart a specific service
Start all services in the cluster
Stop all services in the cluster
Restart all services in the cluster
Unified configuration tool for exporting or inspecting configurations
List all hosts in the cluster
Get detailed information for specific or all hosts
List all users in the Ambari system with their usernames and API links
Get detailed information about a specific user including profile and authentication details
Unified alert tool for current and historical alerts with filtering and formats