关于 mcp-confluent
mcp-confluent 是供 AI 助手使用的开源 MCP 服务,支持 Confluent Cloud、Confluent Platform 和独立 Kafka 部署。工具涵盖 Kafka 操作,以及 Cloud 连接中的 Flink SQL、Schema Registry 和 Tableflow 等服务。
主要功能
- 01管理 Kafka 主题和消息
- 02检查消费者组
- 03运行并检查 Flink SQL
- 04管理连接器和架构
- 05查询指标与账单
- 06按连接配置工具
适用场景
- 01操作 Cloud 或本地集群中的 Kafka 主题
- 02诊断 Flink 语句和连接器
- 03探索架构与 Confluent 资源
MCP 相关
它向兼容 MCP 的客户端提供可配置的 Confluent 和 Kafka 工具。可用工具取决于配置的服务和连接类型。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
Confluent MCP Server
一个开源的 MCP 服务,可让 AI 助手通过自然语言与 Confluent Cloud、Confluent Platform 和独立部署的 Apache Kafka 交互。 它在 Kafka、Flink SQL、Schema Registry、Connectors、Tableflow 等领域提供 50 多种工具,可通过任何兼容 MCP 的客户端使用,包括 Claude Desktop、Claude Code、Cursor、VS Code、Goose 和 Gemini CLI。
提示
已经是 Confluent Cloud 客户? Confluent 提供完全托管的 MCP 服务,无需运行本地服务,也无需安装依赖项。 它可访问您的 Confluent Cloud 资源,并提供 AI 驱动的连接器诊断,同时受现有 RBAC 权限管控。 如果您需要 Confluent Platform / 自托管 Kafka 支持,或希望自定义和扩展工具集,请使用此开源服务。
注意: 此开源 MCP 服务由社区支持。Confluent 不提供专门支持,仅尽力提供支持,且不承诺服务级别。如果遇到问题或希望贡献,请直接在此代码库中提交 issue 或 pull request。
快速开始
先决条件: Node.js 22.23.4+。 如果您想与 Confluent Cloud 交互,需要先创建账户。
- 在项目根目录中快速生成
config.yaml文件:
npx @confluentinc/mcp-confluent --init-config
- 使用您的连接详细信息编辑
config.yaml文件,然后:
npx @confluentinc/mcp-confluent --config ./config.yaml
请参阅入门指南了解完整的设置说明,并参阅配置 MCP 客户端了解如何与您首选的 AI 工具集成。
目录
- 快速开始
- 可用工具
- 与 Confluent Platform 搭配使用
- 入门指南
- 配置
- Confluent Cloud 的 OAuth 身份验证
- CLI 用法
- 配置 MCP 客户端
- 遥测
- 故障排除
- 参与贡献
可用工具
工具会根据解析后的配置中包含哪些服务区块自动启用;有关区块与工具的完整映射,请参阅 CONFIGURATION.md。
您可以通过 CLI 列出所有可用工具:
npx -y @confluentinc/mcp-confluent --list-tools
始终可用的工具
这些工具无需服务配置块或身份验证 — 即使使用空配置,无论配置中的其他部分指向哪个部署,这些工具都会启用。
| 类别 | 工具 | 描述 |
|---|---|---|
| 文档 | search-product-docs、get-product-doc-page | 搜索 Confluent 产品文档并获取完整页面内容 |
| 诊断 | explain-disabled-tools、list-configured-connections、config-help、describe-configured-connection | 说明工具为何不可用,列出已配置的连接及每个连接上启用的工具,提供用于启用特定工具的 YAML 建议,并描述某个连接的配置和工具可用情况 |
Confluent Cloud 可用工具
这些工具需要针对特定 Confluent Cloud 组件配置端点并进行身份验证。
完整的配置变量列表请参阅 config.example.yaml。
标有 ¹ 的类别也支持OAuth 身份验证 — 通过浏览器登录,无需配置 API 密钥。
| 类别 | 工具 | 说明 |
|---|---|---|
| Kafka ¹ | 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 | 管理主题、生产/消费消息、检查消费者组并配置主题设置 |
| Flink SQL ¹ | create-flink-statement, list-flink-statements, get-flink-statement-results, delete-flink-statements, get-flink-statement-exceptions, list-compute-pools | 创建和管理 Flink SQL 语句;发现 Flink 计算池 |
| Flink Catalog ¹ | list-flink-catalogs, list-flink-databases, list-flink-tables, describe-flink-table, get-flink-table-info | 浏览 Flink 目录、数据库和表架构 |
| Flink Diagnostics ¹ | check-flink-statement-health, detect-flink-statement-issues, get-flink-statement-profile | 健康检查、问题检测和查询分析 |
| Connectors ¹ | 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 ², delete-connector, pause-connector, resume-connector, restart-connector, update-connector-config | 检查和管理 Kafka Connect 连接器 |
| Schema Registry ¹ | list-schemas, create-schema, delete-schema | 列出、检查、创建和删除数据架构 |
| Catalog & Tags ¹ | search-topics-by-tag, search-topics-by-name, create-topic-tags, delete-tag, remove-tag-from-entity, add-tags-to-topic, list-tags | 使用标签整理和搜索主题 |
| Organizations, Environments & Clusters ¹ | list-organizations, list-environments, read-environment, list-clusters | 查找 Confluent Cloud 资源 |
| Tableflow ¹ | create-tableflow-topic, list-tableflow-topics, read-tableflow-topic, update-tableflow-topic, delete-tableflow-topic, list-tableflow-regions | 管理启用了 Tableflow 的主题 |
| Tableflow Catalog ¹ | create-tableflow-catalog-integration, list-tableflow-catalog-integrations, read-tableflow-catalog-integration, update-tableflow-catalog-integration, delete-tableflow-catalog-integration | 管理 Tableflow 目录集成(例如 AWS Glue) |
| Metrics ¹ | list-available-metrics, query-metrics | 查找并查询 Confluent Cloud 运行指标 |
| Billing ¹ | list-billing-costs | 查询账单和费用数据 |
| ¹ 也支持 OAuth,设置方法和注意事项请参阅 Confluent Cloud 的 OAuth 身份验证。 | ||
目前未标记的类别需要通过 direct 连接使用静态 API 密钥;OAuth 迁移正在进行中。 |
² 此工具不支持 OAuth;需要通过 direct 连接使用静态 API 密钥。
本地部署可用的工具
这些工具只需要 Kafka 或 Schema Registry 端点,无需 Confluent Cloud API 密钥/密钥。 适用于使用自托管集群的本地开发,包括 Confluent Platform。
# minimal config.yaml for local development
connections:
local:
type: direct
kafka:
bootstrap_servers: "localhost:9092"
schema_registry:
endpoint: "http://localhost:8081"
可直接使用的配置版本位于 sample_configs/。
| 类别 | 工具 | 说明 |
|---|---|---|
| Kafka | list-topics、create-topics、delete-topics、produce-message、consume-messages、list-consumer-groups、describe-consumer-group、get-consumer-group-lag | 管理主题、生成/消费消息、检查消费者组 |
| Schema Registry | list-schemas、create-schema、delete-schema | 列出、检查、创建和删除数据架构 |
与 Confluent Platform 搭配使用
mcp-confluent 可连接自托管的 Confluent Platform(CP)集群,方式与连接任何本地 Kafka + Schema Registry 部署相同:将 direct 连接指向你的代理和 Schema Registry。
CP 连接提供的工具与其他本地部署相同,请参阅本地部署可用的工具。
Flink、Tableflow、Billing、Metrics 等 Confluent Cloud 工具需要 Confluent Cloud 账户,在 CP 上保持禁用状态。
与 localhost:9092 配置相比,唯一的区别是身份验证和 TLS。
YAML 配置示例
sample_configs/confluent-platform.yaml 是一份可直接复制粘贴使用的起始配置。
该配置假设 Kafka 使用 SASL_SSL 上的 PLAIN,Schema Registry 使用 HTTP Basic Auth。
自定义代理和 Schema Registry URL,并通过 ${KAFKA_API_KEY} / ${KAFKA_API_SECRET} / ${SCHEMA_REGISTRY_API_KEY} / ${SCHEMA_REGISTRY_API_SECRET} 环境变量注入凭据。
如果集群使用 SCRAM 或其他 SASL 机制,请通过该文件中的 kafka.extra_properties 映射覆盖 security.protocol 和 sasl.mechanisms。
TLS 信任(内部 CA)
CP 集群通常位于内部 CA 之后。 如果连接代理或 Schema Registry 时出现 TLS 握手失败,请在启动服务时将 CA 证书包指定给 Node:
NODE_EXTRA_CA_CERTS=/path/to/internal-ca.pem pnpm run start -- --config path/to/config.yaml
端到端冒烟测试
docker-compose 堆栈 (docker-compose.cp-test.yml) 会启动本地 CP Kafka(KRaft、SASL_PLAINTEXT/PLAIN)和未经身份验证的 Schema Registry。
对应的集成测试标记为 @cp,与其处理程序位于同一目录,文件名为 *.cp.integration.test.ts:
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
如果未设置这些环境变量,测试会正常跳过。因此,即使未运行 docker 堆栈,pnpm run test:unit 和默认的 pnpm run test:integration(针对真实的 Confluent Cloud 账户)也不会受到影响。
入门指南
前置条件
- Node.js 22.23.4 或更高版本——我们建议使用 NVM 管理版本:
nvm install 22 nvm use 22 - pnpm——仅从源代码构建时需要(上文的
npx快速入门无需安装)。 在 macOS 上,最简单的安装方式是使用 Homebrew;npm则适用于所有平台:
其他安装方式请参阅 pnpm 的安装指南。 确切的 pnpm 版本已固定在brew install pnpm # macOS # or, cross-platform: npm install -g pnpmpackage.json的packageManager字段中,且 pnpm 会自动运行该固定版本(通过其内置的包管理器版本管理功能),因此只需安装较新版本的 pnpm——无需单独配置 Corepack。 - 本地运行着 Kafka 或 Schema Registry 的环境,或一个 Confluent Cloud 账户;如果使用 OAuth 进行身份验证,还需准备相应的 API 密钥或登录凭据。
常规设置步骤
此 MCP 服务旨在与各种 MCP 客户端配合使用,例如 Claude Desktop、Copilot 或 Goose CLI/Desktop。 具体配置和交互方式取决于你使用的客户端。
除了在 YAML 配置中定义静态 API 密钥外,MCP 服务还可以通过 OAuth(PKCE) 向 Confluent Cloud 进行身份验证。 详情请参阅 Confluent Cloud OAuth 身份验证。
配置(不使用 OAuth 时)并运行此 MCP 的常规步骤如下:
- 创建配置文件: 将提供的
config.yaml示例文件复制到项目根目录。 你可以使用 CLI 在当前目录中快速创建配置文件——无需检出 git 仓库:
npx @confluentinc/mcp-confluent --init-config
-
填写文件: 填入 Confluent Cloud 环境所需的值。 完整参考请参阅 CONFIGURATION.md;只需填写你需要的服务配置块(每个配置块都会启用一组工具)。
-
启动服务: 你可以通过以下两种方式之一运行 MCP 服务:
-
从源代码构建: 按照贡献指南中的说明,从源代码构建并运行服务。 通常包括:
- 安装依赖项(
pnpm install) - 构建项目(
pnpm run build或pnpm run dev)
- 安装依赖项(
-
使用 npx: 无需构建即可直接使用 npx 启动服务:
npx @confluentinc/mcp-confluent --config /path/to/myconfig.yaml
-
-
配置 MCP 客户端: 每个客户端(例如 Claude、Goose)都有自己的方式来指定 MCP 服务的地址和所需凭据。 你需要配置客户端,使其连接到此服务运行的地址(通常是带有特定端口的
localhost)。 服务运行的端口通过config.yaml中的server.http.port设置。 -
启动 MCP 客户端: 配置客户端以连接 MCP 服务后,你可以启动客户端;启动时,客户端会在本地启动此 MCP 服务的一个实例。 此实例将负责管理数据模式,并代表你与资源交互。
-
通过客户端与资源交互: 客户端连接并配置完成后,你可以使用客户端界面与 Confluent Cloud 或本地资源交互。 客户端会向此 MCP 服务发送请求,由服务代表你与可用连接进行交互。
配置
完整的配置参考——YAML 架构、每个服务块、环境变量插值、OAuth 和 HTTP/SSE 身份验证设置、(已弃用的)旧版环境变量表,以及工具到配置块的映射——请参阅 CONFIGURATION.md。
兼容性说明。 此版本为单个连接提供 YAML(
-c config.yaml)和旧版环境变量路径(-e config.env)的完整功能对等支持。 在接下来的某个版本中,仅使用环境变量的路径会在启动时发出警告,并将在之后一两个版本中移除。 定义多个连接(或不定义任何连接)只能通过 YAML 实现——环境变量路径只能表示单个连接。 请参阅 CONFIGURATION.md → 两种路径,一份配置 和 CONFIGURATION.md → 多个连接(以及零个连接)。
Tableflow 命令的先决条件和设置
Tableflow 工具通过 Confluent Cloud 中的 Flink 运行时,代表你与云存储(例如 AWS S3)和元数据目录(例如 AWS Glue)进行交互。 Flink 运行时需要在你的云账户中拥有 IAM 权限,并且必须先授予这些权限并将其关联到 Confluent Cloud,Tableflow 工具才能正常运行。
请按照 Tableflow 自定义存储和 Glue 快速入门 设置角色、策略和提供商集成。 跳过此步骤会导致 mcp-confluent 在尝试配置或管理启用了 Tableflow 的表时出现授权错误。
Confluent Cloud 的 OAuth 身份验证
MCP 服务可以通过 OAuth (PKCE) 而非静态 API 密钥向 Confluent Cloud 进行身份验证。 首次调用需要访问 Confluent 的工具时,服务会打开浏览器并跳转到 Confluent Cloud 登录页面;后续工具调用会复用生成的会话。 无需配置 API 密钥。
设置
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 放入 ./config.yaml。
整个文件大致如下:
connections:
ccloud-oauth:
type: oauth
有关完整架构和使用方式,请参阅 CONFIGURATION.md → 身份验证模式。
在 Confluent Cloud 可用工具 中标有 ¹ 的类别目前支持 OAuth;其他所有类别仍需要使用静态 API 密钥的 direct 连接。
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-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
示例:使用所有传输方式进行部署
npx @confluentinc/mcp-confluent -c config.yaml --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 -c config.yaml --allow-tools produce-message,consume-messages
仅启用指定的工具;其他所有工具都将被禁用。
示例:屏蔽某些工具
npx @confluentinc/mcp-confluent -c config.yaml --block-tools produce-message,consume-messages
除指定工具外,所有工具都将启用。
示例:从文件读取工具列表
你也可以在文件中维护允许列表或屏蔽列表(每行一个工具名称):
npx -y @confluentinc/mcp-confluent -c config.yaml --allow-tools-file allow.txt --block-tools-file block.txt
示例:列出所有可用工具
npx -y @confluentinc/mcp-confluent --list-tools
显示输出
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 服务:
遥测
此 MCP 服务会收集使用数据,并通过 Sentry 报告服务端运行时错误,以帮助改进服务。
你可以在环境中设置 DO_NOT_TRACK=true(或在 YAML 中设置 server.do_not_track: true)来选择退出这两项功能。
有关收集内容及绝不会发送的数据的完整详情,请参阅 telemetry.md。
故障排除
“不支持此 Node.js 版本” —— 此项目要求 Node.js 版本为 22.23.4 或更高。
使用 node -v 检查你的版本,并在需要时升级。
工具未显示 —— 每个工具都需要在你的 config.yaml 中配置特定的服务区块。
运行 --list-tools 查看哪些工具已启用,或在客户端调用 explain-disabled-tools MCP 工具,查看每个工具未启用的原因。
区块与工具的映射关系见 CONFIGURATION.md。
HTTP/SSE 身份验证错误 —— 使用 npx @confluentinc/mcp-confluent --generate-key 生成 API 密钥,并将其添加到 config.yaml 的 server.auth.api_key 下。
请参阅 CONFIGURATION.md → HTTP/SSE 传输安全。
连接被拒绝/端口冲突 —— 默认 HTTP 端口为 8080。
在 config.yaml 中设置 server.http.port 以更改端口。
Tableflow 授权错误 —— Tableflow 工具需要云环境中配置特定的 IAM 权限。 请参阅Tableflow 命令的先决条件与设置。
参与贡献
欢迎通过 Github Issues 提交错误报告和反馈。 有关贡献指南,请参阅 CONTRIBUTING.md
预发布版本测试
若要使用预发布版本运行 MCP 服务以进行 Beta 测试或提前反馈,请将发布 tarball 文件下载到本地目录。
然后,运行上文中的任何 npx 命令时,将 @confluentinc/mcp-confluent 替换为该 tarball 的路径,例如 npx @~path/to/my/tarball --list-tools
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。