-
Notifications
You must be signed in to change notification settings - Fork 52
Implement all the MCP tools for Postgres #1105
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
Merged
Merged
Conversation
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
`pscale shell` was listed as Vitess-specific, but it works with all databases now. This change should've been in #1103, but I forgot. `pscale mcp` was listed as a platform/account command, but it's really a database management command. So I'm moving that, too.
Now you can ask an LLM things like `Who is the most prolific poster in the benchmarks/beam database?` and it knows that you mean an org and a database within it.
If we got that far, the database exists, and it's the branch that's missing.
Can't use parameterized queries in SHOW CREATE TABLE statements. Too bad. Escaping is going to have to be good enough.
nickvanw
approved these changes
Aug 13, 2025
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.
Of the eight tools currently implemented in
pscale mcp
, four needed to be updated to support Postgres:list_keyspaces
,list_tables
,get_schema
, andrun_query
. All four run SQL queries using the ephemeral read-only roles added in #1103.This PR also updates the usage statement to reflect that
pscale mcp
andpscale shell
work with both database engines, and it provides stronger instructions for LLMs to understandorgname/dbname
andorgname/dbname/branch
naming conventions. You can now send prompts likeHow many tables are there in benchmarks/pikitest?
and e.g. Claude Desktop will answer the question correctly with a single tool use.