The MCP-Confluent server enables AI assistants to interact with Confluent Cloud REST APIs through natural language interfaces. This implementation allows tools like Claude Desktop and Goose CLI to manage Kafka topics, connectors, Flink SQL statements, and more.
To get started with the MCP-Confluent server:
.env
file in your project root with your Confluent Cloud configuration valuesnvm install 22
nvm use 22
Create a .env
file in your project root with the following structure:
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-..."
TABLEFLOW_API_KEY=""
TABLEFLOW_API_SECRET=""
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"
To use Tableflow commands, you'll need proper IAM permissions and configurations in your cloud environment (e.g., AWS). These permissions are essential for interacting with data storage like AWS S3 and metadata catalogs like AWS Glue.
Refer to the Confluent Cloud Tableflow Quick Start with Custom Storage & Glue for detailed setup instructions.
You can run the MCP server in one of two ways:
npx -y @confluentinc/mcp-confluent -e /path/to/.env
npm install
npm run build
or npm run dev
npm run start
Open Claude Desktop Configuration:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Edit the configuration file:
{
"mcpServers": {
"confluent": {
"command": "npx",
"args": [
"-y",
"@confluentinc/mcp-confluent",
"-e",
"/path/to/.env"
]
}
}
}
goose configure
Add extension
Command-line Extension
mcp-confluent
as the extension namenpx -y @confluentinc/mcp-confluent -e /path/to/.env
The MCP server provides a flexible command line interface for advanced configuration.
View all CLI options with:
npx @confluentinc/mcp-confluent --help
npx @confluentinc/mcp-confluent -e .env --transport http,sse,stdio
npx @confluentinc/mcp-confluent -e .env --allow-tools produce-message,consume-messages
npx @confluentinc/mcp-confluent -e .env --block-tools produce-message,consume-messages
npx -y @confluentinc/mcp-confluent -e .env --allow-tools-file allow.txt --block-tools-file block.txt
npx -y @confluentinc/mcp-confluent --list-tools
Variable | Description | Default | Required |
---|---|---|---|
HTTP_HOST | Host to bind for HTTP transport | "localhost" | Yes |
HTTP_PORT | Port to use for HTTP transport | 3000 | Yes |
LOG_LEVEL | Log level (trace, debug, info, warn, error, fatal) | "info" | Yes |
BOOTSTRAP_SERVERS | Kafka broker addresses (host1:port1,host2:port2) | No | |
CONFLUENT_CLOUD_API_KEY | Master API key for Confluent Cloud platform | No | |
CONFLUENT_CLOUD_API_SECRET | Master API secret for Confluent Cloud platform | No | |
CONFLUENT_CLOUD_REST_ENDPOINT | Base URL for Confluent Cloud's REST API services | No | |
FLINK_API_KEY | Authentication key for Confluent Cloud's Flink services | No | |
FLINK_API_SECRET | Secret for Confluent Cloud's Flink services | No | |
FLINK_COMPUTE_POOL_ID | Flink compute pool ID (must start with 'lfcp-') | No | |
FLINK_DATABASE_NAME | Database name for Flink SQL operations | No | |
FLINK_ENV_ID | Flink environment ID (must start with 'env-') | No | |
FLINK_ENV_NAME | Human-readable name for the Flink environment | No | |
FLINK_ORG_ID | Organization ID for Flink resource management | No | |
FLINK_REST_ENDPOINT | Base URL for Flink REST API endpoints | No | |
KAFKA_API_KEY | Authentication key for Kafka cluster | No | |
KAFKA_API_SECRET | Authentication secret for Kafka cluster | No | |
KAFKA_CLUSTER_ID | Unique ID for the Kafka cluster | No | |
KAFKA_ENV_ID | Environment ID for Kafka cluster (must start with 'env-') | No | |
KAFKA_REST_ENDPOINT | REST API endpoint for Kafka cluster management | No | |
SCHEMA_REGISTRY_API_KEY | Authentication key for Schema Registry | No | |
SCHEMA_REGISTRY_API_SECRET | Authentication secret for Schema Registry | No | |
SCHEMA_REGISTRY_ENDPOINT | URL endpoint for Schema Registry services | No | |
TABLEFLOW_API_KEY | Authentication key for Tableflow services | No | |
TABLEFLOW_API_SECRET | Authentication secret for Tableflow services | No |
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.