# @confluentinc/mcp-confluent 中文文档

规范地址：https://npmcn.com/package/%40confluentinc/mcp-confluent/

版本：1\.6\.1
npm 元数据更新时间：2026-10-26T17:19:39.071Z
中文译文更新时间：2026-11-10T15:43:23.048Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40confluentinc/mcp-confluent
原文对照：https://npmcn.com/package/%40confluentinc/mcp-confluent/?lang=original
项目主页：https://www.confluent.io/blog/ai-agents-using-anthropic-mcp/
源码仓库：https://github.com/confluentinc/mcp-confluent

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：1.8 MB，589 个文件
- 模块格式：ES Module
- TypeScript 类型：未声明
- Node.js 要求：\>=22\.23\.4
- 运行依赖：22 个
- 首次发布：2025-04-09T19:05:52.793Z
- 最新版本发布：2026-10-26T17:19:38.626Z
- 近 30 天下载量：5616（2026-10-11 至 2026-11-09，npm 官方下载统计）
- 已发布版本数：15（近 12 个月 9 个）

## 中文简介

相容的 MCP 服务器

## 安装

```sh
npm install @confluentinc/mcp-confluent
```

也可以使用：`pnpm add @confluentinc/mcp-confluent`、`yarn add @confluentinc/mcp-confluent`、`bun add @confluentinc/mcp-confluent`

## README

# 相容的 MCP 服务器

[![npm version](https://img.shields.io/npm/v/@confluentinc/mcp-confluent.svg)](https://www.npmjs.com/package/@confluentinc/mcp-confluent) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://npmcn.com/package/%40confluentinc/mcp-confluent/LICENSE)

开源 [MCP 服务器](https://modelcontextprotocol.io/) 使AI助手能够通过自然语言与Confluent Cloud,Confluent Platform,以及独立的Apache Kafka部署交互. 它在整个Kafka、Flink SQL、Schema Registration、Connectors、Tableflows等提供50+工具,以及更多 -- -- 可用于任何MCP兼容客户端,包括克洛德桌面、克洛德代码、Cursor、VS代码、Goose和双子座CLI.

> \[TIP\] **已经是云端客户了?** 顺理成章 [完全管理 MCP 服务器](https://docs.confluent.io/cloud/current/ai/ai-tools/managed-mcp-server.html) 没有本地服务器可运行,也没有依赖性可安装. 它为您提供了连接云资源与 AI 动力连接器诊断, 由您现有的 RBAC 权限管理. 如果您需要 Confluent 平台/ 自我管理的 Kafka 支持, 或者想要自定义和扩展工具集, 请使用此开源服务器 .
> 
> **注:** 开源的MCP服务器是一个社区支持的项目. 团结不提供专门的支持, 如果您遇到问题或想要投稿, 请在此寄存器中直接打开一个问题或拉动请求 .

## 快速启动

> **先决条件:** [节点.js 22.23.4+](https://nodejs.org/)。 。 。 . 如果你想和他互动 [阴云](https://confluent.cloud/),需要先创建账户.

1.  生成一个快 `config.yaml` 在工程根中的文件 :

```bash
npx @confluentinc/mcp-confluent --init-config
```

2.  编辑 `config.yaml` 包含您的连接细节的文件,然后 :

```bash
npx @confluentinc/mcp-confluent --config ./config.yaml
```

见 [开始](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-getting-started) 完整设置指令和 [配置 MCP 客户端](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-configuring-mcp-clients) 与您首选的 AI 工具结合.

## 目录

-   [快速启动](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-quick-start)
-   [可用工具](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-available-tools)
    -   [总是可用](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-always-available-tools)
    -   [阴云](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-available-tools-for-confluent-cloud)
    -   [当地部署](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-available-tools-for-local-deployments)
-   [使用相容平台](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-using-with-confluent-platform)
-   [开始](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-getting-started)
-   [配置](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-configuration)
-   [OAuth 连接云认证](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-oauth-authentication-for-confluent-cloud)
-   [CLI 使用量](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-cli-usage)
-   [配置 MCP 客户端](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-configuring-mcp-clients)
-   [遥测](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-telemetry)
-   [解决问题](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-troubleshooting)
-   [捐款](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-contributing)

## 可用工具

工具是自动启用的,在您解析的配置中将存在服务块;参见 [说明.md](https://npmcn.com/package/%40confluentinc/mcp-confluent/CONFIGURATION.md#tool-enablement-which-block-lights-up-what) 用于完整的块到工具映射.

您可以通过 CLI 列出所有可用的工具 :

```bash
npx -y @confluentinc/mcp-confluent --list-tools
```

### 总是可用工具

这些工具不需要任何服务块或认证——它们甚至在一个赤裸的配置上被启用了,不管哪个配置了其余的配置目标.

| 类别 | 工具 | 说明 |
| --- | --- | --- |
| **文档** | `search-product-docs`, (中文(简体) ), `get-product-doc-page` | 搜索相容产品文件并获取完整页面内容 |
| **诊断** | `explain-disabled-tools`, (中文(简体) ), `list-configured-connections`, (中文(简体) ), `config-help`, (中文(简体) ), `describe-configured-connection` | 解释为什么没有工具,列出每个工具上配置的连接和启用的工具,建议YAML启用特定工具,并描述一个连接的配置和工具可用性 |

### 组合云可用工具

这些工具需要端点并针对特定的相容云组件进行认证. 参见 [`config.example.yaml`](https://npmcn.com/package/%40confluentinc/mcp-confluent/config.example.yaml) 用于全套配置变量. 标有 1 的类别 [OAuth 认证](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-oauth-authentication-for-confluent-cloud) ——通过浏览器签名,而不是提供API密钥.

| 类别 | 工具 | 说明 |
| --- | --- | --- |
| **卡夫卡语Name** 1个 | `list-topics`, (中文(简体) ), `create-topics`, (中文(简体) ), `delete-topics`, (中文(简体) ), `produce-message`, (中文(简体) ), `consume-messages`, (中文(简体) ), `list-consumer-groups`, (中文(简体) ), `describe-consumer-group`, (中文(简体) ), `get-consumer-group-lag`, (中文(简体) ), `alter-topic-config`, (中文(简体) ), `get-topic-config` | 管理主题,制作/播放信息,检查消费者群体,配置主题设置 |
| **闪烁 SQL** 1个 | `create-flink-statement`, (中文(简体) ), `list-flink-statements`, (中文(简体) ), `get-flink-statement-results`, (中文(简体) ), `delete-flink-statements`, (中文(简体) ), `get-flink-statement-exceptions`, (中文(简体) ), `list-compute-pools` | 创建和管理 Flink SQL 语句; 发现 Flink 计算池 |
| **闪烁目录** 1个 | `list-flink-catalogs`, (中文(简体) ), `list-flink-databases`, (中文(简体) ), `list-flink-tables`, (中文(简体) ), `describe-flink-table`, (中文(简体) ), `get-flink-table-info` | 探索 Flink 目录、数据库和表格计划 |
| **断开诊断** 1个 | `check-flink-statement-health`, (中文(简体) ), `detect-flink-statement-issues`, (中文(简体) ), `get-flink-statement-profile` | 健康检查、问题检测和查询概况 |
| **连接器** 1个 | `list-connectors`, (中文(简体) ), `get-connector-config`, (中文(简体) ), `get-connector-offsets`, (中文(简体) ), `get-connector-status`, (中文(简体) ), `get-connector-tasks`, (中文(简体) ), `get-connector-error-summary`, (中文(简体) ), `get-connector-error-recommendations`, (中文(简体) ), `get-connector-logs`, (中文(简体) ), `create-connector` 2,二, `delete-connector`, (中文(简体) ), `pause-connector`, (中文(简体) ), `resume-connector`, (中文(简体) ), `restart-connector`, (中文(简体) ), `update-connector-config` | 检查和管理 Kafka 连接器 |
| **Schema 书记官处** 1个 | `list-schemas`, (中文(简体) ), `create-schema`, (中文(简体) ), `delete-schema` | 列出、检查、创建和删除数据计划 |
| **目录标记( T)** 1个 | `search-topics-by-tag`, (中文(简体) ), `search-topics-by-name`, (中文(简体) ), `create-topic-tags`, (中文(简体) ), `delete-tag`, (中文(简体) ), `remove-tag-from-entity`, (中文(简体) ), `add-tags-to-topic`, (中文(简体) ), `list-tags` | 使用标签组织和搜索话题 |
| **组织、环境和集群** 1个 | `list-organizations`, (中文(简体) ), `list-environments`, (中文(简体) ), `read-environment`, (中文(简体) ), `list-clusters` | 发现密云资源 |
| **表格流量** 1个 | `create-tableflow-topic`, (中文(简体) ), `list-tableflow-topics`, (中文(简体) ), `read-tableflow-topic`, (中文(简体) ), `update-tableflow-topic`, (中文(简体) ), `delete-tableflow-topic`, (中文(简体) ), `list-tableflow-regions` | 管理基于表格的话题 |
| **表格流目录** 1个 | `create-tableflow-catalog-integration`, (中文(简体) ), `list-tableflow-catalog-integrations`, (中文(简体) ), `read-tableflow-catalog-integration`, (中文(简体) ), `update-tableflow-catalog-integration`, (中文(简体) ), `delete-tableflow-catalog-integration` | 管理表格流目录集成(例如 AWS Glue) |
| **计量** 1个 | `list-available-metrics`, (中文(简体) ), `query-metrics` | 发现和查询 Confluent Cloud 操作度量衡 |
| **计费** 1个 | `list-billing-costs` | 查询账单和费用数据 |

1 也可在OAuth项下查阅 [OAuth 连接云认证](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-oauth-authentication-for-confluent-cloud) 用于设置和警告. 目前没有标记的类别需要 a `direct` 连接静态 API 密钥; OAuth 迁移正在进行中.

2 OAuth 无法提供的个人工具;需要 `direct` 与静态 API 密钥连接.

### 可用于本地部署的工具

这些工具仅需要 Kafka 或 Schema 注册端点 - 不需要 Confluent Cloud API 密钥/ 机密 . 地方发展的理想与自我管理的集群,包括Confluent平台.

```yaml
# minimal config.yaml for local development
connections:
  local:
    type: direct
    kafka:
      bootstrap_servers: "localhost:9092"
    schema_registry:
      endpoint: "http://localhost:8081"
```

现成的可使用变体 [`sample_configs/`](https://npmcn.com/package/%40confluentinc/mcp-confluent/sample_configs/)。 。 。 .

| 类别 | 工具 | 说明 |
| --- | --- | --- |
| **卡夫卡语Name** | `list-topics`, (中文(简体) ), `create-topics`, (中文(简体) ), `delete-topics`, (中文(简体) ), `produce-message`, (中文(简体) ), `consume-messages`, (中文(简体) ), `list-consumer-groups`, (中文(简体) ), `describe-consumer-group`, (中文(简体) ), `get-consumer-group-lag` | 管理专题、制作/接收信息、检查消费者群体 |
| **Schema 书记官处** | `list-schemas`, (中文(简体) ), `create-schema`, (中文(简体) ), `delete-schema` | 列出、检查、创建和删除数据计划 |

## 使用相容平台

`mcp-confluent` 运行与自我管理的相容平台集群(CP)对接的方式与任何本地的Kafka + Schema 注册部署相同: 点 a `direct` 联系你的经纪人和Schema注册处. CP连接暴露了与任何其他当地部署相同的工具——见: [可用于本地部署的工具](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-available-tools-for-local-deployments)。 。 。 . Confluent Cloud 工具(Flink, Tableflow, Billing, Metrics等)需要Confluent Cloud 账户,并在CP上保持被禁用. 唯一的区别与a `localhost:9092` 设置是认证和TLS.

### YAML 配置样本

[`sample_configs/confluent-platform.yaml`](https://npmcn.com/package/%40confluentinc/mcp-confluent/sample_configs/confluent-platform.yaml) 是一个可复制的启动器. 它假设PLAIN在SASL SSL之上用于Kafka,而HTTP Basic Auth则用于Schema注册. 自定义经纪人和Schema注册 URL,并通过 `${KAFKA_API_KEY}` 编号 : `${KAFKA_API_SECRET}` 编号 : `${SCHEMA_REGISTRY_API_KEY}` 编号 : `${SCHEMA_REGISTRY_API_SECRET}` 环境变量. 如果集群使用 SCRAM 或其他 SASL 机制, 请覆盖 `security.protocol` 财务报告和审定财务报表 `sasl.mechanisms` 通过 `kafka.extra_properties` 地图在文件.

### TLS 信任 (内部 CA)

CP集群经常坐落在内部CA后. 如果您看到 TLS 与经纪人或 Schema 注册商握手失败, 请在启动服务器时将节点指向您的 CA 捆绑 :

```bash
NODE_EXTRA_CA_CERTS=/path/to/internal-ca.pem pnpm run start -- --config path/to/config.yaml
```

### 尾到尾烟雾测试

嵌入式编程堆栈( R)[`docker-compose.cp-test.yml`](https://npmcn.com/package/%40confluentinc/mcp-confluent/docker-compose.cp-test.yml)提出当地CP Kafka(KRaft, SASL PLAINTEXT/PLAIN)加上未经认证的Schema注册. 匹配的集成测试被标记 `@cp` 住在他们管理者的旁边 `*.cp.integration.test.ts`数字 :

```bash
docker compose -f docker-compose.cp-test.yml up -d
# Wait ~30s for Kafka + SR to become ready, then:
CP_KAFKA_USERNAME=mcp CP_KAFKA_PASSWORD=mcp-secret \
  pnpm run test:integration --tags-filter=@cp
docker compose -f docker-compose.cp-test.yml down -v
```

测试没有被确定 所以 `pnpm run test:unit` 和默认 `pnpm run test:integration` 与你真正的相通的"云"账户相比,如果你没有运行的多克堆栈,则不会受到影响.

## 开始

### 先决条件

-   **节点.js 22.23.4或以后** - 我们建议使用 [国家核查团](https://github.com/nvm-sh/nvm) 用于管理版本 :
    
    ```bash
    nvm install 22
    nvm use 22
    ```
    
-   **[小时](https://pnpm.io/installation)** - 只需要从源头建造 `npx` 上面的快速开始并不需要它). 在macOS上,最简单的安装是Homebrew; `npm` 工作跨平台 :
    
    ```bash
    brew install pnpm        # macOS
    # or, cross-platform:
    npm install -g pnpm
    ```
    
    见pnpm的 [安装指南](https://pnpm.io/installation) 其他选项. 准确的pnpm版本被钉入 `packageManager` 领域 `package.json`pnpm 自动运行被绑定的版本(通过其内置的软件包管理器版本管理),所以最近的 pnpm 安装是您所需要的全部——不需要单独的 Corepack 设置.
-   Kafka 或 Schema 注册处运行的地方环境,或 **阴云** 带有适当的 API 密钥或登录证书的账户,如果 [使用 OAuth 认证](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-oauth-authentication-for-confluent-cloud)。 。 。 .

### 常规设置步骤

这个MCP服务器被设计为用于各种MCP客户端,如克洛德桌面(Claude Desktop),副驾驶(Copilot),或鹅CLI/Desktop. 具体配置和互动将取决于您使用的客户端 .

MCP 服务器可以认证为 Confluent Cloud 通过 **OAuth (PKCE) (捷克语)** 除YAML配置中定义的静态API密钥外. 见 [OAuth 认证相容云](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-oauth-authentication-for-confluent-cloud) 更多细节.

配置(如果不使用OAuth)和运行此 MCP 的一般步骤是:

1.  **创建配置文件 :** 复制所提供的 [`config.yaml` 实例](https://github.com/confluentinc/mcp-confluent/blob/main/config.example.yaml) 文件到您的工程的根. 您可以使用 CLI 来拖曳当前目录中的一条 :

```bash
npx @confluentinc/mcp-confluent --init-config
```

2.  **复制文件 :** 填入您的相容云环境的必要值 . 见 [说明.md](https://npmcn.com/package/%40confluentinc/mcp-confluent/CONFIGURATION.md) ; 仅填写您需要的服务块(每个块允许一组工具).
    
3.  **启动服务器 :** 您可以以两种方式运行 MCP 服务器 :
    
    -   **来源:** 执行指令 [贡献指南](https://npmcn.com/package/%40confluentinc/mcp-confluent/CONTRIBUTING.md) 从源头构建和运行服务器. 这通常涉及:
        
        -   安装依赖关系( E)`pnpm install`(中文(简体) )
        -   建设项目`pnpm run build` 或者说 `pnpm run dev`(中文(简体) )
    -   **用 npx 键 :** 您可以直接使用 npx 启动服务器, 无需构建 :
        
        ```bash
        npx @confluentinc/mcp-confluent --config /path/to/myconfig.yaml
        ```
        
4.  **配置您的 MCP 客户端 :** 每个客户端(如克洛德,高斯等)将拥有自己的方式来指定MCP服务器的地址和任何必要的证书. 你需要这样 [配置客户端](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-configuring-mcp-clients) 连接到服务器运行的地址( 可能) `localhost` 带有特定端口. 服务器运行的端口通过 `server.http.port` 内 `config.yaml`。 。 。 .
    
5.  **启动您的 MCP 客户端 :** 一旦您的客户端被配置到连接到 MCP 服务器, 您可以启动您的 MCP 客户端, 启动时它会在当地站起这个 MCP 服务器的一个实例 . 这个例子将负责管理数据计划,并代表您与资源互动.
    
6.  **通过客户端与资源互动 :** 一旦客户端被连接并配置,您就可以使用客户端的界面与Confluent Cloud或本地资源进行交互. 客户端会向这个 MCP 服务器发送请求, 然后由它代表您与可用的连接交互 .
    

## 配置

完整的配置参考文献——YAML schema,每个服务块,env-var 插图,OAuth和HTTP/SSE 认证设置,(已失效)后遗存 env-var 表,以及工具到块映射——活在 [说明.md](https://npmcn.com/package/%40confluentinc/mcp-confluent/CONFIGURATION.md)。 。 。 .

> **相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相相.** 该放出舰只在YAML(`-c config.yaml`) 和后遗症(env-var路径)`-e config.env`)为一通接通. Env-var-只使用路径会在近未来放出时发出启动警告并被去除一出或两出后. 定义多连接(或无)是YAML唯一的——env-var路径只能表达单一连接. 见 [说明.md 两个路径, 一个配置](https://npmcn.com/package/%40confluentinc/mcp-confluent/CONFIGURATION.md#two-paths-one-configuration) 财务报告和审定财务报表 [Configulation.md → 多重连接(和零连接)](https://npmcn.com/package/%40confluentinc/mcp-confluent/CONFIGURATION.md#multiple-connections-and-zero-connections)。 。 。 .

### Tableflow 命令的前提设置( S)

Tableflow 工具通过 Confluent Cloud 中的 Flink 运行时间与云存储器(如 AWS S3)和一个元数据目录(如 AWS Glue)代表您交互. Flink 运行时需要您云账户上的 IAM 权限, 这些权限必须获得并连接到 Confluent Cloud 之后,任何 Tableflow 工具才会成功 .

跟着 **[表格流快速启动自定义存储和粘贴](https://docs.confluent.io/cloud/current/topics/tableflow/get-started/quick-start-custom-storage-glue.html)** 确定作用、政策和提供者的一体化. 跳过此步骤会导致mcp-confluent尝试提供或管理由表格驱动的表格时的授权出错.

## OAuth 连接云认证

MCP 服务器可以认证为 Confluent Cloud 通过 **OAuth (PKCE) (捷克语)** 而不是静态 API 键. 在第一个需要 Confluent 访问的工具呼叫上,服务器打开了您的浏览器到 Confluent Cloud 签名的页面;随后的工具调用产生的会话再使用. 无法提供 API 密钥 .

### 设置

```bash
npx @confluentinc/mcp-confluent --init-oauth-config
# edit ./config.yaml if needed, then:
npx @confluentinc/mcp-confluent --config ./config.yaml
```

`--init-oauth-config` 丢弃启动器 [`config.oauth.example.yaml`](https://npmcn.com/package/%40confluentinc/mcp-confluent/config.oauth.example.yaml) 输入 `./config.yaml`。 。 。 . 整个档案基本上是:

```yaml
connections:
  ccloud-oauth:
    type: oauth
```

见 [Configulation.md – 认证模式](https://npmcn.com/package/%40confluentinc/mcp-confluent/CONFIGURATION.md#authentication-modes) 用于完整的计划 和人机学.

1个标记的类别 [组合云可用工具](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-available-tools-for-confluent-cloud) 今天在OAuth的领导下工作;其他一切仍需要 `direct` 与静态 API 密钥连接.

## CLI 使用量

MCP服务器为高级控制提供了灵活的指令行接口(CLI). CLI 允许您选择配置文件, 传输和微调哪些工具被启用或被屏蔽 .

### 基本用途

您可以查看所有 CLI 选项, 帮助 :

```bash
npx @confluentinc/mcp-confluent --help
```

显示输出

```bash
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-auth                   Disable authentication for HTTP/SSE transports. WARNING: Only use in development environments.
  --allowed-hosts <hosts>          Comma-separated list of allowed Host header values for DNS rebinding protection.
  --generate-key                   Generate a secure API key for MCP_API_KEY and print it to stdout, then exit.
  -h, --help                       display help for command
```

### 示例:使用所有运输工具进行部署

```bash
npx @confluentinc/mcp-confluent -c config.yaml --transport http,sse,stdio
```

显示输出

```json
...
{"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"}
```

### 示例:只允许特定工具

```bash
npx @confluentinc/mcp-confluent -c config.yaml --allow-tools produce-message,consume-messages
```

只有指定的工具会被启用;所有其他工具将被禁用.

### 示例: 屏蔽某些工具

```bash
npx @confluentinc/mcp-confluent -c config.yaml --block-tools produce-message,consume-messages
```

除指定工具外,所有工具都将启用.

### 示例:从文件使用工具列表

您还可以在文件中维护允许/ 屏蔽列表( 每行一个工具名) :

```bash
npx -y @confluentinc/mcp-confluent -c config.yaml --allow-tools-file allow.txt --block-tools-file block.txt
```

### 示例: 列出所有可用的工具

```bash
npx -y @confluentinc/mcp-confluent --list-tools
```

显示输出

```text
billing:
  list-billing-costs: Retrieve billing cost data for a Confluent Cloud organization within a specified date range with pagination support

catalog:
  add-tags-to-topic: Assign existing tags to Kafka topics in Confluent Cloud.
  create-topic-tags: Create new tag definitions in Confluent Cloud.
  delete-tag: Delete a tag definition from Confluent Cloud.
  list-tags: Retrieve all tags with definitions from Confluent Cloud Schema Registry.
  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.

confluent-cloud:
  list-clusters: Get all clusters in the Confluent Cloud environment
  list-environments: Get all environments in Confluent Cloud with pagination support
  list-organizations: List Confluent Cloud organizations the current credentials can see. Paginated; if the response includes a nextPageTok...
  read-environment: Get details of a specific environment by ID

connect:
  create-connector: Create a new connector. Returns the new connector information if successful.
  delete-connector: Delete an existing connector. Returns success message if deletion was successful.
  get-connector-config: Retrieve the full configuration map for a connector. Returns the flat config object the connector was created/updated...
  get-connector-error-recommendations: Get suggested remediation steps for a connector that has failed or is in an error state. Returns a one-liner when no recommendations are available.
  get-connector-error-summary: Summarize a connector's current errors. Projects Confluent Cloud's /status diagnostics into a compact, agent-friendly form. Returns a one-liner when the connector is healthy.
  get-connector-logs: Retrieve recent log entries for a Confluent Cloud connector from the Cloud logging API. Defaults to the last hour of ERROR-level entries. Paginated via nextPageToken.
  get-connector-offsets: Retrieve current offsets for a connector's tasks. Useful for detecting lag, stalled tasks, or assisting recovery.
  get-connector-status: Get the current state of a connector and its tasks (RUNNING, FAILED, PAUSED, UNASSIGNED) including failure traces if ...
  get-connector-tasks: List the tasks of a connector along with their configurations.
  list-connectors: Retrieve a list of "names" of the active connectors. You can then make a read request for a specific connector by name.
  pause-connector: Pause a running connector and its tasks. Idempotent.
  restart-connector: Restart a connector and its tasks. Asynchronous; the connector will not transition state synchronously.
  resume-connector: Resume a paused connector and its tasks. Idempotent.
  update-connector-config: Update the configuration of an existing connector. Full-replace: omitted keys are removed and the connector is reconf...

docs:
  get-product-doc-page: Fetch the full markdown content of a Confluent product documentation page. Accepts URLs under https://docs.confluent....
  search-product-docs: Search Confluent product documentation (docs.confluent.io, developer.confluent.io, support.confluent.io) by keyword.

flink:
  check-flink-statement-health: Perform an aggregate health check for a Flink SQL statement. Returns status (healthy/warning/critical), current phase...
  create-flink-statement: Make a request to create a statement.
  delete-flink-statements: Make a request to delete a statement.
  describe-flink-table: Get full schema details for a Flink table via INFORMATION_SCHEMA.COLUMNS. Returns column names, data types (including...
  detect-flink-statement-issues: Detect issues for a Flink SQL statement by analyzing status, exceptions, and performance metrics. Identifies problems...
  get-flink-statement-exceptions: Retrieve the 10 most recent exceptions for a Flink SQL statement. Useful for diagnosing failed or failing statements.
  get-flink-statement-profile: Get Query Profiler data for a Flink SQL statement. Returns the task graph with human-readable task/operator names, pe...
  get-flink-statement-results: Fetch the result rows produced by a Flink SQL statement.
  get-flink-table-info: Get table metadata via INFORMATION_SCHEMA.TABLES. Returns watermark configuration, distribution info, and table type.
  list-compute-pools: Get the Flink compute pools in the Confluent Cloud environment. Paginated; if the response includes a nextPageToken, pas...
  list-flink-catalogs: List all catalogs available in the Flink environment via INFORMATION_SCHEMA.CATALOGS.
  list-flink-databases: List all databases (schemas) in a Flink catalog via INFORMATION_SCHEMA.SCHEMATA. Returns catalog and database names.
  list-flink-statements: Retrieve a sorted, filtered, paginated list of all statements.
  list-flink-tables: List all tables in a Flink database via INFORMATION_SCHEMA.TABLES. Returns table names and types.

kafka:
  alter-topic-config: Alter topic configuration in Confluent Cloud.
  consume-messages: Consume messages from Kafka topics. Optionally restrict to a partition, start from an offset, timestamp, earliest, la...
  create-topics: Create one or more Kafka topics with an optional partition count and replication factor.
  delete-topics: Delete the topic with the given names.
  describe-consumer-group: Describe a single consumer group on a Kafka cluster. Returns the group's state, type, protocol, partition assignor, c...
  get-consumer-group-lag: Compute live offset lag for a single Kafka consumer group. Returns per-(topic, partition) {committedOffset, highWater...
  get-partition-offsets: Return per-partition low/high watermarks and message counts for a Kafka topic. Use this to size a backfill, measure l...
  get-topic-config: Retrieve configuration details for a specific Kafka topic.
  list-consumer-groups: List consumer groups on a Kafka cluster — wraps the broker's listGroups admin call. Optional filters narrow the resul...
  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...

mcp-server-diagnostics:
  config-help: Call when the user wants to enable or unlock a specific tool (e.g. "how do I enable the tableflow tools?", "what config does cr...
  explain-disabled-tools: Call when the user asks why a tool is missing or unavailable (e.g., "why can't I list Kafka topics?", "where are the ...
  list-configured-connections: List every configured connection and the connection-routable tools you can invoke against each. The connection id (th...

metrics:
  list-available-metrics: List available Confluent Cloud metrics and their filter fields from the Telemetry API. Use this tool BEFORE query-met...
  query-metrics: Query Confluent Cloud metrics from the Telemetry API. IMPORTANT: Use the list-available-metrics tool first to discove...

schema-registry:
  create-schema: Register a new schema (or a new version of an existing schema) under a subject in the Schema Registry.
  delete-schema: Delete a schema subject or a specific version from the Schema Registry. If version is omitted, all versions of the su...
  list-schemas: List all schemas in the Schema Registry.

tableflow:
  create-tableflow-catalog-integration: Make a request to create a catalog integration.
  create-tableflow-topic: Make a request to create a tableflow topic.
  delete-tableflow-catalog-integration: Make a request to delete a tableflow catalog integration.
  delete-tableflow-topic: Make a request to delete a tableflow topic.
  list-tableflow-catalog-integrations: Retrieve a sorted, filtered, paginated list of all catalog integrations.
  list-tableflow-regions: Retrieve a sorted, filtered, paginated list of all tableflow regions.
  list-tableflow-topics: Retrieve a sorted, filtered, paginated list of all tableflow topics.
  read-tableflow-catalog-integration: Make a request to read a catalog integration.
  read-tableflow-topic: Make a request to read a tableflow topic.
  update-tableflow-catalog-integration: Make a request to update a catalog integration.
  update-tableflow-topic: Make a request to update a tableflow topic.
```

> **提示 :** 允许列表在块列表之前应用. 如果不提供,则默认启用所有工具.

## 配置 MCP 客户端

请参考以下关于设置和使用此 MCP 服务器的分步指令指南 :

-   [克劳德代码](https://npmcn.com/package/%40confluentinc/mcp-confluent/docs/configuring-claude-code.md)
-   [克劳德桌面](https://npmcn.com/package/%40confluentinc/mcp-confluent/docs/configuring-claude-desktop.md)
-   [光标](https://npmcn.com/package/%40confluentinc/mcp-confluent/docs/configuring-cursor.md)
-   [双子座CLI](https://npmcn.com/package/%40confluentinc/mcp-confluent/docs/configuring-gemini-cli.md)
-   [鹅 CLI](https://npmcn.com/package/%40confluentinc/mcp-confluent/docs/configuring-goose-cli.md)
-   [IBM 鲍勃](https://npmcn.com/package/%40confluentinc/mcp-confluent/docs/configuring-ibm-bob.md)
-   [VS 代码](https://npmcn.com/package/%40confluentinc/mcp-confluent/docs/configuring-vs-code.md)
-   [风起浪起](https://npmcn.com/package/%40confluentinc/mcp-confluent/docs/configuring-windsurf.md)

## 遥测

此 MCP 服务器收集使用数据并报告服务器侧运行时间出错( 通过 [哨兵](https://sentry.io/)帮助作出改进. 您可以通过设置选择退出两者 `DO_NOT_TRACK=true` 环境(或 `server.do_not_track: true` 在YAML中). 见 [遥测.md](https://npmcn.com/package/%40confluentinc/mcp-confluent/telemetry.md) 详细了解所收集的和从未发送的.

## 解决问题

**"Node.js版本不支持"** - 该项目需要22.23.4节点或以后. 请检查您的版本 `node -v` 并在需要时升级.

**未出现的工具** - 每个工具都要求您在 `config.yaml`。 。 。 . 运行 `--list-tools` 以查看哪些工具是活动的,或引用 `explain-disabled-tools` 从客户端获取的MCP工具是出于每个工具的原因. 块到工具的映射在 [说明.md](https://npmcn.com/package/%40confluentinc/mcp-confluent/CONFIGURATION.md#tool-enablement-which-block-lights-up-what)。 。 。 .

**HTTP/ SSE 上的认证错误** -- 生成一个 API 密钥 `npx @confluentinc/mcp-confluent --generate-key` 并把它加进你的 `config.yaml` 下级 `server.auth.api_key`。 。 。 . 见 [运输安全](https://npmcn.com/package/%40confluentinc/mcp-confluent/CONFIGURATION.md#httpsse-transport-security)。 。 。 .

**连接被拒绝/ 端口冲突** - 说吧 默认的HTTP端口为8080. 设定 `server.http.port` 在你身边 `config.yaml` 来改变它.

**表格流授权错误** - 表格流工具需要您云层环境中特定的IAM权限. 见 [Tableflow 命令的前提设置( S)](https://npmcn.com/package/%40confluentinc/mcp-confluent/#readme-prerequisites--setup-for-tableflow-commands)。 。 。 .

## 捐款

错误报告和反馈以"Github Issues"的形式获得赞赏. 关于捐款准则,请参见: [捐款额](https://npmcn.com/package/%40confluentinc/mcp-confluent/CONTRIBUTING.md)

### 释放前测试

要将MCP服务器运行在预发版本的Beta测试或早期回馈上,将释放的tarball文件下载到本地目录. 然后,当运行任何 `npx` 命令,替换 `@confluentinc/mcp-confluent` 与去柏油球的路径,例如. `npx @~path/to/my/tarball --list-tools`

## 常见问题

### @confluentinc/mcp-confluent 是什么？

相容的 MCP 服务器

### 如何安装 @confluentinc/mcp-confluent？

在项目目录运行 npm install @confluentinc/mcp-confluent，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 mcp-confluent，可以用 npx mcp-confluent 直接运行。

### @confluentinc/mcp-confluent 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/confluentinc\_\_mcp-confluent 是否存在。

### @confluentinc/mcp-confluent 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @confluentinc/mcp-confluent 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=22\.23\.4。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @confluentinc/mcp-confluent 可以商用吗？

@confluentinc/mcp-confluent 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @confluentinc/mcp-confluent 的下载量有多少？

根据 npm 官方下载统计，@confluentinc/mcp-confluent 在 2026/10/11 – 2026/11/09 这 30 天内被下载 5,616 次，日均约 187 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @confluentinc/mcp-confluent 还在维护吗？

最新版本 1\.6\.1 发布于 2026/10/27（14 天前）；至今共发布 15 个版本，其中过去 12 个月发布了 9 个；首次发布于 2025/04/10。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

