You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "k-krawczyk (via GitHub)" <gi...@apache.org> on 2026/06/16 21:46:14 UTC

[I] Add a Model Context Protocol (MCP) server for Apache Pulsar [pulsar]

k-krawczyk opened a new issue, #26039:
URL: https://github.com/apache/pulsar/issues/26039

   **Issue Type:** New Feature
   **Priority:** Major
   **Labels:** `type/feature`
   
   ---
   
   ## Background
   
   The Model Context Protocol (MCP) is an open standard that lets AI agents invoke
   well-defined tools against a system. An MCP server for Apache Pulsar would allow
   operators and AI agents to inspect and manage a Pulsar cluster — producing and
   consuming messages, administration, monitoring, and schema operations — through a
   standardized protocol. Multiple Apache projects already ship MCP servers, including
   Kafka, Spark, Flink, Hive, Ignite, Solr, and Camel.
   
   ## Proposal
   
   A new Java module would expose Pulsar operations as MCP tools across four categories:
   
   - **Messaging (`PulsarClient`):** produce a message to a topic; consume N messages
     from a subscription (with or without ack); peek the last messages via a `Reader`
     without consuming (safe for debugging).
   - **Administration (`PulsarAdmin`):** list/create/delete tenants, namespaces, topics
     (partitioned and non-partitioned), and subscriptions; reset cursors; unload topics.
   - **Monitoring (`PulsarAdmin`):** topic stats (throughput, storage, producer/consumer
     counts), per-subscription backlog, broker/cluster health.
   - **Schema registry (`PulsarAdmin.schemas()`):** get the current/specified schema of a
     topic, upload a schema (Avro/JSON/Protobuf), list schema versions and compatibility.
   
   ## Design Notes
   
   The implementation would use the official MCP Java SDK
   (`modelcontextprotocol/java-sdk`, tracking the current MCP spec) together with the
   `pulsar-client` and `pulsar-client-admin` libraries. Both STDIO and HTTP/SSE
   transports would be supported. **Read-only mode is the default; destructive tools
   (delete topic/tenant, reset cursor) require an explicit admin mode plus a confirm
   flag.** Connection security covers token, OAuth2, and TLS auth, with no hardcoded
   secrets, per-tenant/namespace allow/deny lists, payload/count/timeout limits, and
   audit logging of every invoked operation. The MCP Java SDK dependency carries an
   ASF-compatible license (Apache-2.0 / MIT).
   
   ## Scope
   
   The MVP would include monitoring and read-only messaging (`produce`,
   `consume`/`peek`, `topics.list`, `topics.stats`, `schema.get`) with comprehensive
   testing. Full administration, monitoring, and schema-registry features would follow
   in subsequent pull requests.
   
   ## Acceptance Criteria
   
   - Builds successfully with Maven and passes checkstyle/spotless and `apache-rat`
     (Apache license headers on every file).
   - Includes unit tests (mocked `PulsarAdmin`/`PulsarClient`) and integration tests
     against a running broker (Testcontainers, `apachepulsar/pulsar`).
   - MCP compatibility verified with a real MCP client (MCP Inspector).
   - Documentation in the module README and Pulsar docs.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add a Model Context Protocol (MCP) server for Apache Pulsar [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on issue #26039:
URL: https://github.com/apache/pulsar/issues/26039#issuecomment-6388663637

   Thanks @k-krawczyk. This is a new component with a new dependency, its own security model and a public tool surface, so it needs a PIP and a [DISCUSS] thread on dev@pulsar.apache.org: https://github.com/apache/pulsar/blob/master/pip/README.md. Because it only uses the public client and admin APIs, the discussion should also settle whether it belongs in the main repository or in a separate one, like the connectors (PIP-465) and the other-language clients. I'm closing this for now; a PIP is welcome.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add a Model Context Protocol (MCP) server for Apache Pulsar [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat closed issue #26039: Add a Model Context Protocol (MCP) server for Apache Pulsar
URL: https://github.com/apache/pulsar/issues/26039


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org