mcp-kafka mcp

v1.0.1 · MCP Tool · messaging · registry.pascalai.org

Apache Kafka via Confluent REST Proxy API (HTTP-based, no driver required). Produces and consumes messages, manages topics.

kafkamessagingstreamingeventsconfluent

Input Parameters

ParameterTypeDescription
operationrequired string Operation to perform. One of: list_topics, get_topic, create_topic, delete_topic, produce, consume, list_consumers, get_offsets.
baseUrlrequired string Confluent REST Proxy base URL (e.g. http://localhost:8082).
apiKeyoptional string API key for Confluent Cloud (used as Basic auth username).
apiSecretoptional string API secret for Confluent Cloud (used as Basic auth password).
clusterIdoptional string Kafka cluster ID for v3 API operations (create_topic, delete_topic). e.g. lkc-xxxxx.
topicoptional string Topic name. Required for: get_topic, create_topic, delete_topic, produce, consume, get_offsets.
groupoptional string Consumer group name. Required for: list_consumers.
instanceoptional string Consumer instance name within the group.
partitionoptional integer Partition number (default: 0). Default: 0.
offsetoptional integer Start offset (default: 0). Default: 0.
countoptional integer Number of messages to fetch (default: 10). Default: 10.
bodyoptional string JSON body string for produce or create_topic.
keyoptional string Message key string for produce.

Output Fields

FieldTypeDescription
ok boolean
data object
deleted string
error string

Examples

List all topics

// Input
{
  "operation": "list_topics",
  "baseUrl": "http://localhost:8082"
}

// Output
{
  "ok": true
}

Produce a message

// Input
{
  "operation": "produce",
  "baseUrl": "http://localhost:8082",
  "topic": "orders",
  "body": "{\"records\":[{\"value\":\"hello\"}]}"
}

// Output
{
  "ok": true
}

Install & Discovery

Install

ppm install mcp-kafka

Get JSON Schema

GET /v1/packages/mcp-kafka/1.0.1/schema

Discover by keyword

GET /v1/mcp/discover?q=kafka
Discovery hint: Install with ppm install mcp-kafka or invoke remotely via POST /v1/invoke/mcp-kafka on the MCP Service.

PascalAI Usage

uses toolslib;
var Tool := LoadTool('mcp-kafka');
var R := Tool.Call(JsonObj(['operation','list_topics','baseUrl','http://localhost:8082']));
Writeln(R.ToJSON);