Skip to content

feat: add support for Streamable HTTP transport and update README #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ https://smithery.ai/server/@kenliao94/mcp-server-rabbitmq

## Roadmap
1. Expose admin API tools and pika SDK tools
1. Support Streamable HTTP when it is GA in Python SDK
1. Support OAuth 2.1 and use it with RabbitMQ OAuth

✅ Support Streamable HTTP now that is GA in Python SDK

## Development

### Setup Development Environment
Expand Down
14 changes: 13 additions & 1 deletion mcp_server_rabbitmq/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,15 @@ def run(self, args):
self.logger.info(f"Starting RabbitMQ MCP Server v{MCP_SERVER_VERSION}")
self.logger.info(f"Connecting to RabbitMQ at {self.rabbitmq_host}:{self.rabbitmq_port}")

if args.sse:
# Set port if specified
if args.server_port:
self.mcp.settings.port = args.server_port

# Determine transport type and run
if args.sse:
self.mcp.run(transport="sse")
elif args.streamable_http:
self.mcp.run(transport="streamable-http")
else:
self.mcp.run()

Expand All @@ -243,6 +249,12 @@ def main():
"--api-port", type=int, default=15671, help="Port for the RabbitMQ management API"
)
parser.add_argument("--sse", action="store_true", help="Use SSE transport")
parser.add_argument(
"--streamable-http",
dest="streamable_http",
action="store_true",
help="Use Streamable HTTP transport",
)
parser.add_argument(
"--server-port", type=int, default=8888, help="Port to run the MCP server on"
)
Expand Down