mcp-合流
AIアシスタントがConfluent Cloud REST APIと連携できるようにするMCPサーバー実装。このサーバーにより、Claude DesktopやGoose CLIなどのAIツールが、自然言語によるインタラクションを通じてKafkaトピック、コネクタ、Flink SQLステートメントを管理できるようになります。
デモ
グースCLI

クロードデスクトップ

Related MCP server: MCP Server
目次
ユーザーガイド
はじめる
**
.envファイルを作成する:**サンプルの.envファイル構造 (以下に表示) を、プロジェクトのルートにある.envという名前の新しいファイルにコピーします。.envConfluent Cloud 環境に必要な値を入力します。各変数の詳細については、設定セクションをご覧ください。Node.js をインストールします(まだインストールされていない場合)
Node.jsのバージョン管理にはNVM (Node Version Manager)の使用をお勧めします。
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_ホスト | HTTPトランスポートにバインドするホスト(文字列) | 「ローカルホスト」 | はい |
HTTP_ポート | HTTPトランスポートに使用するポート(数値(最小:0)) | 3000 | はい |
ブートストラップサーバー | Kafka クラスターへの初期接続を確立するために使用される、host1:port1、host2:port2 形式の Kafka ブローカー アドレスのリスト (文字列) | いいえ | |
CONFLUENT_CLOUD_API_KEY | Confluent Cloud プラットフォーム管理用のマスター API キー。組織全体のリソースの管理を可能にします (文字列 (最小: 1)) | いいえ | |
CONFLUENT_CLOUD_API_SECRET | 包括的な Confluent Cloud プラットフォーム管理のための CONFLUENT_CLOUD_API_KEY とペアになったマスター API シークレット (文字列 (最小: 1)) | いいえ | |
CONFLUENT_CLOUD_REST_ENDPOINT | Confluent Cloud の REST API サービスのベース URL (デフォルト) | いいえ | |
FLINK_API_KEY | コンピューティング プールや SQL ステートメント管理を含む Confluent Cloud の Flink サービスにアクセスするための認証キー (文字列 (最小: 1)) | いいえ | |
FLINK_API_SECRET | Confluent Cloud の Flink サービスへの認証アクセス用の FLINK_API_KEY とペアになったシークレット トークン (文字列 (最小: 1)) | いいえ | |
FLINK_COMPUTE_POOL_ID | Flinkコンピューティング プールの一意の識別子。'lfcp-' プレフィックスで始まる必要があります (文字列) | いいえ | |
FLINK_データベース名 | Flink SQL 操作でデータベース参照として使用される関連 Kafka クラスターの名前 (文字列 (最小: 1)) | いいえ | |
FLINK_ENV_ID | Flink 環境の一意の識別子。'env-' プレフィックスで始まる必要があります (文字列) | いいえ | |
FLINK_ENV_NAME | 識別および表示目的で使用される Flink 環境の人間が読める名前 (文字列 (最小: 1)) | いいえ | |
FLINK_ORG_ID | Flink リソース管理用の Confluent Cloud 内の組織識別子 (文字列 (最小: 1)) | いいえ | |
FLINK_REST_ENDPOINT | SQL ステートメントとコンピューティング プールの管理に使用される Confluent Cloud の Flink REST API エンドポイントのベース URL (文字列) | いいえ | |
KAFKA_API_キー | Kafka クラスターとの安全な接続を確立するために必要な認証資格情報 (ユーザー名) (文字列 (最小: 1)) | いいえ | |
KAFKA_API_SECRET | 安全な Kafka クラスター アクセスのための KAFKA_API_KEY とペアになった認証資格情報 (パスワード) (文字列 (最小: 1)) | いいえ | |
KAFKA_クラスターID | Confluent Cloud エコシステム内の Kafka クラスターの一意の識別子 (文字列 (最小: 1)) | いいえ | |
KAFKA_ENV_ID | Kafka クラスターの環境識別子。'env-' プレフィックスで始まる必要があります (文字列) | いいえ | |
KAFKA_REST_エンドポイント | Kafka クラスターの管理と運用のための REST API エンドポイント (文字列) | いいえ | |
スキーマレジストリAPIキー | データ スキーマを管理および検証するためのスキーマ レジストリ サービスにアクセスするための認証キー (文字列 (最小: 1)) | いいえ | |
スキーマレジストリAPIシークレット | 安全なスキーマ レジストリ アクセスのための SCHEMA_REGISTRY_API_KEY とペアになった認証シークレット (文字列 (最小: 1)) | いいえ | |
スキーマレジストリエンドポイント | データ スキーマを管理するためにスキーマ レジストリ サービスにアクセスするための URL エンドポイント (文字列) | いいえ |
使用法
このMCPサーバーは、Claude DesktopやGoose CLI/Desktopなど、様々なMCPクライアントで使用できるように設計されています。具体的な設定と操作は、使用するクライアントによって異なります。ただし、一般的な手順は以下のとおりです。
サーバーを起動する: MCP サーバーは、次の 2 つの方法のいずれかで実行できます。
ソースから:開発者ガイドの指示に従って、ソースからサーバーをビルドして実行します。通常、以下の手順が必要です。
依存関係のインストール(
npm install)プロジェクトのビルド(
npm run buildまたはnpm run dev)
npx を使用する場合: npx を使用してサーバーを直接起動できます (ビルドは不要)。
npx -y @confluentinc/mcp-confluent -e /path/to/confluent-mcp-server/.env
**MCPクライアントの設定:**各クライアントは、MCPサーバーのアドレスと必要な認証情報を指定する方法が異なります。クライアント(例:Claude、Goose)を、このサーバーが稼働しているアドレス(通常は特定のポートを持つ
localhost)に接続するように設定する必要があります。サーバーが稼働するポートは、環境変数で設定できます。**MCPクライアントを起動します。**クライアントがMCPサーバーに接続できるように設定したら、MCPクライアントを起動できます。起動時に、MCPサーバーのインスタンスがローカルに作成されます。このインスタンスは、データスキーマの管理とConfluent Cloudとのやり取りをユーザーに代わって行います。
**クライアント経由でConfluentとやり取りする:**クライアントが接続されると、クライアントのインターフェースを使用してConfluent Cloudのリソースとやり取りできるようになります。クライアントはMCPサーバーにリクエストを送信し、MCPサーバーがユーザーに代わってConfluent Cloudとやり取りします。
Claudeデスクトップの設定
Claude Desktop および MCP サーバーのインストールの詳細については、ここを参照してください。
この MCP サーバーを使用するように Claude Desktop を構成するには:
オープンクロードデスクトップ構成
Macの場合:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows の場合:
%APPDATA%\Claude\claude_desktop_config.json
設定ファイルの編集
好みのテキストエディタで設定ファイルを開きます
次のいずれかの方法を使用して、構成を追加または変更します。
{ "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 サーバーをインストールした実際のパスに置き換えます。Claudeデスクトップを再起動します
変更を有効にするには、Claude Desktop を閉じて再度開きます。
Claude Desktopを起動するとMCPサーバーが自動的に起動します。
これで、Claude Desktop は Confluent とのやり取りにローカル MCP サーバーを使用するように構成されます。

Goose CLIの設定
Goose CLI のインストール方法の詳細については、ここを参照してください。
インストールしたら、次の手順に従います。
構成コマンドを実行します。
goose configure対話型プロンプトに従います。
Add extension選択Command-line Extensionを選択拡張機能名として
mcp-confluentを入力します次のいずれかの構成方法を選択します。
node /path/to/confluent-mcp-server/dist/index.js --env-file /path/to/confluent-mcp-server/.envnpx -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-toolsadd-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構築と実行
依存関係をインストールします:
npm install開発モード(変更に注意してください):
npm run devこのコマンドは、TypeScript コードを JavaScript にコンパイルし、
src/ディレクトリで変更が検出されると自動的に再構築します。プロダクションビルド(1回限りのコンパイル):
npm run buildサーバーを起動します。
npm run start
テスト
MCP検査官
MCP サーバーをテストするには、MCP サーバーのテストとデバッグを行う対話型開発者ツールであるMCP Inspector を使用できます。
# 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新しいツールの追加
列挙クラス
ToolNameに新しい列挙を追加します。新しいツールを
ToolFactoryクラスのハンドラー マップに追加します。BaseToolHandler拡張するクラスをエクスポートして、新しいファイルを作成します。基本クラスの
handleメソッドを実装します。基本クラスの
getToolConfigメソッドを実装します。
満足したら、
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で受け付けています。貢献に関するガイドラインについては、 CONTRIBUTING.mdをご覧ください。