<a id="ai-tools-oss-mcp"></a>

# Build with the Open-Source MCP Server

You can use the Confluent open-source MCP server
([@confluentinc/mcp-confluent](https://github.com/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](managed-mcp-server.md#ai-tools-managed-mcp),
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.

#### NOTE
The open-source MCP server is a community-supported project.
Confluent doesn’t provide dedicated support for it, and
support is best-effort only, with no service level
commitments. If you run into an issue or want to
contribute, open an issue or pull request directly in the
[GitHub repository](https://github.com/confluentinc/mcp-confluent).

## Prerequisites

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

- [Node.js 22](https://nodejs.org/) 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:

```bash
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:

```bash
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](https://github.com/confluentinc/mcp-confluent#configuration)
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](https://github.com/confluentinc/mcp-confluent#tools)
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<br/>messages with Schema Registry serialization and deserialization. |
| Flink SQL                 | Confluent Cloud                                | Create, list, read, and delete Flink SQL statements.<br/>Get statement exceptions.                                        |
| Flink Catalog             | Confluent Cloud                                | List catalogs, databases, and tables. Describe table<br/>schemas.                                                         |
| Flink Diagnostics         | Confluent Cloud                                | Check statement health, detect issues, and get<br/>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<br/>assign tags.                                                        |
| Environments and Clusters | Confluent Cloud                                | List organizations, environments, and clusters. Read<br/>environment details.                                             |
| Tableflow                 | Confluent Cloud                                | Create, list, read, update, and delete Tableflow<br/>topics. List Tableflow regions.                                      |
| Tableflow Catalog         | Confluent Cloud                                | Create, list, read, update, and delete catalog<br/>integrations.                                                          |
| Metrics                   | Confluent Cloud                                | List available metrics and query operational metric<br/>data.                                                             |
| Billing                   | Confluent Cloud                                | Query billing and cost data.                                                                                              |
| Utility                   | Always available                               | Search Confluent product documentation, fetch<br/>documentation pages, and explain why tools are<br/>disabled.            |

## Configure your MCP client

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

- [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
- [Claude Desktop](https://claude.ai/download)
- [Cursor](https://www.cursor.com/)
- VS Code with
  [GitHub Copilot](https://github.com/features/copilot)
- [Windsurf](https://windsurf.com/)
- [Goose CLI](https://block.github.io/goose/)
- [Gemini CLI](https://github.com/google-gemini/gemini-cli)

For configuration snippets for each client, see the
[MCP client configuration guide](https://github.com/confluentinc/mcp-confluent#mcp-client-configuration)
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.”

### Work with Flink SQL

Use these prompts to write and manage Flink SQL statements:

- “List all my Flink SQL statements and show their status.”
- “Check my Flink statements for errors.”
- “Create a Flink SQL statement that filters the orders
  topic for orders over $100.”

### 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](https://github.com/confluentinc/mcp-confluent/blob/main/telemetry.md)
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](https://github.com/confluentinc/mcp-confluent#troubleshooting)
in the GitHub repository.

## Related content

- [Open-source MCP server GitHub repository](https://github.com/confluentinc/mcp-confluent)
  (GitHub)
- [Access Confluent Cloud with the Managed MCP Servers](managed-mcp-server.md#ai-tools-managed-mcp)
- [Build Streaming Applications with Agent Skills](agent-skills.md#ai-tools-agent-skills)
