Integrations
Allows configuration of Confluent Cloud credentials and endpoints through environment variables, supporting secure authentication with various Confluent services.
Enables AI assistants to interact with Confluent Cloud REST APIs, providing tools for managing Kafka topics, connectors, and Flink SQL statements through natural language interactions.
mcp-confluent
An MCP server implementation that enables AI assistants to interact with Confluent Cloud REST APIs. This server allows AI tools like Claude Desktop and Goose CLI to manage Kafka topics, connectors, and Flink SQL statements through natural language interactions.
Demo
Goose CLI
Claude Desktop
Table of Contents
User Guide
Getting Started
- Create a
.env
file: Copy the example.env
file structure (shown below) into a new file named.env
in the root of your project. - Populate the
.env
file: Fill in the necessary values for your Confluent Cloud environment. See the Configuration section for details on each variable. - Install Node.js (if not already installed)
- We recommend using NVM (Node Version Manager) to manage Node.js versions
- Install and use Node.js:
Copy
Configuration
Create a .env
file in the root directory of your project with the following configuration:
Environment Variables Reference
Variable | Description | Default Value | Required |
---|---|---|---|
BOOTSTRAP_SERVERS | List of Kafka broker addresses in the format host1:port1,host2:port2 used to establish initial connection to the Kafka cluster (string) | Yes | |
CONFIG_PATH | File system path to store and retrieve conversation-based configurations for session persistence (Future Implementation) (string) | Yes | |
CONFLUENT_CLOUD_API_KEY | Master API key for Confluent Cloud platform administration, enabling management of resources across your organization (string (min: 1)) | Yes | |
CONFLUENT_CLOUD_API_SECRET | Master API secret paired with CONFLUENT_CLOUD_API_KEY for comprehensive Confluent Cloud platform administration (string (min: 1)) | Yes | |
FLINK_API_KEY | Authentication key for accessing Confluent Cloud's Flink services, including compute pools and SQL statement management (string (min: 1)) | Yes | |
FLINK_API_SECRET | Secret token paired with FLINK_API_KEY for authenticated access to Confluent Cloud's Flink services (string (min: 1)) | Yes | |
KAFKA_API_KEY | Authentication credential (username) required to establish secure connection with the Kafka cluster (string (min: 1)) | Yes | |
KAFKA_API_SECRET | Authentication credential (password) paired with KAFKA_API_KEY for secure Kafka cluster access (string (min: 1)) | Yes | |
SCHEMA_REGISTRY_API_KEY | Authentication key for accessing Schema Registry services to manage and validate data schemas (string (min: 1)) | Yes | |
SCHEMA_REGISTRY_API_SECRET | Authentication secret paired with SCHEMA_REGISTRY_API_KEY for secure Schema Registry access (string (min: 1)) | Yes | |
CONFLUENT_CLOUD_REST_ENDPOINT | Base URL for Confluent Cloud's REST API services (default) | No | |
FLINK_COMPUTE_POOL_ID | Unique identifier for the Flink compute pool, must start with 'lfcp-' prefix (string) | No | |
FLINK_DATABASE_NAME | Name of the associated Kafka cluster used as a database reference in Flink SQL operations (string (min: 1)) | No | |
FLINK_ENV_ID | Unique identifier for the Flink environment, must start with 'env-' prefix (string) | No | |
FLINK_ENV_NAME | Human-readable name for the Flink environment used for identification and display purposes (string (min: 1)) | No | |
FLINK_ORG_ID | Organization identifier within Confluent Cloud for Flink resource management (string (min: 1)) | No | |
FLINK_REST_ENDPOINT | Base URL for Confluent Cloud's Flink REST API endpoints used for SQL statement and compute pool management (string) | No | |
KAFKA_CLUSTER_ID | Unique identifier for the Kafka cluster within Confluent Cloud ecosystem (string (min: 1)) | No | |
KAFKA_ENV_ID | Environment identifier for Kafka cluster, must start with 'env-' prefix (string) | No | |
KAFKA_REST_ENDPOINT | REST API endpoint for Kafka cluster management and administration (string) | No | |
SCHEMA_REGISTRY_ENDPOINT | URL endpoint for accessing Schema Registry services to manage data schemas (string) | No |
Usage
This MCP server is designed to be used with various MCP clients, such as Claude Desktop or Goose CLI/Desktop. The specific configuration and interaction will depend on the client you are using. However, the general steps are:
- Build: Follow the instructions in the Developer Guide to build and run the server from source. This typically involves:
- Installing dependencies (
npm install
) - Building the project (
npm run build
ornpm run dev
)
- Installing dependencies (
- Configure your MCP Client: Each client will have its own way of specifying the MCP server's address and any required credentials. You'll need to configure your client (e.g., Claude, Goose) to connect to the address where this server is running (likely
localhost
with a specific port). The port the server runs on may be configured by an environment variable. - Start the MCP Client: Once your client is configured to connect to the MCP server, you can start your mcp client and on startup - it will stand up an instance of this MCP server locally. This instance will be responsible for managing data schemas and interacting with Confluent Cloud on your behalf.
- Interact with Confluent through the Client: Once the client is connected, you can use the client's interface to interact with Confluent Cloud resources. The client will send requests to this MCP server, which will then interact with Confluent Cloud on your behalf.
Configuring Claude Desktop
See here for more details about installing Claude Desktop and MCP servers.
To configure Claude Desktop to use this MCP server:
- Open Claude Desktop Configuration
- On Mac:
~/Library/Application Support/Claude/claude_desktop_config.json
- On Windows:
%APPDATA%\Claude\claude_desktop_config.json
- On Mac:
- Edit Configuration File
- Open the config file in your preferred text editor
- Add or modify the configuration using one of the following methods:
CopyCopyReplace
/path/to/confluent-mcp-server/
with the actual path where you've installed this MCP server. - Restart Claude Desktop
- Close and reopen Claude Desktop for the changes to take effect
- The MCP server will automatically start when Claude Desktop launches
Now Claude Desktop will be configured to use your local MCP server for Confluent interactions.
Configuring Goose CLI
See here for detailed instructions on how to install the Goose CLI.
Once installed, follow these steps:
- Run the Configuration Command:Copy
- Follow the Interactive Prompts:
- Select
Add extension
- Choose
Command-line Extension
- Enter
mcp-confluent
as the extension name - Choose one of the following configuration methods:
CopyCopy - Select
Replace /path/to/confluent-mcp-server/
with the actual path where you've installed this MCP server.
Developer Guide
Project Structure
Building and Running
- Install Dependencies:Copy
- Development Mode (watch for changes):This command compiles the TypeScript code to JavaScript and automatically rebuilds when changes are detected in theCopy
src/
directory. - Production Build (one-time compilation):Copy
- Start the Server:Copy
Testing
MCP Inspector
For testing MCP servers, you can use MCP Inspector which is an interactive developer tool for testing and debugging MCP servers.
Adding a New Tool
- Add a new enum to the enum class
ToolName
. - Add your new tool to the handlers map in the
ToolFactory
class. - Create a new file, exporting the class that extends
BaseToolHandler
.- Implement the
handle
method of the base class. - Implement the
getToolConfig
method of the base class.
- Implement the
- Once satisfied, add it to the set of
enabledTools
inindex.ts
.
Generating Types
Contributing
Bug reports and feedback is appreciated in the form of Github Issues. For guidelines on contributing please see CONTRIBUTING.md
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
An MCP server implementation built to interact with Confluent Kafka and Confluent Cloud REST APIs.
Related MCP Servers
- -securityAlicense-qualityA lightweight MCP server that interacts with the Neon REST API, deployable on Cloudflare Workers for streamlined database management and integration.Last updated -5TypeScriptMIT License
- -securityAlicense-qualityA framework to use with AI to easily create a server for any service. Just drop the API Documentation in it and ask to create the MCP.Last updated -4TypeScriptMIT License
- AsecurityFlicenseAqualityAn MCP server implementation that enables interaction with the Unstructured API, providing tools to list, create, update, and manage sources, destinations, and workflows.Last updated -3925
- -securityFlicense-qualityA remote MCP server implementation for Cloudflare that uses server-sent events (SSE) to enable Model Control Protocol communication.Last updated -TypeScript