mcp-confluent
Una implementación de servidor MCP que permite a los asistentes de IA interactuar con las API REST de Confluent Cloud. Este servidor permite que herramientas de IA como Claude Desktop y Goose CLI gestionen temas, conectores y sentencias SQL de Flink de Kafka mediante interacciones en lenguaje natural.
Manifestación
Goose CLI

Escritorio de Claude

Tabla de contenido
Guía del usuario
Empezando
- Cree un archivo
.env
: copie la estructura de archivo .env
de ejemplo (que se muestra a continuación) en un nuevo archivo llamado .env
en la raíz de su proyecto. - Rellene el archivo
.env
: Introduzca los valores necesarios para su entorno de Confluent Cloud. Consulte la sección "Configuración" para obtener más información sobre cada variable. - Instalar Node.js (si aún no está instalado)
- Recomendamos utilizar NVM (Node Version Manager) para administrar las versiones de Node.js
- Instalar y utilizar Node.js:
nvm install 22
nvm use 22
Configuración
Cree un archivo .env
en el directorio raíz de su proyecto con la siguiente configuración:
# .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"
Referencia de variables de entorno
Variable | Descripción | Valor predeterminado | Requerido |
---|
Host HTTP | Host al que vincular para el transporte HTTP (cadena) | "localhost" | Sí |
Puerto HTTP | Puerto a utilizar para el transporte HTTP (número (mín.: 0)) | 3000 | Sí |
SERVIDORES BOOTSTRAP | Lista de direcciones de agentes de Kafka en el formato host1,host2 utilizadas para establecer la conexión inicial con el clúster de Kafka (cadena) | | No |
CLAVE DE API DE CONFLUENT CLOUD | Clave API maestra para la administración de la plataforma Confluent Cloud, que permite la gestión de recursos en toda su organización (cadena (mín.: 1)) | | No |
SECRETO DE LA API DE CONFLUENT CLOUD | Secreto de API maestro emparejado con CONFLUENT_CLOUD_API_KEY para la administración integral de la plataforma Confluent Cloud (cadena (mín.: 1)) | | No |
PUNTO FINAL DE DESCANSO EN LA NUBE CONFLUENTE | URL base para los servicios de API REST de Confluent Cloud (predeterminada) | | No |
CLAVE DE API DE FLINK | Clave de autenticación para acceder a los servicios Flink de Confluent Cloud, incluidos los grupos de cómputo y la gestión de declaraciones SQL (cadena (mín.: 1)) | | No |
SECRETO DE LA API DE FLINK | Token secreto emparejado con FLINK_API_KEY para acceso autenticado a los servicios Flink de Confluent Cloud (cadena (mín.: 1)) | | No |
ID DE GRUPO DE COMPUTACIÓN DE FLINK | Identificador único para el grupo de cómputo de Flink, debe comenzar con el prefijo 'lfcp-' (cadena) | | No |
NOMBRE DE LA BASE DE DATOS FLINK | Nombre del clúster de Kafka asociado utilizado como referencia de base de datos en las operaciones SQL de Flink (cadena (mín.: 1)) | | No |
ID DE ENVÍO FLINK | Identificador único para el entorno Flink, debe comenzar con el prefijo 'env-' (cadena) | | No |
FLINK_ENV_NAME | Nombre legible para humanos para el entorno de Flink utilizado con fines de identificación y visualización (cadena (mín.: 1)) | | No |
ID DE ORGANIZACIÓN FLINK | Identificador de la organización dentro de Confluent Cloud para la gestión de recursos de Flink (cadena (mín.: 1)) | | No |
PUNTO FINAL DE DESCANSO DE FLINK | URL base para los puntos finales de la API REST de Flink de Confluent Cloud utilizados para la administración de declaraciones SQL y grupos de cómputo (cadena) | | No |
CLAVE DE API DE KAFKA | Credencial de autenticación (nombre de usuario) necesaria para establecer una conexión segura con el clúster de Kafka (cadena (mín.: 1)) | | No |
SECRETO DE LA API DE KAFKA | Credencial de autenticación (contraseña) emparejada con KAFKA_API_KEY para acceso seguro al clúster de Kafka (cadena (mín.: 1)) | | No |
ID DE CLÚSTER KAFKA | Identificador único para el clúster de Kafka dentro del ecosistema de Confluent Cloud (cadena (mín.: 1)) | | No |
ID DE ENV. KAFKA | Identificador de entorno para el clúster de Kafka, debe comenzar con el prefijo 'env-' (cadena) | | No |
PUNTO FINAL DE DESCANSO DE KAFKA | Punto final de la API REST para la gestión y administración de clústeres de Kafka (cadena) | | No |
CLAVE DE API DE REGISTRO DE ESQUEMA | Clave de autenticación para acceder a los servicios de Schema Registry para administrar y validar esquemas de datos (cadena (mín.: 1)) | | No |
SECRETO DE API DE REGISTRO DE ESQUEMA | Secreto de autenticación emparejado con SCHEMA_REGISTRY_API_KEY para acceso seguro al Registro de esquemas (cadena (mín.: 1)) | | No |
PUNTO FINAL DEL REGISTRO DE ESQUEMA | Punto final de URL para acceder a los servicios de registro de esquemas para administrar esquemas de datos (cadena) | | No |
Uso
Este servidor MCP está diseñado para usarse con varios clientes MCP, como Claude Desktop o Goose CLI/Desktop. La configuración y la interacción específicas dependerán del cliente que utilice. Sin embargo, los pasos generales son:
- Iniciar el servidor: puede ejecutar el servidor MCP de una de dos maneras:
- Desde el código fuente: Siga las instrucciones de la Guía del desarrollador para compilar y ejecutar el servidor desde el código fuente. Esto suele implicar:
- Instalación de dependencias (
npm install
) - Construyendo el proyecto (
npm run build
o npm run dev
)
- Con npx: puedes iniciar el servidor directamente usando npx (no se requiere compilación):
npx -y @confluentinc/mcp-confluent -e /path/to/confluent-mcp-server/.env
- Configura tu cliente MCP: Cada cliente tiene su propia forma de especificar la dirección del servidor MCP y las credenciales requeridas. Deberás configurar tu cliente (p. ej., Claude, Goose) para que se conecte a la dirección donde se ejecuta este servidor (probablemente
localhost
con un puerto específico). El puerto en el que se ejecuta el servidor puede configurarse mediante una variable de entorno. - Iniciar el cliente MCP: Una vez configurado el cliente para conectarse al servidor MCP, puede iniciarlo. Al iniciarse, se creará una instancia de este servidor MCP localmente. Esta instancia se encargará de administrar los esquemas de datos e interactuar con Confluent Cloud en su nombre.
- Interactúe con Confluent a través del cliente: Una vez conectado el cliente, puede usar su interfaz para interactuar con los recursos de Confluent Cloud. El cliente enviará solicitudes a este servidor MCP, que interactuará con Confluent Cloud en su nombre.
Configuración de Claude Desktop
Consulte aquí para obtener más detalles sobre la instalación de Claude Desktop y los servidores MCP.
Para configurar Claude Desktop para utilizar este servidor MCP:
- Abrir la configuración del escritorio de Claude
- En Mac:
~/Library/Application Support/Claude/claude_desktop_config.json
- En Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Editar archivo de configuración
- Abra el archivo de configuración en su editor de texto preferido
- Agregue o modifique la configuración utilizando uno de los siguientes métodos:
{
"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"
]
}
}
}
Reemplace /path/to/confluent-mcp-server/
con la ruta real donde ha instalado este servidor MCP.
- Reiniciar Claude Desktop
- Cierre y vuelva a abrir Claude Desktop para que los cambios surtan efecto.
- El servidor MCP se iniciará automáticamente cuando se inicie Claude Desktop
Ahora Claude Desktop estará configurado para utilizar su servidor MCP local para las interacciones de Confluent.

Configuración de Goose CLI
Consulte aquí para obtener instrucciones detalladas sobre cómo instalar Goose CLI.
Una vez instalado, siga estos pasos:
- Ejecute el comando de configuración:
- Siga las indicaciones interactivas:
- Seleccione
Add extension
- Elija
Command-line Extension
- Introduzca
mcp-confluent
como nombre de la extensión - Elija uno de los siguientes métodos de configuración:
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
Reemplace /path/to/confluent-mcp-server/
con la ruta real donde ha instalado este servidor MCP.

Uso de la CLI de mcp-confluent
El servidor MCP proporciona una interfaz de línea de comandos (CLI) flexible para una configuración y un control avanzados. La CLI permite especificar archivos de entorno y transportes, y ajustar las herramientas que se habilitan o bloquean.
Uso básico
Puede ver todas las opciones de CLI y obtener ayuda con:
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
Ejemplo: Implementar utilizando todos los transportes
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"}
Ejemplo: Permitir solo herramientas específicas
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"}
Ejemplo: Bloquear ciertas herramientas
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"}
Ejemplo: utilizar listas de herramientas desde archivos
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"}
Ejemplo: enumerar todas las herramientas disponibles
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.
Consejo: La lista de permitidos se aplica antes que la de bloqueados. Si no se proporciona ninguna, todas las herramientas estarán habilitadas por defecto.
Guía para desarrolladores
Estructura del proyecto
/
├── 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
Construyendo y funcionando
- Dependencias de instalación:
- Modo de desarrollo (esté atento a los cambios):Este comando compila el código TypeScript a JavaScript y lo reconstruye automáticamente cuando se detectan cambios en el directorio
src/
. - Versión de producción (compilación única):
- Iniciar el servidor:
Pruebas
Inspector de MCP
Para probar servidores MCP, puede utilizar MCP Inspector , que es una herramienta de desarrollo interactiva para probar y depurar servidores MCP.
# 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
Agregar una nueva herramienta
- Agregue una nueva enumeración a la clase de enumeración
ToolName
. - Agregue su nueva herramienta al mapa de controladores en la clase
ToolFactory
. - Crea un nuevo archivo, exportando la clase que extiende
BaseToolHandler
.- Implementar el método
handle
de la clase base. - Implementar el método
getToolConfig
de la clase base.
- Una vez satisfecho, agréguelo al conjunto de
enabledTools
en index.ts
.
Generando tipos
# 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
Contribuyendo
Se agradecen los informes de errores y los comentarios en forma de problemas de Github. Para obtener instrucciones sobre cómo contribuir, consulte CONTRIBUTING.md.