Pulsar MCP Server
Provides tools for managing Apache Pulsar topics, publishing and consuming messages, and managing connectors.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Pulsar MCP Server Publish 'Hello' to topic 'greetings'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Pulsar MCP Server
A Model Context Protocol (MCP) server for Apache Pulsar that provides tools to interact with Pulsar clusters through MCP-compatible clients.
Features
Publish Messages: Send messages to Pulsar topics with optional properties
Consume Messages: Receive messages from topics with configurable subscription settings
Topic Management: Create, delete, and list topics
Topic Statistics: Get detailed statistics and metadata about topics
Connector Management: List, get status, and configuration of Pulsar IO connectors
Flexible Configuration: Environment-based configuration with sensible defaults
Related MCP server: Kafka MCP Server
Installation
From Source
Clone the repository:
git clone <repository-url>
cd pulsar-mcp-serverInstall dependencies:
pip install -r requirements.txtInstall the package in development mode:
pip install -e .Using pip (when published)
pip install pulsar-mcp-serverUsage
Command Line
After installation, you can run the server using:
pulsar-mcp-serverThe server will start and listen for MCP requests via stdio.
Programmatic Usage
from pulsar_mcp_server import main
# Run the server
main()Cursor MCP Server Usage
In your ~/.cursor/mcp.json file, add the following:
"pulsar": {
"command": "pulsar-mcp-server",
"env": {
"PULSAR_SERVICE_URL": "pulsar://localhost:6650",
"PULSAR_WEB_SERVICE_URL": "http://localhost:8080"
}
}Configuration
The server can be configured using environment variables or a .env file:
# Pulsar connection settings
PULSAR_SERVICE_URL=pulsar://localhost:6650
PULSAR_WEB_SERVICE_URL=http://localhost:8080
# Topic and subscription settings
TOPIC_NAME=my-topic
SUBSCRIPTION_NAME=pulsar-mcp-subscription
SUBSCRIPTION_TYPE=Shared
IS_TOPIC_READ_FROM_BEGINNING=false
# Authentication (optional)
PULSAR_TOKEN=your-jwt-token
PULSAR_TLS_TRUST_CERTS_FILE_PATH=/path/to/certs
PULSAR_TLS_ALLOW_INSECURE_CONNECTION=falseAvailable Tools
pulsar_publish
Publish a message to a Pulsar topic.
Parameters:
topic(string, required): The Pulsar topic to publish tomessage(string, required): The message content to publishproperties(object, optional): Message properties as key-value pairs
pulsar_consume
Consume messages from a Pulsar topic.
Parameters:
topic(string, required): The Pulsar topic to consume fromsubscription_name(string, required): The subscription namemax_messages(integer, optional): Maximum number of messages to consume (default: 10)
pulsar_create_topic
Create a new Pulsar topic.
Parameters:
topic(string, required): Name of the topic to createpartitions(integer, optional): Number of partitions (default: 1)
pulsar_delete_topic
Delete an existing Pulsar topic.
Parameters:
topic(string, required): Name of the topic to delete
pulsar_list_topics
List all topics in the Pulsar cluster.
Parameters: None
pulsar_topic_stats
Get statistics and metadata about a topic.
Parameters:
topic(string, required): Name of the topic to get stats for
pulsar_list_connectors
List all connectors of a specified type (source or sink).
Parameters:
connector_type(string, optional): Type of connectors to list ("source" or "sink", default: "source")
pulsar_connector_status
Get the status of a specific connector.
Parameters:
connector_name(string, required): Name of the connector to get status for
pulsar_connector_config
Get the configuration of a specific connector.
Parameters:
connector_name(string, required): Name of the connector to get configuration for
pulsar_all_connectors
Get all connectors organized by type (source and sink).
Parameters: None
Development
Project Structure
pulsar-mcp-server/
├── src/
│ └── pulsar_mcp_server/
│ ├── __init__.py # Package entry point
│ ├── server.py # MCP server implementation
│ ├── pulsar_connector.py # Pulsar client wrapper
│ └── settings.py # Configuration settings
├── pyproject.toml # Project configuration
├── requirements.txt # Dependencies
├── test_server.py # Test script
└── README.md # This fileTesting
Run the test script to verify the server functionality:
python test_server.pyRunning with Docker
You can also run Pulsar locally using Docker for testing:
# Start Pulsar standalone
docker run -it -p 6650:6650 -p 8080:8080 apachepulsar/pulsar:latest bin/pulsar standaloneRequirements
Python 3.12+
Apache Pulsar cluster (local or remote)
MCP-compatible client
Dependencies
mcp>=1.1.0,<2.0: Model Context Protocol librarypulsar-client>=3.4.0: Apache Pulsar Python clientpydantic>=2.10.3: Data validation and settings managementpydantic-settings>=2.6.1: Settings management for Pydantic
License
MIT License
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
Support
For issues and questions, please open an issue on the GitHub repository.
Available Tools
10 toolspulsar_all_connectorsB
Get all connectors organized by type (source and sink)
Inputs: no named parameters.
pulsar_connector_configB
Get the configuration of a specific connector
Inputs: connector_name (required).
pulsar_connector_statusB
Get the status of a specific connector
Inputs: connector_name (required).
pulsar_consumeB
Consume messages from a Pulsar topic
Inputs: topic (required), subscription_name (required), max_messages.
pulsar_create_topicC
Create a new Pulsar topic
Inputs: topic (required), partitions.
pulsar_delete_topicB
Delete an existing Pulsar topic
Inputs: topic (required).
pulsar_list_connectorsA
List all connectors of specified type (source or sink)
Inputs: connector_type.
pulsar_list_topicsB
List all topics in the Pulsar cluster
Inputs: no named parameters.
pulsar_publishB
Publish a message to a Pulsar topic
Inputs: topic (required), message (required), properties.
pulsar_topic_statsB
Get statistics and metadata about a topic
Inputs: topic (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
All tools have clearly distinct purposes. The slight overlap between 'pulsar_all_connectors' and 'pulsar_list_connectors' is resolved by descriptions: one returns all connectors organized by type, the other lists connectors of a specified type.
All tool names follow the consistent pattern 'pulsar_<verb>_<noun>' (e.g., create_topic, list_connectors). The naming is uniform and predictable, aiding agent selection.
With 10 tools, the server is well-scoped for a Pulsar cluster management interface. Each tool serves a necessary function without redundancy.
The tool set covers core topic operations (CRUD, publish, consume, stats) and connector inspection. However, it lacks connector creation/deletion, which may be needed for full lifecycle management.
Maintenance
Related MCP Connectors
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Manage Gumlet video, live streams, analytics, and workspaces from an MCP client.
Discover MCP servers and A2A agents; verify, message, post, follow, react, and receive webhooks.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with InfluxDB v3 (Core/Enterprise/Cloud Dedicated) through MCP clients. Supports database management, data querying and writing, schema inspection, and token administration operations.518 npmMIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with Kafka clusters to manage topics, monitor consumer groups, and stream messages. It provides a comprehensive suite of tools for broker metadata inspection and local Kafka user management.MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Apache Flink clusters via the SQL Gateway, allowing query execution, session management, and job control through MCP tools.8Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered MCP clients to interact with data lakehouse components including Kafka, Flink, and Trino/Iceberg for managing topics, jobs, catalogs, and executing queries.2-