CO
OfficialAI & ML

Confluent MCP Server for Kafka, Flink, Schema Registry

Enable AI assistants to manage Confluent Cloud and Local with an MCP server offering 50+ tools for Kafka, Flink SQL, Schema Registry and connectors.

Quick Install
npx -y @confluentinc/mcp-confluent

Overview

Confluent MCP Server is an open-source Model Context Protocol (MCP) server that exposes Confluent Cloud and Confluent Local capabilities as a set of tools consumable by MCP-compatible AI assistants and clients. It translates natural-language intents from assistants into concrete operations across Kafka, Flink SQL, Schema Registry, Connectors, Tableflow, and related Confluent services. The server lets you integrate more than 50 operational tools with assistants like Claude, Gemini CLI, Cursor, and VS Code extensions.

This server is useful when you want to let an LLM or an assistant inspect cluster metadata, run Flink SQL statements, manage Kafka topics, produce/consume messages, or query metrics without building a bespoke bridge. Tools are enabled only if the required environment variables are set, so the same server binary can safely be run in environments with different Confluent services available.

Features

  • 50+ tool endpoints covering Kafka, Flink SQL, Flink Catalog, Connectors, Schema Registry, Tableflow, Metrics, and resource discovery
  • Works with MCP-compatible clients (SSE/HTTP transports)
  • Environment-driven configuration; only configured tools are enabled
  • Simple CLI entrypoint (npx or installed package)
  • Telemetry opt-in and minimal footprint (Node.js 22+ runtime)
  • Secure access via standard Confluent credentials and MCP transport authentication

Installation / Configuration

Prerequisites: Node.js 22+

Quick run using npx (loads env vars from a .env file):

# Run with an env file that contains Confluent connection info
npx -y @confluentinc/mcp-confluent -e /path/to/.env

Install as a package:

# Install locally
npm install @confluentinc/mcp-confluent

# Run from node_modules/.bin or via a script
npx @confluentinc/mcp-confluent -e ./config/.env

Example minimal .env entries (refer to the included .env.example in the repo for full list):

# Confluent Cloud API
CONFLUENT_CLOUD_API_KEY=abcd
CONFLUENT_CLOUD_API_SECRET=secret
CONFLUENT_CLOUD_BASE_URL=https://api.confluent.cloud

# Schema Registry (if used)
SCHEMA_REGISTRY_URL=https://<your-registry>
SCHEMA_REGISTRY_API_KEY=...
SCHEMA_REGISTRY_API_SECRET=...

# Optional: enable metrics / telemetry
MCP_TELEMETRY_ENABLED=false

Only tools for which the corresponding environment variables are present will be activated. To enumerate tools available in your current config:

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

Available Tools / Resources

The server exposes tools in categories. Below is a concise mapping (tool names are the MCP tool IDs):

CategoryRepresentative Tools
Kafkalist-topics, create-topics, delete-topics, produce-message, consume-messages, alter-topic-config
Flink SQLcreate-flink-statement, list-flink-statements, read-flink-statement, delete-flink-statements, get-flink-statement-exceptions
Flink Cataloglist-flink-catalogs, list-flink-databases, list-flink-tables, describe-flink-table
Flink Diagnosticscheck-flink-statement-health, detect-flink-statement-issues, get-flink-statement-profile
Connectorslist-connectors, read-connector, create-connector, delete-connector
Schema Registrylist-schemas, delete-schema
Tableflowcreate-tableflow-topic, list-tableflow-topics, update-tableflow-topic
Catalog & Tagssearch-topics-by-tag, add-tags-to-topic, list-tags
Metrics & Monitoringlist-available-metrics, query-metrics
Resource Discoverylist-environments, read-environment, list-clusters

Refer to the repository .env.example and source code for the complete tool list and exact request/response shapes.

Configuring MCP Clients

MCP clients connect using HTTP or Server-Sent Events (SSE). Provide the server URL and any transport-level authentication expected:

  • MCP server default binds to a port (see server logs). Example client connection URL:
http://localhost:PORT/mcp
  • If you need token-based access, configure the transport layer using your client’s support for headers or query-token, and ensure the server is started with corresponding validation if required.

Common clients: Claude, Gemini CLI, VS Code MCP extensions. Each client will require the MCP host/port and the server exposes the available tool set automatically to the client.

Use Cases (concrete examples)

  • Inspect and document topics: ask an assistant to list topics, fetch a topic’s config, and generate documentation for retention and retention.bytes.
  • Rapid debugging of Flink SQL: create a Flink SQL statement via natural language, run the statement, and fetch exceptions or performance profiles for troubleshooting.
  • Data onboarding: create a Kafka topic with recommended partition and retention settings, register Avro/Protobuf schemas in Schema Registry, and create a Tableflow topic pointing to a catalog.
  • Connector lifecycle: list connectors in an environment, create a new connector from a template, or remove a connector when decommissioning a pipeline.
  • Metrics-driven diagnostics: query available metrics and retrieve recent time-series for throughput or lag to feed into an incident report.

Notes and Troubleshooting

  • Ensure Node.js 22+ is used.
  • Only tools with proper env variables will be enabled—double-check your .env.
  • Use –list-tools to verify which capabilities your running server exposes.
  • Telemetry can be disabled via MCP_TELEMETRY_ENABLED=false.

For development, refer to the repository for source examples, the full .env.example, and test utilities. Contributions and issues are handled via the project’s GitHub.

Tags:ai-ml