-
Notifications
You must be signed in to change notification settings - Fork 12
feat: v0.4 dev #24
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
feat: v0.4 dev #24
Conversation
Signed-off-by: Dennis Zhuang <[email protected]>
Signed-off-by: Dennis Zhuang <[email protected]>
|
@copilot review this PR, please |
|
@killme2008 I've opened a new pull request, #25, to work on those changes. Once the pull request is ready, I'll request review from you. |
Signed-off-by: Dennis Zhuang <[email protected]>
There was a problem hiding this 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 introduces HTTP transport support for the MCP server (addressing issue #23) and fixes TQL time parameter formatting to support SQL expressions alongside literal timestamps. The changes enable containerized and Kubernetes deployments through streamable-http and SSE transport modes, while maintaining backward compatibility with stdio mode for local CLI integration.
Key Changes:
- Added HTTP transport modes (streamable-http, sse) with configurable host/port settings
- Fixed TQL time parameter handling to support SQL expressions like
now() - interval '5' minute - Updated documentation and templates to clarify time format options
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/greptimedb_mcp_server/config.py |
Added transport, listen_host, and listen_port configuration parameters with environment variable and CLI argument support |
src/greptimedb_mcp_server/server.py |
Implemented get_config() with fallback, updated main() to configure HTTP server settings based on transport mode, and integrated new time expression validation |
src/greptimedb_mcp_server/utils.py |
Added is_sql_time_expression(), format_tql_time_param(), and validate_time_expression() functions for handling SQL time expressions vs literal timestamps |
tests/test_config.py |
Added comprehensive tests for new transport-related configuration options |
tests/test_http_transport.py |
Added blackbox tests for streamable-http and SSE transport modes, including endpoint validation and configuration testing |
tests/test_server.py |
Updated setup_state fixture to include new transport configuration parameters |
tests/test_utils.py |
Added tests for time expression detection, formatting, and validation functions |
README.md |
Added HTTP Server Mode section with usage examples and transport mode descriptions |
src/greptimedb_mcp_server/templates/promql_analysis/template.md |
Added clarification about supported time formats for TQL queries |
src/greptimedb_mcp_server/templates/promql_analysis/config.yaml |
Updated argument descriptions to document time format options |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Main changes:
startandendformats