AKHQ MCP Server
AKHQ MCP Server
An MCP (Model Context Protocol) server for AKHQ — the GUI for Apache Kafka.
Enables AI assistants (Claude, Cursor, etc.) to interact with Kafka clusters through AKHQ's REST API.
Features
Multi-environment support — configure multiple AKHQ instances (dev, staging, prod) and switch between them at runtime
Flexible authentication — supports no auth, HTTP Basic auth, and Bearer auth
Comprehensive AKHQ API coverage — topics, consumer groups, schema registry, nodes/brokers, Kafka Connect, ksqlDB, ACLs
Installation
npm install
npm run buildOr run directly via npx:
{
"mcpServers": {
"akhq": {
"command": "npx",
"args": ["akhq-mcp-server"]
}
}
}Configuration
Option 1: Config file (recommended for multiple environments)
Set the AKHQ_CONFIG_FILE environment variable to point to a JSON config file:
AKHQ_CONFIG_FILE=/path/to/akhq-config.json npx akhq-mcp-serverExample config file (akhq-config.json):
{
"environments": [
{
"name": "local",
"baseUrl": "http://localhost:8080",
"auth": { "type": "none" }
},
{
"name": "dev",
"baseUrl": "https://akhq-dev.example.com",
"auth": {
"type": "basic",
"username": "admin",
"password": "secret"
}
},
{
"name": "prod",
"baseUrl": "https://akhq-prod.example.com",
"auth": {
"type": "bearer",
"token": "eyJhbGci..."
}
}
],
"defaultEnvironment": "local"
}Auth types:
"none"— no authentication"basic"— HTTP Basic authentication (username + password)"bearer"— Bearer authentication
Option 2: Environment variables (single environment)
Variable | Description | Default |
| Base URL of your AKHQ instance |
|
| Name for this environment |
|
| Auth type: |
|
| Username (for | |
| Password (for | |
| Bearer token (for |
Example with basic auth:
AKHQ_BASE_URL=https://akhq.example.com \
AKHQ_AUTH_TYPE=basic \
AKHQ_AUTH_USERNAME=admin \
AKHQ_AUTH_PASSWORD=secret \
node dist/main.jsMCP Client Setup
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"akhq": {
"command": "node",
"args": ["/path/to/akhq-mcp-server/dist/main.js"],
"env": {
"AKHQ_CONFIG_FILE": "/path/to/akhq-config.json"
}
}
}
}Cursor
Add to .cursor/mcp.json in your project or globally:
{
"mcpServers": {
"akhq": {
"command": "npx",
"args": ["akhq-mcp-server"],
"env": {
"AKHQ_CONFIG_FILE": "/path/to/akhq-config.json"
}
}
}
}Available Tools
Environment Management
Tool | Description |
| List all configured AKHQ environments |
| Switch the active AKHQ environment |
| Get the currently active environment |
General
Tool | Description |
| Get all auth details for current instance |
| Get all cluster info |
| Get current user info |
| Get default topic configuration |
Topics
Tool | Description |
| List all topics |
| Create a new topic |
| Get topic details |
| Delete a topic |
| Get topic configuration |
| Update topic configuration |
| Get topic messages |
| Produce a message to a topic |
| Delete records from a topic |
| Get ACLs for a topic |
Consumer Groups
Tool | Description |
| List all consumer groups |
| Get consumer group details |
| Delete a consumer group |
| Get consumer group offsets |
| Update consumer group offsets |
| Get ACLs for a consumer group |
| Get consumer group members |
| Get topics for a consumer group |
Schema Registry
Tool | Description |
| List all schemas |
| Create a new schema |
| Get schema by subject |
| Delete a schema |
| Get all versions of a schema |
| Get a specific schema version |
Nodes / Brokers
Tool | Description |
| List all nodes |
| Get node details |
| Get node configuration |
| Update node configuration |
| Get node log configuration |
Kafka Connect
Tool | Description |
| List all connectors |
| Create a connector |
| Get connector details |
| Delete a connector |
| Get connector configuration |
| Update connector configuration |
| Pause a connector |
| Resume a connector |
| Restart a connector |
| Get connector tasks |
| Restart a connector task |
| List connect plugins |
ksqlDB
Tool | Description |
| Get ksqlDB server info |
| List ksqlDB queries |
| List ksqlDB streams |
| List ksqlDB tables |
| Execute a ksqlDB statement |
| Execute a ksqlDB pull query |
ACLs
Tool | Description |
| List all ACLs for a cluster |
| Get ACLs for a specific principal |
Development
npm run build # Compile TypeScript
npm run dev # Watch modeLicense
This project is licensed under the MIT License.