Build with the Open-Source MCP Server

You can use the Confluent open-source MCP server (@confluentinc/mcp-confluent) to connect AI assistants to Confluent Cloud, Confluent Platform, and standalone Apache Kafka® deployments. The server runs locally on your machine and provides 50+ tools for managing topics, writing Flink SQL, configuring connectors, working with schemas, and more.

Unlike the managed MCP servers, which provide read-only access to Confluent Cloud, the open-source server supports both read and write operations and works with local Kafka clusters in addition to Confluent Cloud clusters.

Prerequisites

To use the open-source MCP server, you need the following:

  • Node.js 22 or later.

  • A Confluent Cloud account with API keys to use MCP tools that access Confluent Cloud, or an Kafka or Confluent Platform deployment to use MCP tools that access self-managed clusters.

Quick start

You can run the open-source MCP server with the Node Package Execute (npx) tool. To generate a starter configuration file, run the following command:

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

This command creates a config.yaml file in your current directory. Edit the file to add your Confluent Cloud API keys or local connection details for Kafka or Confluent Platform, then start the server:

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

The tools that the server exposes depend on which services you configure. For example, if you add a flink block to your configuration, the Flink SQL tools become available.

For full configuration options, including OAuth authentication and multi-connection setups, see the configuration guide in the GitHub repository.

Available tools

The open-source MCP server provides tools organized by category. The tools that are available depend on which services you configure.

The following table summarizes the tool categories. For the full list of individual tools, see the tool reference in the GitHub repository.

Category

Available for

What you can do

Kafka

Confluent Cloud, Confluent Platform, and local

List, create, and delete topics. Produce and consume messages with Schema Registry serialization and deserialization.

Flink SQL

Confluent Cloud

Create, list, read, and delete Flink SQL statements. Get statement exceptions.

Flink Catalog

Confluent Cloud

List catalogs, databases, and tables. Describe table schemas.

Flink Diagnostics

Confluent Cloud

Check statement health, detect issues, and get statement profiles with task graphs.

Connectors

Confluent Cloud

List, read, create, and delete connectors.

Schema Registry

Confluent Cloud, Confluent Platform, and local

List and delete schemas.

Catalog and Tags

Confluent Cloud

Search topics by tag or name. Create, delete, and assign tags.

Environments and Clusters

Confluent Cloud

List organizations, environments, and clusters. Read environment details.

Tableflow

Confluent Cloud

Create, list, read, update, and delete Tableflow topics. List Tableflow regions.

Tableflow Catalog

Confluent Cloud

Create, list, read, update, and delete catalog integrations.

Metrics

Confluent Cloud

List available metrics and query operational metric data.

Billing

Confluent Cloud

Query billing and cost data.

Utility

Always available

Search Confluent product documentation, fetch documentation pages, and explain why tools are disabled.

Configure your MCP client

The open-source MCP server supports any MCP-compatible client, including the following:

For configuration snippets for each client, see the MCP client configuration guide in the GitHub repository.

Example prompts

After you configure the server and connect your MCP client, you can ask your AI assistant to work with your Confluent and Kafka resources. The following examples show prompts organized by task.

Manage resources

Use these prompts to create and manage Kafka resources:

  • “Create a topic called user-events with six partitions.”

  • “List all topics in my cluster.”

  • “Produce a test message to the orders topic.”

Set up pipelines

Use these prompts to configure connectors and Tableflow:

  • “Create an S3 sink connector for the user-events topic.”

  • “Set up a Tableflow topic for the orders table.”

Monitor and troubleshoot

Use these prompts to check costs and diagnose issues:

  • “What are my billing costs for the last month?”

  • “Check the health of my Flink SQL statements.”

Data handling

The open-source MCP server runs locally on your machine and communicates directly with Confluent Cloud, Confluent Platform, and Kafka clusters. Message content retrieved by the consume-messages tool is passed to your MCP client and might be sent to the AI model. Review your data handling requirements before consuming messages from topics that contain sensitive data.

The server collects telemetry about tool usage. To opt out, set the DO_NOT_TRACK environment variable to true, or set server.do_not_track: true in your YAML configuration. For details, see the telemetry documentation in the GitHub repository.

Troubleshooting

If tools are missing from your AI assistant, verify that the relevant service blocks are configured in your YAML configuration file. You can run the server with the --list-tools flag to see which tools are enabled, or ask your AI assistant to use the explain-disabled-tools tool.

If the server fails to start, verify that you are running Node.js 22 or later by running node -v.

For additional troubleshooting scenarios, see the troubleshooting guide in the GitHub repository.