Skip to content

feat: add multi-transport support (stdio, streamable-http, sse)#9

Merged
alaturqua merged 1 commit intomainfrom
update_project
Dec 1, 2025
Merged

feat: add multi-transport support (stdio, streamable-http, sse)#9
alaturqua merged 1 commit intomainfrom
update_project

Conversation

@alaturqua
Copy link
Owner

  • Update Dockerfile for multi-transport with proper defaults
  • Add docker-compose services for all transport modes
  • Fix pyproject.toml structure and add build-system config
  • Improve server.py CLI with better help and transport handling
  • Bump version to 0.7.0

Pull Request Title

Description

A clear and concise description of what this pull request does.

Related Issues

Link any related issues or pull requests.

Description

A clear and concise description of what this pull request does.

Related Issues

Link any related issues or pull requests.

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation accordingly.
  • I have added a changelog entry.

- Update Dockerfile for multi-transport with proper defaults
- Add docker-compose services for all transport modes
- Fix pyproject.toml structure and add build-system config
- Improve server.py CLI with better help and transport handling
- Bump version to 0.7.0
Copilot AI review requested due to automatic review settings December 1, 2025 00:18
@alaturqua alaturqua merged commit 3f682dd into main Dec 1, 2025
5 of 6 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds multi-transport support to the MCP Trino server, enabling it to communicate via stdio (standard I/O), streamable-http, or SSE (Server-Sent Events). The changes include improved CLI argument handling, Docker configuration updates for different transport modes, and version bump to 0.7.0.

Key Changes:

  • Enhanced CLI with better help text and explicit transport mode handling
  • Added optional HTTP dependencies for streamable-http and SSE transports
  • Updated Docker configurations to support all three transport modes with proper defaults
  • Added build system configuration to pyproject.toml

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/server.py Enhanced CLI argument parser with detailed help text and explicit transport mode handling logic
pyproject.toml Version bump to 0.7.0, restructured dependencies, added optional HTTP dependencies and script entry point
docker-compose.yml Added separate services for each transport mode with health checks and appropriate configurations
Dockerfile Improved build process with better layer caching and configurable transport defaults
uv.lock Updated lock file with new dependency versions including mcp 1.22.0, cffi 2.0.0, and new dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

http = ["uvicorn>=0.32.0", "starlette>=0.41.0"]

[project.scripts]
mcp-trino = "server:main"
Copy link

Copilot AI Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script entry point path is incorrect. It should be "server:main""src.server:main" since the server.py file is in the src/ directory, not at the root.

Suggested change
mcp-trino = "server:main"
mcp-trino = "src.server:main"

Copilot uses AI. Check for mistakes.
Comment on lines +598 to +603
def main():
"""Entry point for the MCP Trino server."""
import sys

sys.argv = sys.argv[:1] # Reset args for mcp.run
mcp.run(transport="stdio")
Copy link

Copilot AI Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main() function resets sys.argv which will break command-line argument parsing. This function appears to be intended as an entry point but doesn't handle the transport argument properly - it always uses "stdio" regardless of CLI arguments. Consider removing the sys.argv = sys.argv[:1] line or redesigning the entry point to properly handle arguments.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants