Skip to content

Conversation

piki
Copy link
Contributor

@piki piki commented Aug 13, 2025

Of the eight tools currently implemented in pscale mcp, four needed to be updated to support Postgres: list_keyspaces, list_tables, get_schema, and run_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 and pscale shell work with both database engines, and it provides stronger instructions for LLMs to understand orgname/dbname and orgname/dbname/branch naming conventions. You can now send prompts like How many tables are there in benchmarks/pikitest? and e.g. Claude Desktop will answer the question correctly with a single tool use.

piki added 18 commits August 12, 2025 17:24
`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.
@piki piki requested a review from a team as a code owner August 13, 2025 02:14
@piki piki requested review from a team and removed request for a team August 13, 2025 02:15
@piki piki merged commit 675726a into main Aug 13, 2025
1 check passed
@piki piki deleted the piki/mcp-postgres branch August 13, 2025 13:26
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