Sync fork#7
Merged
caleb-mabry merged 28 commits intomainfrom Feb 10, 2026
Merged
Conversation
* Fix Docker container hanging in stdio mode by using exec Use exec in docker-entrypoint.sh to replace the shell process with the Python process, making it PID 1. This ensures SIGTERM and SIGINT signals are properly received and handled during shutdown, preventing the container from hanging indefinitely when stopped. Without exec, the shell script remains as PID 1 and doesn't forward signals to the child Python process, causing it to wait forever for stdin to close in stdio mode. Reproducer: ``` $DOCKER run -p 8000:8000 -e DATABASE_URI -access-mode=restricted --transport=sse ``` Without these changes, `^C` does not work and the process is hung forever. After these changes `^C` properly exits. Assisted-by: Cursor AI * Make Dockerfile buildable and run as non-root I'm not able to build the Dockerfile as the `app` user doesn't exist in the base image. This creates it. It also makes sure the app runs as non-root.
* Fix escaping sequence names in health check
* Improve test coverage for quoted sequence name fix
- Restore original lowercase test_orders table
- Add separate UpperCaseOrders table to test quoted identifier handling
- Add unit tests for _parse_sequence_name covering various formats
- Document known limitation: sequence names with dots not supported
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix nextval parsing for text-cast format
Use regex to extract sequence name from nextval() expressions.
The previous string replacement approach failed for the
nextval(('id_seq'::text)::regclass) format.
Thanks to Codex for catching this issue.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Format test files with ruff
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix pyright error for None sql_driver in test
Add type: ignore comment since _parse_sequence_name doesn't use sql_driver.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Greg Soltis <gsoltis@sequoiacap.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…aldba#122) Add readOnlyHint and destructiveHint annotations to all tools to help LLMs better understand tool behavior and make safer decisions about tool execution. Changes: - Bump MCP SDK dependency from >=1.5.0 to >=1.8.0 (required for annotation support) - Add ToolAnnotations import from mcp.types - Add readOnlyHint: true to 8 read-only tools: - list_schemas: Lists database schemas - list_objects: Lists objects in a schema - get_object_details: Shows detailed info about objects - explain_query: Explains SQL query execution plans - analyze_workload_indexes: Analyzes queries and recommends indexes - analyze_query_indexes: Analyzes specific queries for indexes - analyze_db_health: Checks database health - get_top_queries: Reports slow/resource-intensive queries - Add execute_sql tool with mode-aware annotations: - UNRESTRICTED mode: destructiveHint: true (can modify data) - RESTRICTED mode: readOnlyHint: true (read-only queries) - Add title annotations for human-readable display This improves tool safety metadata for MCP clients. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: triepod-ai <noreply@github.com> Co-authored-by: Claude <noreply@anthropic.com>
- mcp: 1.5.0 → 1.25.0 - psycopg: 3.2.6 → 3.3.2 - humanize: 4.8.0 → 4.15.0 - pglast: 7.2.0 → 7.11 - attrs: 25.3.0 → 25.4.0 - psycopg-pool: 3.2.6 → 3.3.0 - instructor: 1.7.9 → 1.14.4 - pyright: 1.1.398 → 1.1.408 - pytest: 8.3.5 → 9.0.2 - pytest-asyncio: 0.26.0 → 1.3.0 - ruff: 0.11.2 → 0.14.13 Also: - Update ruff target-version to py39 (code already uses py39 syntax) - Remove deprecated pyright strictParameterNullChecking setting Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
The reference server was moved to the servers-archived repo. Fixes crystaldba#93 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* fix: Support PostgreSQL 12 in get_top_queries (crystaldba#111) Fixes column name mismatches in get_top_resource_queries() for PG ≤ 12: - Use stddev_time (not stddev_exec_time) for PG12 - Use total_time/mean_time (not *_exec_time) for PG12 - Handle missing wal_bytes column in PG12 (added in PG13) - Add NULLIF to prevent division by zero errors Also: - Add postgres:12 to test matrix - Add 2 unit tests for resource queries on PG12/PG13 - Integration tests verified with real PG 12/15/16 databases Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: Prefix unused result variable with underscore --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Dan OBrien <dobrien.nj+git@gmail.com>
…ba#133) Improvements: 1. Add _get_pg_stat_statements_columns() helper function - Eliminates duplication between get_top_queries_by_time and get_top_resource_queries - Single source of truth for version-dependent column names - Returns PgStatStatementsColumns dataclass for type safety 2. Add comprehensive documentation - Documents PostgreSQL 13 breaking changes (v2.0 of pg_stat_statements) - Links to official PG13 release notes - Explains why version branching is necessary Benefits: - More maintainable: one place to update if future PG versions change - More testable: helper can be unit tested independently - Self-documenting: clear dataclass shows all version differences - Type-safe: dataclass prevents typos in column names Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Add support for the streamable-http transport option alongside the existing stdio and sse transports. This addresses the deprecation of SSE transport in favor of streamable HTTP. Changes: - Add 'streamable-http' as a transport choice - Add --streamable-http-host and --streamable-http-port arguments - Call mcp.run_streamable_http_async() for streamable-http transport - Add comprehensive tests for all transport options Based on work by @ahmedmustahid in crystaldba#78. Closes crystaldba#102 Co-authored-by: Ahmed Mustahid <ahmedmustahid@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
#4) * Add dynamically_register_resources and remove list_schemas and list_objects * fix format code and fix_connection_url * fix resources * fix format * fix test
ryohang
approved these changes
Feb 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.