-
Notifications
You must be signed in to change notification settings - Fork 166
Add Streamable HTTP Support and Graceful Shutdown for Postgres MCP Server #78
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
base: main
Are you sure you want to change the base?
Conversation
|
@jssmith Hello, sorry for pinging you on this. Would you please review the PR and merge if the review is passed. Thank you. |
|
When I run the MCP inspector, it shows this now with SSE |
|
@jssmith | @mdashti | @greglearns can we merge this PR? :) We would like to migrate all the MCP servers we use to streamable http |
|
This fixes #102 |
|
Is this on the release schedule anywhere? Streamable HTTP seems like a pretty important use case. |
|
Unfortunately, there is no reponse for merging this change. I saw 2 options
{
"mcpServers": {
"postgres": {
"type": "http",
"url": "https://postgres-url.com/sse"
}
}
}
Or switch to another one: https://www.pulsemcp.com/servers/modelcontextprotocol-postgres |
Thanks for your reply. I saw that there were others who wanted this to move forward, I was hoping a little more interest might get a bump here but I'll take a look at alternatives. |
|
FYI I pinged @jssmith directly on LinkedIn and he said he'll take a look this week :) maybe he'd promote sb to be a maintainer |
Summary
This PR implements streamable HTTP transport support and fixes graceful shutdown handling for the Postgres MCP server, addressing issues with signal handling in stdio transport environments.
Changes Made
Core Improvements
Modified Files
src/postgres_mcp/__init__.py: Simplified main entry point to properly delegate to server.main()src/postgres_mcp/server.py: Enhanced with streamable HTTP support and robust shutdown handlingKey Features
Problem Solved
Previously,
Solution
Testing
Backward Compatibility
Usage Examples
Default MCP Usage (stdio)
uv run postgres-mcp # Uses stdio transport as beforeStreamable HTTP Usage
Notes
Type: Enhancement, Bug Fix
Breaking Changes: None
Requires Migration: No