Skip to main content

KafkaMCP exposes 29 MCP tools across the supported production surface.

KafkaMCP Tool Reference

Auto-generated on 2026-07-30 from internal/server/register_*.go. Do not edit manually. Run make generate to regenerate.

Summary

29 tools are available across the supported production surface.

The default core-read pack contains at most 15 read-only tools. The guarded ops-write and governance packs require secure network identity, default-deny authorization, and signed approval records. ops-write adds real mutations and optional idempotency keys; governance adds policy and decision controls. No simulated or placeholder tools are shipped.

StabilityCountTool packs
stable15core-read (default)
beta14ops-write, governance
ToolStabilityPacksCategoryDescription
kafka_acl_managebetagovernance, ops-writegovernanceInspect and reconcile live Kafka ACLs. Read-only actions (list, audit, diff, ...
kafka_alter_topicbetaops-writestreamingModify configuration of an existing Kafka topic.
kafka_analyze_dlqstablecore-readstreamingAnalyze a dead-letter queue topic: consume recent messages, parse error heade...
kafka_approvalbetagovernance, ops-writegovernanceManage identity-bound, short-lived approval grants for ops-write tools. Grant...
kafka_check_schema_compatibilitystablecore-readstreamingCheck if a proposed schema is compatible with the subject's compatibility pol...
kafka_consumestablecore-readstreamingRead messages from a Kafka topic with flexible positioning. Supports earliest...
kafka_create_connectorbetaops-writestreamingCreate a new Kafka Connect connector with the specified configuration.
kafka_create_topicbetaops-writestreamingCreate a new Kafka topic with specified partitions, replication factor, and c...
kafka_delete_connectorbetaops-writestreamingDelete a Kafka Connect connector.
kafka_delete_topicbetaops-writestreamingDelete a Kafka topic. This is a destructive operation.
kafka_describe_consumer_groupstablecore-readstreamingGet the state, members, partition assignments, and per-partition lag of a con...
kafka_describe_topicstablecore-readstreamingGet detailed metadata for a specific topic including partition details, repli...
kafka_diagnose_lagstablecore-readgovernanceDeep diagnostic analysis of consumer group lag. Traces root cause: slow consu...
kafka_discover_clustersstablecore-readopsAuto-discover Kafka clusters by scanning common ports, environment variables,...
kafka_discover_toolsstablecore-readdiscoveryDiscover the active provider, tool packs, and registered tools. Optionally fi...
kafka_get_schemastablecore-readstreamingGet the full schema definition for a subject. Returns parsed schema, field su...
kafka_governance_decisionbetagovernancegovernanceSimulate mutation policy, preview blast radius, generate least-privilege guid...
kafka_healthstablecore-readobservabilityRun a read-only Kafka health check using live cluster metadata, topic discove...
kafka_list_consumer_groupsstablecore-readstreamingList all consumer groups with summary state, member count, and total lag.
kafka_list_schemasstablecore-readstreamingList all subjects in the Schema Registry with latest version, type, and compa...
kafka_list_topicsstablecore-readstreamingList all Kafka topics in the cluster with metadata including partition count,...
kafka_metricsstablecore-readobservabilityReturn aggregated local KafkaMCP Prometheus metrics without exposing raw agen...
kafka_policy_evaluatebetagovernancegovernanceEvaluate an OPA Rego policy for an authorization decision. Returns whether th...
kafka_policy_simulatebetagovernancegovernanceSimulate a policy evaluation showing how each policy rule matches, without re...
kafka_producebetaops-writestreamingPublish one or more messages to a Kafka topic. Returns delivery confirmation ...
kafka_reset_offsetsbetaops-writestreamingReset consumer group offsets. Supports earliest, latest, or timestamp strateg...
kafka_restart_connectorbetaops-writestreamingRestart a Kafka Connect connector or specific tasks. Supports bulk restart of...
kafka_searchstablecore-readstreamingSearch/filter messages in a topic by key, header, value content, or time rang...
kafka_update_connectorbetaops-writestreamingUpdate an existing Kafka Connect connector configuration.

Stable (15 tools)

The read-only default surface. Stable names and schemas follow the published compatibility policy.

  • kafka_analyze_dlq — Analyze a dead-letter queue topic: consume recent messages, parse error headers, categorize failure types, and return a statistical summary with samples.
  • kafka_check_schema_compatibility — Check if a proposed schema is compatible with the subject's compatibility policy.
  • kafka_consume — Read messages from a Kafka topic with flexible positioning. Supports earliest, latest, numeric offset, or ISO 8601 timestamp.
  • kafka_describe_consumer_group — Get the state, members, partition assignments, and per-partition lag of a consumer group.
  • kafka_describe_topic — Get detailed metadata for a specific topic including partition details, replicas, ISR, offsets, and configuration.
  • kafka_diagnose_lag — Deep diagnostic analysis of consumer group lag. Traces root cause: slow consumers, producer spikes, partition imbalance, or GC pressure.
  • kafka_discover_clusters — Auto-discover Kafka clusters by scanning common ports, environment variables, and DNS records.
  • kafka_discover_tools — Discover the active provider, tool packs, and registered tools. Optionally filter legacy capability metadata by category.
  • kafka_get_schema — Get the full schema definition for a subject. Returns parsed schema, field summary, compatibility, and references.
  • kafka_health — Run a read-only Kafka health check using live cluster metadata, topic discovery, and consumer-group discovery.
  • kafka_list_consumer_groups — List all consumer groups with summary state, member count, and total lag.
  • kafka_list_schemas — List all subjects in the Schema Registry with latest version, type, and compatibility level.
  • kafka_list_topics — List all Kafka topics in the cluster with metadata including partition count, replication factor, and estimated message count.
  • kafka_metrics — Return aggregated local KafkaMCP Prometheus metrics without exposing raw agent, topic, group, or cluster labels.
  • kafka_search — Search/filter messages in a topic by key, header, value content, or time range. Bounded scan.

Beta (14 tools)

Real functionality that must be opted into. Mutations require policy authorization and an approval grant.

  • kafka_acl_manage — Inspect and reconcile live Kafka ACLs. Read-only actions (list, audit, diff, dry_run) read live broker ACLs against a caller-supplied desired state. Reconciling actions (apply, reconcile) create missing and delete obsolete exact ACLs on the broker and require an approval grant. Stateless: no desired state is stored server-side.
  • kafka_alter_topic — Modify configuration of an existing Kafka topic.
  • kafka_approval — Manage identity-bound, short-lived approval grants for ops-write tools. Grants are two-person by default, single-use, argument-scoped, persisted when SQLite is enabled, and recorded in a tamper-evident decision chain.
  • kafka_create_connector — Create a new Kafka Connect connector with the specified configuration.
  • kafka_create_topic — Create a new Kafka topic with specified partitions, replication factor, and configuration.
  • kafka_delete_connector — Delete a Kafka Connect connector.
  • kafka_delete_topic — Delete a Kafka topic. This is a destructive operation.
  • kafka_governance_decision — Simulate mutation policy, preview blast radius, generate least-privilege guidance, and verify/export tamper-evident approval decisions. Actions: simulate, verify, export.
  • kafka_policy_evaluate — Evaluate an OPA Rego policy for an authorization decision. Returns whether the action is allowed with reasoning.
  • kafka_policy_simulate — Simulate a policy evaluation showing how each policy rule matches, without recording the decision.
  • kafka_produce — Publish one or more messages to a Kafka topic. Returns delivery confirmation with partition, offset, and timestamp.
  • kafka_reset_offsets — Reset consumer group offsets. Supports earliest, latest, or timestamp strategies with dry-run mode.
  • kafka_restart_connector — Restart a Kafka Connect connector or specific tasks. Supports bulk restart of failed tasks.
  • kafka_update_connector — Update an existing Kafka Connect connector configuration.

Tools

kafka_acl_manage

Inspect and reconcile live Kafka ACLs. Read-only actions (list, audit, diff, dry_run) read live broker ACLs against a caller-supplied desired state. Reconciling actions (apply, reconcile) create missing and delete obsolete exact ACLs on the broker and require an approval grant. Stateless: no desired state is stored server-side.

Source: register_aclmgmt.go

Stability: beta

Tool packs: governance, ops-write

Category: governance

Parameters:

NameTypeRequiredDescription
actionstringAction: list, audit, diff, dry_run, apply, reconcile
principalstringPrincipal filter or default principal for supplied rules (e.g. User:app1)
resource_typestringResource type filter for list/audit: topic, group, cluster, transactional_id
clusterstringCluster name for multi-cluster setups.
rulesobjectDesired ACL rules array (for diff, dry_run, apply, reconcile). Each rule: {principal, host, resource_type, resource_name, pattern_type, operation, permission}
approval_tokenstringShort-lived token issued by kafka_approval for this exact request.
idempotency_keystringOptional retry key for safely suppressing a duplicate successful mutation.

kafka_alter_topic

Modify configuration of an existing Kafka topic.

Source: register_p1.go

Stability: beta

Tool packs: ops-write

Category: streaming

Parameters:

NameTypeRequiredDescription
namestringTopic name
clusterstringCluster name.
approval_tokenstringShort-lived token issued by kafka_approval for this exact request.

kafka_analyze_dlq

Analyze a dead-letter queue topic: consume recent messages, parse error headers, categorize failure types, and return a statistical summary with samples.

Source: register_p1.go

Stability: stable

Tool packs: core-read

Category: streaming

Parameters:

NameTypeRequiredDescription
topicstringDLQ topic name
limitnumberMax messages to analyze. Default: 100
clusterstringCluster name.

kafka_approval

Manage identity-bound, short-lived approval grants for ops-write tools. Grants are two-person by default, single-use, argument-scoped, persisted when SQLite is enabled, and recorded in a tamper-evident decision chain.

Source: register_approval.go

Stability: beta

Tool packs: governance, ops-write

Category: governance

Parameters:

NameTypeRequiredDescription
actionstringrequest
toolstringTarget write tool (for request), e.g. kafka_delete_topic
request_reasonstringWhy the mutation is needed (for request)
grant_idstringGrant identifier (for approve/get/revoke)
ttl_secondsnumberRequested grant lifetime in seconds (for approve); capped by config
reasonstringReason (for revoke)
agent_idstringOptional agent filter for list (admin only)

kafka_check_schema_compatibility

Check if a proposed schema is compatible with the subject's compatibility policy.

Source: register_p0.go

Stability: stable

Tool packs: core-read

Category: streaming

Parameters:

NameTypeRequiredDescription
subjectstringSchema subject name
schemastringThe proposed schema definition as a JSON string
schema_typestringSchema type: AVRO, PROTOBUF, JSON. Default: AVRO
versionstringVersion to check against. Default: 'latest'

kafka_consume

Read messages from a Kafka topic with flexible positioning. Supports earliest, latest, numeric offset, or ISO 8601 timestamp.

Source: register_p0.go

Stability: stable

Tool packs: core-read

Category: streaming

Parameters:

NameTypeRequiredDescription
topicstringTopic name
partitionnumberSpecific partition (-1 for all). Default: all
offsetstringStart position: 'earliest', 'latest', numeric offset, or ISO 8601 timestamp. Default: 'latest'
limitnumberMaximum messages to return (1-1000). Default: 10
deserializerstringDeserialization format: auto, json, string, bytes. Auto tries JSON and falls back to string.
timeout_msnumberMaximum wait time in ms. Default: 5000
clusterstringCluster name.

kafka_create_connector

Create a new Kafka Connect connector with the specified configuration.

Source: register_advanced.go

Stability: beta

Tool packs: ops-write

Category: streaming

Parameters:

NameTypeRequiredDescription
namestringConnector name
configobjectConnector configuration map
clusterstringCluster name.
approval_tokenstringShort-lived token issued by kafka_approval for this exact request.
idempotency_keystringOptional retry key for safely suppressing a duplicate successful mutation.

kafka_create_topic

Create a new Kafka topic with specified partitions, replication factor, and configuration.

Source: register_p1.go

Stability: beta

Tool packs: ops-write

Category: streaming

Parameters:

NameTypeRequiredDescription
namestringTopic name
partitionsnumberNumber of partitions. Default: 1
replication_factornumberReplication factor. Default: 1
clusterstringCluster name.
approval_tokenstringShort-lived token issued by kafka_approval for this exact request.
idempotency_keystringOptional retry key for safely suppressing a duplicate successful mutation.

kafka_delete_connector

Delete a Kafka Connect connector.

Source: register_advanced.go

Stability: beta

Tool packs: ops-write

Category: streaming

Parameters:

NameTypeRequiredDescription
namestringConnector name
clusterstringCluster name.
approval_tokenstringShort-lived token issued by kafka_approval for this exact request.
idempotency_keystringOptional retry key for safely suppressing a duplicate successful mutation.

kafka_delete_topic

Delete a Kafka topic. This is a destructive operation.

Source: register_p1.go

Stability: beta

Tool packs: ops-write

Category: streaming

Parameters:

NameTypeRequiredDescription
namestringTopic name to delete
clusterstringCluster name.
approval_tokenstringShort-lived token issued by kafka_approval for this exact request.
idempotency_keystringOptional retry key for safely suppressing a duplicate successful mutation.

kafka_describe_consumer_group

Get the state, members, partition assignments, and per-partition lag of a consumer group.

Source: register_p0.go

Stability: stable

Tool packs: core-read

Category: streaming

Parameters:

NameTypeRequiredDescription
group_idstringConsumer group ID
clusterstringCluster name.

kafka_describe_topic

Get detailed metadata for a specific topic including partition details, replicas, ISR, offsets, and configuration.

Source: register_p0.go

Stability: stable

Tool packs: core-read

Category: streaming

Parameters:

NameTypeRequiredDescription
topicstringTopic name
clusterstringCluster name for multi-cluster setups.

kafka_diagnose_lag

Deep diagnostic analysis of consumer group lag. Traces root cause: slow consumers, producer spikes, partition imbalance, or GC pressure.

Source: register_features.go

Stability: stable

Tool packs: core-read

Category: governance

Parameters:

NameTypeRequiredDescription
group_idstringConsumer group ID
clusterstringCluster name.

kafka_discover_clusters

Auto-discover Kafka clusters by scanning common ports, environment variables, and DNS records.

Source: register_onboarding.go

Stability: stable

Tool packs: core-read

Category: ops

kafka_discover_tools

Discover the active provider, tool packs, and registered tools. Optionally filter legacy capability metadata by category.

Source: register_capability.go

Stability: stable

Tool packs: core-read

Category: discovery

Parameters:

NameTypeRequiredDescription
categorystringOptional tool category to discover

kafka_get_schema

Get the full schema definition for a subject. Returns parsed schema, field summary, compatibility, and references.

Source: register_p0.go

Stability: stable

Tool packs: core-read

Category: streaming

Parameters:

NameTypeRequiredDescription
subjectstringSchema subject name (e.g., 'orders.created-value')
versionstringVersion: 'latest' or number. Default: 'latest'

kafka_governance_decision

Simulate mutation policy, preview blast radius, generate least-privilege guidance, and verify/export tamper-evident approval decisions. Actions: simulate, verify, export.

Source: register_approval.go

Stability: beta

Tool packs: governance

Category: governance

Parameters:

NameTypeRequiredDescription
actionstringsimulate
toolstringTarget write tool (for simulate)
argsobjectExact target-tool arguments (for simulate)
grant_idstringGrant identifier (for verify)
agent_idstringOptional agent filter (for export; admin only when different from caller)

kafka_health

Run a read-only Kafka health check using live cluster metadata, topic discovery, and consumer-group discovery.

Source: register_core_observability.go

Stability: stable

Tool packs: core-read

Category: observability

Parameters:

NameTypeRequiredDescription
clusterstringCluster name. Defaults to the configured default cluster.

kafka_list_consumer_groups

List all consumer groups with summary state, member count, and total lag.

Source: register_p0.go

Stability: stable

Tool packs: core-read

Category: streaming

Parameters:

NameTypeRequiredDescription
state_filterstringFilter by state (Stable, Empty, Dead)
clusterstringCluster name.

kafka_list_schemas

List all subjects in the Schema Registry with latest version, type, and compatibility level.

Source: register_p0.go

Stability: stable

Tool packs: core-read

Category: streaming

Parameters:

NameTypeRequiredDescription
filterstringGlob pattern to filter subject names

kafka_list_topics

List all Kafka topics in the cluster with metadata including partition count, replication factor, and estimated message count.

Source: register_p0.go

Stability: stable

Tool packs: core-read

Category: streaming

Parameters:

NameTypeRequiredDescription
filterstringGlob pattern to filter topic names (e.g., 'orders.', '-dlq')
include_internalbooleanInclude internal topics (e.g., __consumer_offsets). Default: false
clusterstringCluster name for multi-cluster setups.

kafka_metrics

Return aggregated local KafkaMCP Prometheus metrics without exposing raw agent, topic, group, or cluster labels.

Source: register_core_observability.go

Stability: stable

Tool packs: core-read

Category: observability

kafka_policy_evaluate

Evaluate an OPA Rego policy for an authorization decision. Returns whether the action is allowed with reasoning.

Source: register_opa.go

Stability: beta

Tool packs: governance

Category: governance

Parameters:

NameTypeRequiredDescription
agentstringAgent ID to evaluate
actionstringAction: read, write, create, delete, admin
resourcestringResource type: topic, consumer_group, schema, cluster
resource_namestringSpecific resource name. Default: *

kafka_policy_simulate

Simulate a policy evaluation showing how each policy rule matches, without recording the decision.

Source: register_opa.go

Stability: beta

Tool packs: governance

Category: governance

Parameters:

NameTypeRequiredDescription
agentstringAgent ID to simulate
actionstringAction to simulate
resourcestringResource type
resource_namestringSpecific resource name

kafka_produce

Publish one or more messages to a Kafka topic. Returns delivery confirmation with partition, offset, and timestamp.

Source: register_p0.go

Stability: beta

Tool packs: ops-write

Category: streaming

Parameters:

NameTypeRequiredDescription
topicstringTopic name
messagesobjectArray of messages: [{key, value, headers, partition}]. Max 100.
acksstringAcknowledgment level: 0, 1, all. Default: all
clusterstringCluster name.
approval_tokenstringShort-lived token issued by kafka_approval for this exact request.

kafka_reset_offsets

Reset consumer group offsets. Supports earliest, latest, or timestamp strategies with dry-run mode.

Source: register_p1.go

Stability: beta

Tool packs: ops-write

Category: streaming

Parameters:

NameTypeRequiredDescription
group_idstringConsumer group ID
topicstringTopic name
strategystringReset strategy: earliest, latest, timestamp
valuestringTimestamp value for 'timestamp' strategy (ISO 8601)
dry_runbooleanPreview without applying. Default: false
clusterstringCluster name.
approval_tokenstringShort-lived token issued by kafka_approval for this exact request.

kafka_restart_connector

Restart a Kafka Connect connector or specific tasks. Supports bulk restart of failed tasks.

Source: register_advanced.go

Stability: beta

Tool packs: ops-write

Category: streaming

Parameters:

NameTypeRequiredDescription
namestringConnector name
task_idnumberSpecific task ID to restart (-1 for all). Default: -1
failed_onlybooleanOnly restart failed tasks. Default: false
clusterstringCluster name.
approval_tokenstringShort-lived token issued by kafka_approval for this exact request.

Search/filter messages in a topic by key, header, value content, or time range. Bounded scan.

Source: register_p1.go

Stability: stable

Tool packs: core-read

Category: streaming

Parameters:

NameTypeRequiredDescription
topicstringTopic name
key_filterstringFilter messages where key contains this string
header_keystringFilter messages that have this header key
header_valuestringFilter messages where the header matches this value
value_containsstringFilter messages where value contains this string
start_timestringStart time (ISO 8601) for time range filter
end_timestringEnd time (ISO 8601) for time range filter
max_scannumberMax messages to scan. Default: 10000
limitnumberMax matching messages to return. Default: 10
clusterstringCluster name.

kafka_update_connector

Update an existing Kafka Connect connector configuration.

Source: register_advanced.go

Stability: beta

Tool packs: ops-write

Category: streaming

Parameters:

NameTypeRequiredDescription
namestringConnector name
configobjectNew connector configuration map
clusterstringCluster name.
approval_tokenstringShort-lived token issued by kafka_approval for this exact request.
idempotency_keystringOptional retry key for safely suppressing a duplicate successful mutation.