loading…
Search for a command to run...
loading…
Enables AI assistants to manage Apache Ambari clusters, including services, hosts, alerts, and configurations via the MCP protocol.
Enables AI assistants to manage Apache Ambari clusters, including services, hosts, alerts, and configurations via the MCP protocol.
A Model Context Protocol (MCP) server for Apache Ambari, built with the TypeScript SDK. This server provides tools to interact with Ambari clusters through the MCP protocol.
This MCP server allows AI assistants and other MCP clients to interact with Apache Ambari clusters by exposing common Ambari REST API operations as MCP tools.
ambari_clusters_getclusters - Returns all clustersambari_clusters_getcluster - Returns information about a specific clusterambari_clusters_createcluster - Creates a new clusterambari_services_getservices - Get all services for a clusterambari_services_getservice - Get details of a specific serviceambari_services_getservicestate - Get detailed state information for a specific serviceambari_services_startservice - Start a specific service on the clusterambari_services_stopservice - Stop a specific service on the clusterambari_services_getserviceswithstaleconfigs - Get services and components that have stale configurations requiring restartambari_services_gethostcomponentswithstaleconfigs - Get host components that need restart due to stale configurationsambari_services_restartservice - Restart a specific service on the cluster (supports rolling restart)ambari_services_restartcomponents - Restart specific components that have stale configurationsambari_services_getrollingrestartstatus - Get the status of rolling restart operations for servicesambari_services_enablemaintenancemode - Enable maintenance mode for a service or componentambari_services_disablemaintenancemode - Disable maintenance mode for a service or componentambari_services_runservicecheck - Run service check for a specific service to verify it is working correctlyambari_services_isservicechecksupported - Check if service check is supported for a specific service in the stackambari_services_getservicecheckstatus - Get the status of recent service check operations for a serviceambari_hosts_gethosts - Returns a collection of all hostsambari_hosts_gethost - Returns information about a single hostambari_alerts_gettargets - Returns all alert targetsambari_alerts_getalerts - Get all alerts for a cluster with filtering optionsambari_alerts_getalertsummary - Get alert summary in grouped format for a clusterambari_alerts_getalertdetails - Get details for a specific alert definitionambari_alerts_getalertdefinitions - Get all alert definitions for a clusterambari_alerts_updatealertdefinition - Update an alert definition (enable/disable or modify properties)ambari_alerts_getalertgroups - Get all alert groups for a clusterambari_alerts_createalertgroup - Create a new alert groupambari_alerts_updatealertgroup - Update an existing alert groupambari_alerts_deletealertgroup - Delete an alert groupambari_alerts_duplicatealertgroup - Duplicate an existing alert group with a new nameambari_alerts_adddefinitiontogroup - Add an alert definition to an alert groupambari_alerts_removedefinitionfromgroup - Remove an alert definition from an alert groupambari_alerts_getnotifications - Get all alert notification targetsambari_alerts_createnotification - Create a new alert notification targetambari_alerts_updatenotification - Update an existing alert notification targetambari_alerts_deletenotification - Delete an alert notification targetambari_alerts_addnotificationtogroup - Add a notification target to an alert groupambari_alerts_removenotificationfromgroup - Remove a notification target from an alert groupambari_alerts_savealertsettings - Save cluster-level alert settings (like repeat tolerance)Clone or copy this server to your local machine
Install dependencies:
npm install
Install dev dependencies (if not already installed):
npm install typescript @types/node --save-dev
Copy the example environment file:
cp .env.example .env
Edit the .env file with your Ambari server details:
AMBARI_BASE_URL=http://your-ambari-server:8080/api/v1
AMBARI_USERNAME=admin
AMBARI_PASSWORD=admin
TIMEOUT_MS=30000
Build the TypeScript code:
npm run build
Run the server directly:
npm start
Add to your Claude Desktop configuration:
{
"mcpServers": {
"ambari": {
"command": "node",
"args": ["/path/to/ambari-mcp-server/dist/index.js"]
}
}
}
The server communicates via stdio and follows the MCP protocol specification.
ambari-mcp-server/
├── src/
│ └── index.ts # Main server implementation
├── dist/ # Compiled JavaScript (after build)
├── .env.example # Environment configuration template
├── package.json # Node.js dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # This file
npm run build - Compile TypeScript to JavaScriptnpm run dev - Build and run the servernpm start - Run the compiled serverAMBARI_TOOLS arraytoolExecutors objectExample:
// Add to AMBARI_TOOLS
{
name: 'ambari_new_operation',
description: 'Description of the new operation',
inputSchema: {
type: 'object',
properties: {
// Define input parameters
},
required: ['requiredParam']
}
}
// Add to toolExecutors
ambari_new_operation: async (args) => {
return executeAmbariRequest('GET', '/new-endpoint', args);
}
The server includes comprehensive error handling:
Errors are returned as MCP error responses with appropriate error codes and messages.
.envTIMEOUT_MS valueSet environment variable DEBUG=1 for verbose logging:
DEBUG=1 npm start
ISC License - see package.json for details
Выполни в терминале:
claude mcp add ambari-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.