Skip to main content
Glama

mcp-confluent

Official
by confluentinc

mcp-汇合

一个 MCP 服务器实现,使 AI 助手能够与 Confluent Cloud REST API 交互。该服务器允许 Claude Desktop 和 Goose CLI 等 AI 工具通过自然语言交互来管理 Kafka 主题、连接器和 Flink SQL 语句。

演示

Goose 命令行界面

Goose CLI 演示

克劳德桌面

Claude 桌面演示

目录

用户指南

入门

  1. **创建.env文件:**将示例.env文件结构(如下所示)复制到项目根目录中名为.env的新文件中。
  2. **填充.env文件:**填写 Confluent Cloud 环境所需的值。有关每个变量的详细信息,请参阅配置部分。
  3. 安装 Node.js (如果尚未安装)
    • 我们建议使用NVM (Node 版本管理器)来管理 Node.js 版本
    • 安装并使用 Node.js:
    nvm install 22 nvm use 22

配置

在项目的根目录中创建一个.env文件,其配置如下:

# .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"

环境变量参考

多变的描述默认值必需的
HTTP_HOST绑定 HTTP 传输的主机(字符串)“本地主机”是的
HTTP_PORT用于 HTTP 传输的端口(数字(最小值:0))3000是的
引导服务器用于建立与 Kafka 集群的初始连接的 Kafka 代理地址列表,格式为 host1,host2(字符串)
CONFLUENT_CLOUD_API_KEYConfluent Cloud 平台管理的主 API 密钥,用于管理整个组织的资源(字符串(最小值:1))
CONFLUENT_CLOUD_API_SECRET主 API 密钥与 CONFLUENT_CLOUD_API_KEY 配对,用于全面的 Confluent Cloud 平台管理(字符串(最小值:1))
CONFLUENT_CLOUD_REST_ENDPOINTConfluent Cloud REST API 服务的基本 URL(默认)
FLINK_API_KEY用于访问 Confluent Cloud 的 Flink 服务的身份验证密钥,包括计算池和 SQL 语句管理(字符串(最小值:1))
FLINK_API_SECRET与 FLINK_API_KEY 配对的秘密令牌,用于对 Confluent Cloud 的 Flink 服务进行身份验证访问(字符串(最小值:1))
FLINK_COMPUTE_POOL_IDFlink 计算池的唯一标识符,必须以“lfcp-”前缀开头(字符串)
FLINK_DATABASE_NAME在 Flink SQL 操作中用作数据库引用的关联 Kafka 集群的名称(字符串(最小值:1))
FLINK_ENV_IDFlink 环境的唯一标识符,必须以“env-”前缀开头(字符串)
FLINK_ENV_NAME用于识别和显示目的的 Flink 环境的人类可读名称(字符串(最小值:1))
FLINK_ORG_IDConfluent Cloud 中用于 Flink 资源管理的组织标识符(字符串(最小值:1))
FLINK_REST_ENDPOINT用于 SQL 语句和计算池管理的 Confluent Cloud Flink REST API 端点的基本 URL(字符串)
KAFKA_API_密钥与 Kafka 集群建立安全连接所需的身份验证凭证(用户名)(字符串(最小值:1))
KAFKA_API_SECRET与 KAFKA_API_KEY 配对的身份验证凭证(密码),用于安全的 Kafka 集群访问(字符串(最小值:1))
KAFKA_CLUSTER_IDConfluent Cloud 生态系统中 Kafka 集群的唯一标识符(字符串(最小值:1))
KAFKA_ENV_IDKafka 集群的环境标识符,必须以“env-”前缀开头(字符串)
KAFKA_REST_ENDPOINTKafka 集群管理的 REST API 端点(字符串)
SCHEMA_REGISTRY_API_KEY用于访问 Schema Registry 服务以管理和验证数据模式的身份验证密钥(字符串(最小值:1))
SCHEMA_REGISTRY_API_SECRET与 SCHEMA_REGISTRY_API_KEY 配对的身份验证密钥,用于安全 Schema Registry 访问(字符串(最小值:1))
SCHEMA_REGISTRY_ENDPOINT用于访问 Schema Registry 服务以管理数据模式的 URL 端点(字符串)

用法

此 MCP 服务器设计用于与各种 MCP 客户端配合使用,例如 Claude Desktop 或 Goose CLI/Desktop。具体配置和交互方式取决于您使用的客户端。但一般步骤如下:

  1. **启动服务器:**您可以通过以下两种方式之一运行 MCP 服务器:
    • **从源代码构建:**按照开发者指南中的说明从源代码构建并运行服务器。这通常涉及:
      • 安装依赖项( npm install
      • 构建项目( npm run buildnpm run dev
    • **使用 npx:**您可以直接使用 npx 启动服务器(无需构建):
      npx -y @confluentinc/mcp-confluent -e /path/to/confluent-mcp-server/.env
  2. **配置您的 MCP 客户端:**每个客户端都有其自身的方式来指定 MCP 服务器的地址和所需的凭据。您需要配置您的客户端(例如 Claude、Goose)以连接到该服务器运行的地址(可能是带有特定端口的localhost )。服务器运行的端口可以通过环境变量进行配置。
  3. **启动 MCP 客户端:**将客户端配置为连接到 MCP 服务器后,即可启动 MCP 客户端。启动时,它会在本地创建一个 MCP 服务器实例。该实例将负责管理数据模式并代表您与 Confluent Cloud 进行交互。
  4. **通过客户端与 Confluent 交互:**客户端连接后,您可以使用客户端界面与 Confluent Cloud 资源进行交互。客户端会向 MCP 服务器发送请求,然后 MCP 服务器会代表您与 Confluent Cloud 进行交互。

配置 Claude 桌面

有关安装 Claude Desktop 和 MCP 服务器的更多详细信息,请参阅此处

要配置 Claude Desktop 以使用此 MCP 服务器:

  1. 打开 Claude 桌面配置
    • 在 Mac 上: ~/Library/Application Support/Claude/claude_desktop_config.json
    • 在 Windows 上: %APPDATA%\Claude\claude_desktop_config.json
  2. 编辑配置文件
    • 在您喜欢的文本编辑器中打开配置文件
    • 使用以下方法之一添加或修改配置:
    { "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" ] } } }

    /path/to/confluent-mcp-server/替换为您安装此 MCP 服务器的实际路径。

  3. 重启Claude桌面
    • 关闭并重新打开 Claude Desktop 以使更改生效
    • Claude Desktop 启动时,MCP 服务器将自动启动

现在,Claude Desktop 将配置为使用您的本地 MCP 服务器进行 Confluent 交互。

克劳德·托尔斯

配置 Goose CLI

有关如何安装 Goose CLI 的详细说明,请参阅此处

安装后,请按照以下步骤操作:

  1. 运行配置命令:
    goose configure
  2. 按照交互式提示进行操作:
    • 选择Add extension
    • 选择Command-line Extension
    • 输入mcp-confluent作为扩展名称
    • 选择以下配置方法之一:
    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

/path/to/confluent-mcp-server/替换为您安装此 MCP 服务器的实际路径。

鹅配置

mcp-confluent CLI 用法

MCP 服务器提供灵活的命令行界面 (CLI),用于高级配置和控制。CLI 允许您指定环境文件、传输方式,并微调启用或阻止哪些工具。

基本用法

您可以查看所有 CLI 选项并获取以下帮助:

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
示例:使用所有传输进行部署
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"}
示例:使用文件中的工具列表
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.

**提示:**允许列表优先于阻止列表应用。如果两者都未提供,则默认启用所有工具。

开发者指南

项目结构

/ ├── 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

构建和运行

  1. 安装依赖项:
    npm install
  2. 开发模式(注意变化):
    npm run dev
    此命令将 TypeScript 代码编译为 JavaScript,并在src/目录中检测到更改时自动重建。
  3. 生产构建(一次性编译):
    npm run build
  4. 启动服务器:
    npm run start

测试

MCP 检查器

要测试 MCP 服务器,您可以使用MCP Inspector ,这是一个用于测试和调试 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

添加新工具

  1. 向枚举类ToolName添加一个新枚举。
  2. 将您的新工具添加到ToolFactory类中的处理程序映射中。
  3. 创建一个新文件,导出扩展BaseToolHandler类。
    1. 实现基类的handle方法。
    2. 实现基类的getToolConfig方法。
  4. 一旦满意,就将其添加到index.ts中的enabledTools集合中。

生成类型

# 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

贡献

欢迎通过 Github Issues 提交 Bug 报告和反馈。贡献指南请参阅CONTRIBUTING.md

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

为与 Confluent Kafka 和 Confluent Cloud REST API 交互而构建的 MCP 服务器实现。

  1. 演示
    1. Goose 命令行界面
    2. 克劳德桌面
  2. 目录
    1. 用户指南
      1. 入门
      2. 配置
      3. 环境变量参考
      4. 用法
      5. 配置 Claude 桌面
      6. 配置 Goose CLI
      7. mcp-confluent CLI 用法
    2. 开发者指南
      1. 项目结构
      2. 构建和运行
      3. 测试
      4. 添加新工具
      5. 生成类型
      6. 贡献

    Related MCP Servers

    • -
      security
      A
      license
      -
      quality
      MCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.
      Last updated -
      4
      3
      TypeScript
      MIT License
    • -
      security
      A
      license
      -
      quality
      MCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.
      Last updated -
      13
      2
      TypeScript
      MIT License
    • -
      security
      A
      license
      -
      quality
      An MCP server that exposes HTTP methods defined in an OpenAPI specification as tools, enabling interaction with APIs via the Model Context Protocol.
      Last updated -
      2
      Python
      MIT License
    • A
      security
      F
      license
      A
      quality
      An MCP server implementation that enables interaction with the Unstructured API, providing tools to list, create, update, and manage sources, destinations, and workflows.
      Last updated -
      39
      28
      • Apple

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/confluentinc/mcp-confluent'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server