Kafka MCP security: permissions, read-only mode and risky tools

Confluent's open-source mcp-confluent server supports a per-connection read_only flag, optional service blocks and API key protection for its HTTP transport. This page explains what each control limits and what to lock down before a production connection.

On this page

Can the Kafka MCP server be locked down to read-only before it reaches production?

Yes. The open-source mcp-confluent server supports read-only enforcement per connection and access controls on its HTTP transport, and both are configuration settings in the open-source server, not a separate paid edition. Every connection accepts an optional read_only flag, which defaults to false. Setting it to true disables every tool that changes state for that connection, so produce and create, alter or delete operations cannot run there. The repository's CONFIGURATION.md recommends read-only connections for any staging or production cluster and reserves full read and write for a throwaway dev cluster. For the HTTP transport, server.auth.api_key and server.auth.allowed_hosts can require a key and restrict which hosts may connect.

The flag is only as strong as your config. Confirm that the production connection sets read_only: true, that dev and production connections are defined separately with distinct ids so a tool call cannot route to the wrong cluster, and that service blocks you do not need, such as flink, tableflow or confluent_cloud, are omitted, since tools that depend on a missing block disable themselves. Check that server.auth.disabled is not set, and test the live server against a non-production cluster to confirm writes are refused. Verify the flag's behavior against your own version of the server rather than relying on the documentation alone.

Several gaps remain with your team. The server does not decide who the agent acts for: identity, Kafka ACLs and the credentials in the config are yours to design, so use a principal with only the topic and group rights the agent needs. Read-only mode also does not stop reads of sensitive topics, so classify which topics the agent may see. Audit ownership sits with you too: decide where request logs from the MCP host and the Kafka broker are kept and who reviews them. Finally, confirm that the allowed hosts and API key are stored in a secrets manager and rotated on a schedule your security policy sets.

Which Kafka MCP security controls are built in, paid, or need outside components

This table compares the access controls in the mcp-confluent server against the deployment choices that decide how far an agent can reach. Read each row as a question to answer for your cluster: whether the control exists in the server, whether it depends on how you deploy it, or whether the sources do not document it. The main takeaway is that read-only mode and omitted service blocks are the controls you set yourself, while the managed Confluent Cloud server is a different deployment with its own documentation to review.

ControlWhat the sources documentStatus
read_only flag per connectionDefault is false. Setting read_only: true disables every tool that mutates state for that connection, based on each tool's readOnlyHint annotation.Built in to mcp-confluent
Service block omissionEach service block (kafka, schema_registry, confluent_cloud, flink, tableflow, telemetry) is optional. Tools that depend on a missing block disable themselves.Built in to mcp-confluent
Named multi-connection routingOne config can define several named connections, and each tool call routes to the connection addressed by id. Sample configs pair a read and write local Docker connection with a read-only Cloud or Confluent Platform connection.Built in to mcp-confluent
HTTP API key (server.auth.api_key)The HTTP transport can require an API key. This applies only when the server runs in HTTP mode.Dependent on deployment target
Allowed hosts (server.auth.allowed_hosts)The HTTP transport can restrict which hosts may connect. This applies only when the server runs in HTTP mode.Dependent on deployment target
Server auth disabled (server.auth.disabled)A setting exists in the HTTP transport configuration. Confirm in your own environment whether it is needed and how it interacts with the API key and allowed hosts settings.Dependent on deployment target
Self-managed direct connectionPlain Apache Kafka, Confluent Platform or a Docker broker is configured by pointing the kafka and schema_registry blocks at your own endpoints. Network placement and broker-side ACLs are outside this server.Dependent on deployment target
Fully managed Confluent Cloud MCP serverThe README says Confluent Cloud customers can use a managed server with nothing to run locally. Its permission model, authentication and logging are not covered by the sources used for this page, so confirm them with Confluent before rollout.Not documented in the sources

How the read_only flag decides which tools can change Kafka state

Every connection in the mcp-confluent configuration accepts an optional read_only flag, and it defaults to false. Setting read_only: true on a connection automatically disables every tool that mutates state on that connection. The control sits at the connection level, so the reviewer's question is which connection an agent can reach, not which individual tools were switched off. A production cluster should only ever appear in the config as a read-only connection, and the repository's CONFIGURATION.md recommends that pattern for staging and production, reserving full read and write for a throwaway dev cluster.

The mutation posture of each tool comes from its readOnlyHint annotation, not from anything an operator configures per tool. Because of that, produce, create, alter and delete operations cannot fire on a read-only connection, and there is no per-tool allowlist to maintain or misconfigure. The trade-off is that you cannot keep a single write tool available on a connection that otherwise stays read-only. A reviewer who needs that granularity should treat it as a gap and ask Confluent whether it is planned.

Before relying on this behavior, have your security or platform team confirm it in a test environment that mirrors your setup. Start the server with a read-only connection pointed at a disposable cluster, then ask the agent to produce a test message and to create or delete a topic. Check the broker state directly, not only the agent's reply, and record the tool list the client receives. Repeat the check after every server upgrade, because the annotations and their enforcement are the controls your approval depends on.

How tool calls route through connections, service blocks and the HTTP gate

The diagram starts with an MCP client sending a tool call to the server. If the HTTP transport is used, the server.auth settings (api_key and allowed_hosts) are checked first. The call is then routed by connection id to a named kafka or schema_registry connection, where a read_only check filters out any tool that mutates state. Check that each connection's read_only flag is set as intended and that only the service blocks you need are defined, since tools that depend on a missing block disable themselves.

Routing of an agent tool call through the HTTP gate, connection id and read_only check.

Which tool groups carry the most risk on a production cluster

The Confluent Kafka MCP server exposes tools that read cluster state and tools that change it. The risk sits in the change groups, and the read-only flag on each connection is the main control that removes them. The cards below set out each group, what happens if a production connection is left writable, and what to check before an agent connects.

Produce and write operations

Produce tools write new records into topics. On a writable connection, an agent can place messages into a production topic that downstream consumers, payment or order services, or analytics pipelines then process as valid events. Because writes are not reversible through the topic log, a bad produce can only be corrected by a later message or a manual repair. Under read_only: true, the produce tool is disabled for that connection because the server derives this from each tool's readOnlyHint annotation. Confirm the flag on every production connection before any agent uses it.

Configuration reference

Create, alter and delete on topics and schemas

Topic and schema administration tools can create topics, change topic configuration, or delete topics. A delete or a retention change on a production topic can remove data that consumers have not yet read, and a schema change can break producers and consumers that depend on the current contract. These calls are mutating, so the same read-only flag disables them on a read-only connection. Review the administrative tools you expect on each connection, and keep administrative credentials on a separate, non-agent connection.

Connector changes

Connector tools can create, pause, reconfigure or remove Kafka Connect connectors that move data into and out of external systems. A changed connector can start writing to a database, stop a sink, or redirect data to a new destination without any change in the application code. Because connectors are managed through the Connectors service block, omitting that block from the config removes these tools entirely. Confirm which service blocks each agent-facing configuration includes before rollout.

Flink SQL execution

Flink SQL tools run statements against stream processing jobs, and a statement that writes results or alters a job can change data well beyond a single topic. Execution is only as safe as the statement the agent generates, and a query that looks like a read can still create or modify streaming objects. The Flink block is optional, and tools that depend on a missing block disable themselves, so leaving it out of a production configuration removes this group. Where Flink is needed, ask the platform team which statements the agent may run and which credentials it uses.

How the lockdown differs for staging, production, dev and multi-cluster setups

The repository's guidance is that full read and write access belongs on a throwaway dev cluster, not on shared environments. On a disposable cluster, an agent that produces topics, alters configs or deletes data can do little lasting harm, which is why the documentation accepts write access there. The reader's job is to confirm that the cluster really is disposable and that no other team's data, consumer groups or schemas are reachable through the same connection.

  • Leave read_only unset or false: The default for read_only is false, so write tools stay enabled only when the connection is set up that way on purpose.
  • Confirm the cluster is throwaway: Check that the bootstrap endpoint points at a dev broker that holds no shared or regulated data.
  • Keep the credentials separate: Use a dev-only API key or account so a dev connection cannot be reused against staging or production.
  • Limit the blocks: Configure only the kafka or schema_registry blocks the work needs, so unused tool families stay disabled.
  • Avoid copying prod settings: Do not reuse a dev config file in a production deployment without rechecking every connection.

Before approving write access, confirm the dev cluster's contents, who can reach it, and how quickly it can be rebuilt.

Order of work before connecting the server to a production cluster

This sequence moves from scoping the server's configuration down to proving that write tools are absent for each connection, so the security team can approve a production connection on evidence rather than assumption.

  1. Inventory the service blocks you actually need

    The platform or integration owner lists the use cases the assistant must support, then maps each one to a service block in the mcp-confluent configuration: kafka, schema_registry, confluent_cloud, flink, tableflow or telemetry. Each block is optional, and a tool that depends on a missing block disables itself, so every block left out removes a set of capabilities from the agent. Remove the blocks no approved use case needs. The output is a short written list of enabled blocks with the reason for each, which the security reviewer can check against the agreed scope. Confirm the list against the current CONFIGURATION.md before you finalize it, since the block set is defined there.

  2. Set read-only on staging and production connections

    The engineer who owns the configuration sets the optional read_only flag to true on every connection that points at staging or production. The flag defaults to false, so this is an explicit step and not something the server does for you. The repository documents that read_only: true disables every tool that mutates state for that connection, and that produce and create, alter or delete operations cannot run on it. Keep this setting in version-controlled configuration so a later edit is visible in review. The check that closes this step is a diff of the config file showing the flag on each production connection.

  3. Keep write access only on a throwaway dev cluster

    The platform team defines any connection with write capability against a disposable development cluster only, and never against a shared or customer-facing environment. The repository's sample pattern pairs a read and write local Docker connection with a read-only Cloud or Confluent Platform connection, and this separation is the model to copy. Name each connection by its environment so that a tool call's target is clear in logs and in review. The step is complete when every connection with read_only set to false maps to a dev environment that the team has confirmed holds no production data.

  4. Restrict the HTTP endpoint if you use HTTP transport

    If the server runs over HTTP rather than a local transport, the engineer sets server.auth.api_key so that callers must present a key, and sets server.auth.allowed_hosts to the specific hosts that should reach the endpoint. The security team should confirm who issues and rotates the key, where it is stored, and that it is not committed to the repository. Confirm the allowed host list against the actual network paths your clients use, not a wildcard. Verify the result by checking that a request without a valid key or from an unlisted host is refused in a test environment before any production deployment.

  5. Confirm server authentication is not disabled

    The reviewer checks the configuration for server.auth.disabled and confirms it is not set to disable authentication on any endpoint that is reachable from outside the local machine. This is a separate check from the API key step, because a key only protects the endpoint if authentication is still active. The reviewer records the configuration version reviewed and the person who approved it. The step closes when the reviewer signs off on the exact config file that will be deployed, not a draft or an earlier version.

  6. Test that write tools are absent from the client

    Before any staff member connects an assistant, the test owner connects a client to each production-facing connection and lists the tools it offers. The expected result is that no tool capable of producing, creating, altering or deleting resources appears in that list, because the read-only setting removes them. Record the tool list for each connection and compare it with the list from the dev connection, which should contain the write tools. If a write tool appears on a read-only connection, stop the rollout and treat it as a configuration defect to fix and retest. The evidence is the saved tool listing for each connection, attached to the approval record.

What the server does not cover and how teams close each gap

The read_only flag and per-connection setup limit what an agent can call, but they do not decide who the agent acts as, where credentials live, which networks it reaches, or which topic data it can read. Each gap below needs a control outside the MCP server, and each item names what to confirm before approval.

Per-user identity and audit attribution

A connection defined in the server configuration runs with the credentials in that connection, so Kafka may record one shared principal instead of the person who prompted the agent. Confirm in the repository which identity each connection uses and whether the server adds any user context to requests. Until that is confirmed, assume Kafka audit logs show the service identity only. Create a dedicated least-privilege Kafka principal per environment and map audit review to that principal and to your MCP client logs.

Connection settings

Credential storage for Kafka keys

Self-managed connections point the kafka and schema_registry blocks at your own endpoints, which means API keys, SASL secrets or certificates for the cluster sit in the configuration the server reads. Confirm which credential fields the configuration accepts and whether values can come from environment variables or a secrets store. Keep the config file out of agent-readable workspaces, inject secrets at runtime from a secrets manager, and rotate keys on the same schedule as other service credentials.

Network placement and egress

The server must reach the broker and Schema Registry endpoints, and an HTTP transport must be reachable by the AI client. Place the server on a host that only routes to the non-production brokers the agent needs, and block egress to other clusters and to the internet from that host. Use the server's allowed host and API key settings for the HTTP endpoint, and confirm in your own environment which hosts the server resolves and contacts at runtime.

Read access to sensitive topic data

Read-only mode blocks writes, but any read tool can still return message payloads, including personal or payment data stored in topics. The read_only flag does not filter by topic or field. Apply topic-level ACLs so the MCP principal can read only the topics the use case requires, and exclude regulated topics from the connection entirely. Confirm with a test cluster which read tools return message contents before approving the connection.

Schema Registry and connector permissions

Tools for Schema Registry, Connectors and Flink operate through their own blocks, and the read-only flag applies per connection rather than per service. Omitting a block disables its tools, so leave out Connectors and Flink blocks unless the agent needs them. Confirm which Schema Registry operations a read-only connection can run and set matching ACLs or role bindings on the registry so that reads of schema metadata are limited to approved subjects.

What a security reviewer asks to see for Kafka MCP access controls

This table maps the controls a reviewer should ask for against where each one lives in the mcp-confluent configuration and what evidence to collect. Read it as a checklist for each connection the agent can reach, since most settings apply per connection or per service block. The main takeaway is that a read-only connection and a narrow set of service blocks are the strongest documented limits, and each should be shown in the config itself, not assumed.

Control asked forWhere it lives in the serverEvidence to collect
Read-only setting per connectionOptional read_only flag on each connection, default false; read_only: true disables every state-changing tool for that connectionConfig file showing read_only: true on each staging and production connection, plus a test that produce and alter calls are refused
Write access limited to throwaway clustersConnection definitions; CONFIGURATION.md recommends full read and write only on a disposable dev clusterList of connections with their endpoints and read_only values, mapped to environment (dev, staging, production)
Service block inventorykafka, schema_registry, confluent_cloud, flink, tableflow and telemetry blocks; a tool whose block is missing disables itselfConfig excerpt listing which blocks are present, with a note confirming that unused blocks are removed
Named connection routingMultiple named connections with each tool call routed by connection idRecord of which connection ids the agent client can address, and confirmation that no production id points at a write-enabled connection
HTTP api_key settingserver.auth.api_key for the server's HTTP transportEvidence that the key is set and stored outside the repository, and that the HTTP endpoint rejects requests without it
HTTP allowed_hosts settingserver.auth.allowed_hosts for the HTTP transportConfigured host list and a test showing a request from an unlisted host is refused
Auth disabled settingserver.auth.disabled for the HTTP transportConfirmation that the setting is false or absent in the deployed config, with the config file version recorded
Sample configs used for reviewSample configs in the repository pair a read and write local Docker connection with a read-only Cloud or Confluent Platform connectionThe exact config file the reviewer tested, its repository version or commit, and a diff against the sample showing every change

Questions buyers ask before approving Kafka MCP access

Does read_only fully prevent writes through the Kafka MCP server?

Setting read_only: true on a connection disables every tool that mutates state for that connection, so produce, create, alter and delete operations cannot run through it. The server decides this from each tool's readOnlyHint annotation, not from per-tool settings, so you do not configure individual tools. Confirm two things in your own environment: that the flag is set on every connection an agent can reach, and that the agent cannot reach a second connection that has write access. Sample configs in the repository pair a read and write local Docker connection with a read-only Cloud or Confluent Platform connection, so a mistake in routing matters as much as the flag itself.

Do Kafka ACLs still matter if the MCP connection is read-only?

Yes. The read_only flag is a control inside the MCP server, while Kafka ACLs are enforced by the cluster for whichever credentials the connection uses. If the MCP server is compromised, misconfigured or pointed at the wrong endpoint, the cluster's own permissions are the last line of defense. Create a dedicated principal for the agent with only the read operations it needs, and confirm with your cluster administrator which topics, consumer groups and schema subjects that principal can see. Treat the MCP flag and the ACLs as two separate controls that both need review.

What does a Kafka MCP security review cost, and who pays for it?

Costs come from three sources: the internal time your platform and security teams spend on configuration, review and approval, the licensing or hosting of any server you run, and any external review you commission. The open-source server is published by Confluent, so the software itself carries no listed fee in the sources supplied, but you should confirm current licensing and Confluent Cloud plan terms with Confluent. Costs rise with the number of clusters, connections and environments, and with how many teams need access. DeployOpen fixed-scope engagements are agreed in writing before work starts, so ask for a quote that names the clusters, connections and tools in scope.

Can our team configure the Kafka MCP server safely without outside help?

Often yes, if you have engineers who already run Kafka clusters and understand Kafka ACLs and configuration files. The work is mostly writing the configuration with read-only connections for staging and production, omitting service blocks the agent does not need, and locking down the HTTP transport settings if you expose it. The repository documents these settings, but it does not replace a review of your cluster permissions or of how your MCP client stores credentials. If your team lacks that experience or needs independent evidence for an assessment, DeployOpen can plan, implement and test the setup against a written scope.

Does the fully managed Confluent Cloud MCP server change these answers?

It changes where the controls live. The mcp-confluent README says Confluent Cloud customers can use a fully managed Confluent MCP server with no local server to run, while the open-source server is aimed at Confluent Platform, self-managed Kafka or customized toolsets. Your review still needs to answer the same questions about what the agent can read and change, how it authenticates and what usage data leaves your network. Ask Confluent to document the managed server's permission model and logging, because the open-source configuration settings described here do not automatically apply to it.

What should we do about Kafka UI or other community MCP servers?

Treat them as unreviewed third-party software until you have assessed them. Servers such as Kafka UI or Kafka Connect MCP servers are community projects that Confluent's repository and documentation do not cover, so the read-only behavior, authentication and telemetry described for mcp-confluent do not transfer to them. Before any staff member connects one, confirm who publishes it, what permissions its tools request, how it stores broker credentials and whether it sends data externally. Until that review is complete, limit such servers to a throwaway development cluster or do not allow them against production.

How DeployOpen works on this

DeployOpen reviews a Kafka MCP setup before it reaches a production cluster: which connections exist, what each one can read or change, and how the server is reached over HTTP. We test the setup, deliver fixes with a retest, and prepare the evidence your security and compliance reviewers ask for.

How we scope

  • We list every connection in the configuration and record which cluster, environment and owner each one serves.
  • We map which service blocks are present, so each enabled tool and its read or write reach is written down.
  • Scope, deliverables and timelines are agreed in writing before work starts, and ongoing support is available as a retainer.

How we build

  • We set read_only to true on staging and production connections and confirm that produce and admin tools are disabled.
  • We test whether the agent can reach write paths through prompt injection, and whether any dev connection could touch shared topics.
  • We check the HTTP transport settings for an API key, allowed hosts and whether authentication is disabled anywhere.

How we hand over

  • You receive a findings report with each finding, its risk, the configuration change that fixes it and the evidence behind it.
  • We provide a reviewed configuration baseline with named connections, read-only flags and omitted blocks documented for your team.
  • We retest after fixes are applied and record the results so your security reviewers can see what changed.

How we support

  • We help prepare AI security questionnaire answers and evidence on how the Kafka MCP server is restricted and reviewed.
  • We can repeat the review when the Kafka MCP configuration changes, a new connection is added or the server is upgraded.
  • Continuous testing and upgrade support are available as retainers, with the scope confirmed in writing for each engagement.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.