mcp-konfluent
Eine MCP-Serverimplementierung, die KI-Assistenten die Interaktion mit Confluent Cloud REST-APIs ermöglicht. Dieser Server ermöglicht KI-Tools wie Claude Desktop und Goose CLI die Verwaltung von Kafka-Themen, Konnektoren und Flink-SQL-Anweisungen durch natürliche Sprachinteraktionen.
Demo
Goose-Befehlszeilenschnittstelle

Claude Desktop

Inhaltsverzeichnis
Benutzerhandbuch
Erste Schritte
- Erstellen Sie eine
.env
Datei: Kopieren Sie die Beispielstruktur .env
Datei (siehe unten) in eine neue Datei mit dem Namen .env
im Stammverzeichnis Ihres Projekts. - Füllen Sie die
.env
Datei: Geben Sie die erforderlichen Werte für Ihre Confluent Cloud-Umgebung ein. Details zu den einzelnen Variablen finden Sie im Abschnitt „Konfiguration“ . - Installieren Sie Node.js (falls noch nicht installiert)
- Wir empfehlen die Verwendung von NVM (Node Version Manager) zur Verwaltung von Node.js-Versionen
- Installieren und verwenden Sie Node.js:
nvm install 22
nvm use 22
Konfiguration
Erstellen Sie im Stammverzeichnis Ihres Projekts eine .env
Datei mit der folgenden Konfiguration:
# .env file
BOOTSTRAP_SERVERS="pkc-v12gj.us-east4.gcp.confluent.cloud:9092"
KAFKA_API_KEY="..."
KAFKA_API_SECRET="..."
KAFKA_REST_ENDPOINT="https://pkc-v12gj.us-east4.gcp.confluent.cloud:443"
KAFKA_CLUSTER_ID=""
KAFKA_ENV_ID="env-..."
FLINK_ENV_ID="env-..."
FLINK_ORG_ID=""
FLINK_REST_ENDPOINT="https://flink.us-east4.gcp.confluent.cloud"
FLINK_ENV_NAME=""
FLINK_DATABASE_NAME=""
FLINK_API_KEY=""
FLINK_API_SECRET=""
FLINK_COMPUTE_POOL_ID="lfcp-..."
CONFLUENT_CLOUD_API_KEY=""
CONFLUENT_CLOUD_API_SECRET=""
CONFLUENT_CLOUD_REST_ENDPOINT="https://api.confluent.cloud"
SCHEMA_REGISTRY_API_KEY="..."
SCHEMA_REGISTRY_API_SECRET="..."
SCHEMA_REGISTRY_ENDPOINT="https://psrc-zv01y.northamerica-northeast2.gcp.confluent.cloud"
Referenz zu Umgebungsvariablen
Variable | Beschreibung | Standardwert | Erforderlich |
---|
HTTP_HOST | Host zum Binden für HTTP-Transport (Zeichenfolge) | "localhost" | Ja |
HTTP_PORT | Für den HTTP-Transport zu verwendender Port (Nummer (min: 0)) | 3000 | Ja |
BOOTSTRAP_SERVERS | Liste der Kafka-Broker-Adressen im Format Host1:Port1,Host2:Port2, die zum Herstellen der ersten Verbindung mit dem Kafka-Cluster verwendet werden (Zeichenfolge) | | NEIN |
CONFLUENT_CLOUD_API_KEY | Master-API-Schlüssel für die Administration der Confluent Cloud-Plattform, der die Verwaltung von Ressourcen in Ihrer gesamten Organisation ermöglicht (Zeichenfolge (mindestens 1)) | | NEIN |
CONFLUENT_CLOUD_API_SECRET | Master-API-Geheimnis gepaart mit CONFLUENT_CLOUD_API_KEY für umfassende Confluent Cloud-Plattformverwaltung (Zeichenfolge (min.: 1)) | | NEIN |
CONFLUENT_CLOUD_REST_ENDPOINT | Basis-URL für die REST-API-Dienste von Confluent Cloud (Standard) | | NEIN |
FLINK_API_KEY | Authentifizierungsschlüssel für den Zugriff auf die Flink-Dienste von Confluent Cloud, einschließlich Compute-Pools und SQL-Anweisungsverwaltung (Zeichenfolge (min.: 1)) | | NEIN |
FLINK_API_SECRET | Geheimes Token gepaart mit FLINK_API_KEY für authentifizierten Zugriff auf die Flink-Dienste von Confluent Cloud (Zeichenfolge (min.: 1)) | | NEIN |
FLINK_COMPUTE_POOL_ID | Eindeutige Kennung für den Flink-Rechnerpool, muss mit dem Präfix „lfcp-“ beginnen (Zeichenfolge) | | NEIN |
FLINK_DATABASE_NAME | Name des zugehörigen Kafka-Clusters, der als Datenbankreferenz in Flink-SQL-Operationen verwendet wird (Zeichenfolge (min.: 1)) | | NEIN |
FLINK_ENV_ID | Eindeutige Kennung für die Flink-Umgebung, muss mit dem Präfix „env-“ beginnen (Zeichenfolge) | | NEIN |
FLINK_ENV_NAME | Für Menschen lesbarer Name für die Flink-Umgebung, der zu Identifikations- und Anzeigezwecken verwendet wird (Zeichenfolge (min.: 1)) | | NEIN |
FLINK_ORG_ID | Organisationskennung innerhalb von Confluent Cloud für die Flink-Ressourcenverwaltung (Zeichenfolge (min.: 1)) | | NEIN |
FLINK_REST_ENDPOINT | Basis-URL für die Flink REST-API-Endpunkte von Confluent Cloud, die für SQL-Anweisungen und die Verwaltung von Compute-Pools verwendet werden (Zeichenfolge) | | NEIN |
KAFKA_API_KEY | Authentifizierungsdaten (Benutzername), die zum Herstellen einer sicheren Verbindung mit dem Kafka-Cluster erforderlich sind (Zeichenfolge (min.: 1)) | | NEIN |
KAFKA_API_SECRET | Authentifizierungsdaten (Passwort) gepaart mit KAFKA_API_KEY für sicheren Kafka-Clusterzugriff (Zeichenfolge (min.: 1)) | | NEIN |
KAFKA_CLUSTER_ID | Eindeutige Kennung für den Kafka-Cluster innerhalb des Confluent Cloud-Ökosystems (Zeichenfolge (min.: 1)) | | NEIN |
KAFKA_ENV_ID | Umgebungskennung für Kafka-Cluster, muss mit dem Präfix „env-“ (Zeichenfolge) beginnen | | NEIN |
KAFKA_REST_ENDPOINT | REST-API-Endpunkt für Kafka-Clusterverwaltung und -Administration (Zeichenfolge) | | NEIN |
SCHEMA_REGISTRY_API_KEY | Authentifizierungsschlüssel für den Zugriff auf Schema Registry-Dienste zum Verwalten und Validieren von Datenschemata (Zeichenfolge (min.: 1)) | | NEIN |
SCHEMA_REGISTRY_API_SECRET | Authentifizierungsgeheimnis gepaart mit SCHEMA_REGISTRY_API_KEY für sicheren Schema Registry-Zugriff (Zeichenfolge (min.: 1)) | | NEIN |
SCHEMA_REGISTRY_ENDPOINT | URL-Endpunkt für den Zugriff auf Schema Registry-Dienste zur Verwaltung von Datenschemata (Zeichenfolge) | | NEIN |
Verwendung
Dieser MCP-Server ist für die Verwendung mit verschiedenen MCP-Clients wie Claude Desktop oder Goose CLI/Desktop konzipiert. Die spezifische Konfiguration und Interaktion hängt vom verwendeten Client ab. Die allgemeinen Schritte sind jedoch:
- Starten Sie den Server: Sie können den MCP-Server auf zwei Arten ausführen:
- Aus der Quelle: Folgen Sie den Anweisungen im Entwicklerhandbuch, um den Server aus der Quelle zu erstellen und auszuführen. Dies umfasst in der Regel:
- Installieren von Abhängigkeiten (
npm install
) - Erstellen des Projekts (
npm run build
oder npm run dev
)
- Mit npx: Sie können den Server direkt mit npx starten (kein Build erforderlich):
npx -y @confluentinc/mcp-confluent -e /path/to/confluent-mcp-server/.env
- Konfigurieren Sie Ihren MCP-Client: Jeder Client hat seine eigene Methode, die Adresse des MCP-Servers und die erforderlichen Anmeldeinformationen anzugeben. Sie müssen Ihren Client (z. B. Claude, Goose) so konfigurieren, dass er sich mit der Adresse verbindet, auf der dieser Server läuft (wahrscheinlich
localhost
mit einem bestimmten Port). Der Port, auf dem der Server läuft, kann durch eine Umgebungsvariable konfiguriert werden. - Starten Sie den MCP-Client: Sobald Ihr Client für die Verbindung mit dem MCP-Server konfiguriert ist, können Sie ihn starten. Beim Start wird eine lokale Instanz des MCP-Servers eingerichtet. Diese Instanz verwaltet die Datenschemata und interagiert in Ihrem Namen mit Confluent Cloud.
- Interaktion mit Confluent über den Client: Sobald der Client verbunden ist, können Sie über dessen Schnittstelle mit Confluent Cloud-Ressourcen interagieren. Der Client sendet Anfragen an den MCP-Server, der dann in Ihrem Namen mit Confluent Cloud interagiert.
Konfigurieren von Claude Desktop
Weitere Einzelheiten zur Installation von Claude Desktop- und MCP-Servern finden Sie hier .
So konfigurieren Sie Claude Desktop für die Verwendung dieses MCP-Servers:
- Öffnen Sie die Claude Desktop-Konfiguration
- Auf dem Mac:
~/Library/Application Support/Claude/claude_desktop_config.json
- Unter Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Konfigurationsdatei bearbeiten
- Öffnen Sie die Konfigurationsdatei in Ihrem bevorzugten Texteditor
- Fügen Sie die Konfiguration mit einer der folgenden Methoden hinzu oder ändern Sie sie:
{
"mcpServers": {
"confluent": {
"command": "node",
"args": [
"/path/to/confluent-mcp-server/dist/index.js",
"--env-file",
"/path/to/confluent-mcp-server/.env",
]
}
}
}
{
"mcpServers": {
"confluent": {
"command": "npx",
"args": [
"-y"
"@confluentinc/mcp-confluent",
"-e",
"/path/to/confluent-mcp-server/.env"
]
}
}
}
Ersetzen Sie /path/to/confluent-mcp-server/
durch den tatsächlichen Pfad, in dem Sie diesen MCP-Server installiert haben.
- Starten Sie Claude Desktop neu
- Schließen Sie Claude Desktop und öffnen Sie es erneut, damit die Änderungen wirksam werden.
- Der MCP-Server wird automatisch gestartet, wenn Claude Desktop startet
Jetzt wird Claude Desktop so konfiguriert, dass Ihr lokaler MCP-Server für Confluent-Interaktionen verwendet wird.

Konfigurieren der Goose CLI
Ausführliche Anweisungen zur Installation der Goose CLI finden Sie hier .
Führen Sie nach der Installation die folgenden Schritte aus:
- Führen Sie den Konfigurationsbefehl aus:
- Folgen Sie den interaktiven Anweisungen:
- Wählen Sie
Add extension
- Wählen Sie
Command-line Extension
- Geben Sie als Erweiterungsnamen
mcp-confluent
ein - Wählen Sie eine der folgenden Konfigurationsmethoden:
node /path/to/confluent-mcp-server/dist/index.js --env-file /path/to/confluent-mcp-server/.env
npx -y @confluentinc/mcp-confluent -e /path/to/confluent-mcp-server/.env
Ersetzen Sie /path/to/confluent-mcp-server/
durch den tatsächlichen Pfad, in dem Sie diesen MCP-Server installiert haben.

mcp-confluent CLI-Nutzung
Der MCP-Server bietet eine flexible Befehlszeilenschnittstelle (CLI) für erweiterte Konfiguration und Steuerung. Über die CLI können Sie Umgebungsdateien und Transporte angeben und genau festlegen, welche Tools aktiviert oder blockiert werden.
Grundlegende Verwendung
Sie können alle CLI-Optionen anzeigen und Hilfe zu Folgendem erhalten:
npx @confluentinc/mcp-confluent --help
Usage: mcp-confluent [options]
Confluent MCP Server - Model Context Protocol implementation for Confluent Cloud
Options:
-V, --version output the version number
-e, --env-file <path> Load environment variables from file
-k, --kafka-config-file <file> Path to a properties file for configuring kafka clients
-t, --transport <types> Transport types (comma-separated list) (choices: "http", "sse", "stdio", default: "stdio")
--allow-tools <tools> Comma-separated list of tool names to allow. If provided, takes precedence over --allow-tools-file. Allow-list is applied before block-list.
--block-tools <tools> Comma-separated list of tool names to block. If provided, takes precedence over --block-tools-file. Block-list is applied after allow-list.
--allow-tools-file <file> File with tool names to allow (one per line). Used only if --allow-tools is not provided. Allow-list is applied before block-list.
--block-tools-file <file> File with tool names to block (one per line). Used only if --block-tools is not provided. Block-list is applied after allow-list.
--list-tools Print the final set of enabled tool names (with descriptions) after allow/block filtering and exit. Does not start the server.
--disable-confluent-cloud-tools Disable all tools that require Confluent Cloud REST APIs (cloud-only tools).
-h, --help display help for command
Beispiel: Bereitstellung mit allen Transportmöglichkeiten
npx @confluentinc/mcp-confluent -e .env --transport http,sse,stdio
...
{"level":"info","time":"2025-05-14T17:03:02.883Z","pid":47959,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Starting transports: http, sse, stdio"}
{"level":"info","time":"2025-05-14T17:03:02.971Z","pid":47959,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"HTTP transport routes registered"}
{"level":"info","time":"2025-05-14T17:03:02.972Z","pid":47959,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"SSE transport routes registered"}
{"level":"info","time":"2025-05-14T17:03:02.972Z","pid":47959,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"STDIO transport connected"}
{"level":"info","time":"2025-05-14T17:03:03.012Z","pid":47959,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Server listening at http://[::1]:3000"}
{"level":"info","time":"2025-05-14T17:03:03.013Z","pid":47959,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Server listening at http://127.0.0.1:3000"}
{"level":"info","time":"2025-05-14T17:03:03.013Z","pid":47959,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"All transports started successfully"}
npx @confluentinc/mcp-confluent -e .env --allow-tools produce-message,consume-messages
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-topics disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool create-topics disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool delete-topics disabled due to allow/block list rules"}
{"level":"info","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool produce-message enabled"}
{"level":"info","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool consume-messages enabled"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-flink-statements disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool create-flink-statement disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool read-flink-statement disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool delete-flink-statements disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-connectors disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool read-connector disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool create-connector disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool delete-connector disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool search-topics-by-tag disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool search-topics-by-name disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool create-topic-tags disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool delete-tag disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool remove-tag-from-entity disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool add-tags-to-topic disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-tags disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool alter-topic-config disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-clusters disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-environments disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool read-environment disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-schemas disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:52:34.923Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool get-topic-config disabled due to allow/block list rules"}
{"level":"info","time":"2025-05-14T16:52:34.924Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Starting transports: stdio on localhost:3000"}
{"level":"info","time":"2025-05-14T16:52:34.924Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"STDIO transport connected"}
{"level":"info","time":"2025-05-14T16:52:34.924Z","pid":46818,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"All transports started successfully"}
npx @confluentinc/mcp-confluent -e .env --block-tools produce-message,consume-messages
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-topics enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool create-topics enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool delete-topics enabled"}
{"level":"warn","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool produce-message disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool consume-messages disabled due to allow/block list rules"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-flink-statements enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool create-flink-statement enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool read-flink-statement enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool delete-flink-statements enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-connectors enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool read-connector enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool create-connector enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool delete-connector enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool search-topics-by-tag enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool search-topics-by-name enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool create-topic-tags enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool delete-tag enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool remove-tag-from-entity enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool add-tags-to-topic enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-tags enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool alter-topic-config enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-clusters enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-environments enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool read-environment enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-schemas enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool get-topic-config enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Starting transports: stdio"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"STDIO transport connected"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"All transports started successfully"}
Beispiel: Werkzeuglisten aus Dateien verwenden
npx -y @confluentinc/mcp-confluent -e .env --allow-tools-file allow.txt --block-tools-file block.txt
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-topics enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool create-topics enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool delete-topics enabled"}
{"level":"warn","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool produce-message disabled due to allow/block list rules"}
{"level":"warn","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool consume-messages disabled due to allow/block list rules"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-flink-statements enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool create-flink-statement enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool read-flink-statement enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool delete-flink-statements enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-connectors enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool read-connector enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool create-connector enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool delete-connector enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool search-topics-by-tag enabled"}
{"level":"info","time":"2025-05-14T16:55:45.910Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool search-topics-by-name enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool create-topic-tags enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool delete-tag enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool remove-tag-from-entity enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool add-tags-to-topic enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-tags enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool alter-topic-config enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-clusters enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-environments enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool read-environment enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool list-schemas enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Tool get-topic-config enabled"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"Starting transports: stdio"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"STDIO transport connected"}
{"level":"info","time":"2025-05-14T16:55:45.911Z","pid":47344,"hostname":"G9PW1FJH64","name":"mcp-confluent","msg":"All transports started successfully"}
npx -y @confluentinc/mcp-confluent --list-tools
add-tags-to-topic: Assign existing tags to Kafka topics in Confluent Cloud.
alter-topic-config: Alter topic configuration in Confluent Cloud.
consume-messages: Consumes messages from one or more Kafka topics. Supports automatic deserialization of Schema Registry encoded messag...
create-connector: Create a new connector. Returns the new connector information if successful.
create-flink-statement: Make a request to create a statement.
create-topic-tags: Create new tag definitions in Confluent Cloud.
create-topics: Create one or more Kafka topics.
delete-connector: Delete an existing connector. Returns success message if deletion was successful.
delete-flink-statements: Make a request to delete a statement.
delete-tag: Delete a tag definition from Confluent Cloud.
delete-topics: Delete the topic with the given names.
get-topic-config: Retrieve configuration details for a specific Kafka topic.
list-clusters: Get all clusters in the Confluent Cloud environment
list-connectors: Retrieve a list of "names" of the active connectors. You can then make a read request for a specific connector by name.
list-environments: Get all environments in Confluent Cloud with pagination support
list-flink-statements: Retrieve a sorted, filtered, paginated list of all statements.
list-schemas: List all schemas in the Schema Registry.
list-tags: Retrieve all tags with definitions from Confluent Cloud Schema Registry.
list-topics: List all topics in the Kafka cluster.
produce-message: Produce records to a Kafka topic. Supports Confluent Schema Registry serialization (AVRO, JSON, PROTOBUF) for both ke...
read-connector: Get information about the connector.
read-environment: Get details of a specific environment by ID
read-flink-statement: Make a request to read a statement and its results
remove-tag-from-entity: Remove tag from an entity in Confluent Cloud.
search-topics-by-name: List all topics in the Kafka cluster matching the specified name.
search-topics-by-tag: List all topics in the Kafka cluster with the specified tag.
Tipp: Die Zulassungsliste wird vor der Sperrliste angewendet. Wenn keine der beiden Optionen angegeben ist, sind alle Tools standardmäßig aktiviert.
Entwicklerhandbuch
Projektstruktur
/
├── src/ # Source code
│ ├── confluent/ # Confluent integration (API clients, etc.)
│ │ └── tools/ # Tool implementations
│ ├── mcp/ # MCP protocol and transport logic
│ │ └── transports/
│ └── ... # Other server logic, utilities, etc.
├── dist/ # Compiled output
├── openapi.json # OpenAPI specification for Confluent Cloud
├── .env # Environment variables (example - should be copied and filled)
├── README.md # This file
└── package.json # Node.js project metadata and dependencies
Bauen und Ausführen
- Abhängigkeiten installieren:
- Entwicklungsmodus (achten Sie auf Änderungen):Dieser Befehl kompiliert den TypeScript-Code in JavaScript und erstellt ihn automatisch neu, wenn Änderungen im Verzeichnis
src/
erkannt werden. - Produktionsbuild (einmalige Kompilierung):
- Starten Sie den Server:
Testen
MCP-Inspektor
Zum Testen von MCP-Servern können Sie MCP Inspector verwenden, ein interaktives Entwicklertool zum Testen und Debuggen von MCP-Servern.
# make sure you've already built the project either in dev mode or by running npm run build
npx @modelcontextprotocol/inspector node $PATH_TO_PROJECT/dist/index.js --env-file $PATH_TO_PROJECT/.env
- Fügen Sie der Enumerationsklasse
ToolName
eine neue Enumeration hinzu. - Fügen Sie Ihr neues Tool zur Handler-Map in der
ToolFactory
Klasse hinzu. - Erstellen Sie eine neue Datei und exportieren Sie die Klasse, die
BaseToolHandler
erweitert.- Implementieren Sie die
handle
-Methode der Basisklasse. - Implementieren Sie die Methode
getToolConfig
der Basisklasse.
- Wenn Sie zufrieden sind, fügen Sie es dem Satz
enabledTools
“ in index.ts
hinzu.
Generieren von Typen
# as of v7.5.2 there is a bug when using allOf w/ required https://github.com/openapi-ts/openapi-typescript/issues/1474. need --empty-objects-unknown flag to avoid it
npx openapi-typescript ./openapi.json -o ./src/confluent/openapi-schema.d.ts --empty-objects-unknown
Beitragen
Fehlerberichte und Feedback werden in Form von Github Issues gerne entgegengenommen. Richtlinien zum Mitwirken finden Sie unter CONTRIBUTING.md