pg_psql
Run SQL queries to analyze, modify, or troubleshoot Heroku PostgreSQL databases. Execute commands or file-based queries with credential management for direct database access.
Instructions
Execute SQL queries against Heroku PostgreSQL databases. Use this tool when you need to: 1) Run SQL queries for database analysis, 2) Investigate database locks and performance, 3) Make schema modifications or updates, 4) Execute complex database operations. The tool provides direct SQL access with support for file-based queries and credential management.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
app | Yes | app to run command against | |
command | No | SQL command to run; file is ignored if provided; must be single line; must supply either command or file | |
credential | No | credential to use | |
database | No | Config var containing the connection string, unique name, ID, or alias of the database. To access another app's database, prepend the app name to the config var or alias with `APP_NAME::`. If omitted, DATABASE_URL is used. | |
file | No | SQL file to run; command is ignored if provided; must be an absolute path; must supply either command or file |
Input Schema (JSON Schema)
You must be authenticated.
Other Tools from Heroku MCP server
- create_addon
- create_app
- deploy_to_heroku
- get_addon_info
- get_app_info
- get_app_logs
- list_addon_plans
- list_addons
- list_addon_services
- list_apps
- list_private_spaces
- list_teams
- maintenance_off
- maintenance_on
- pg_backups
- pg_credentials
- pg_info
- pg_kill
- pg_locks
- pg_maintenance
- pg_outliers
- pg_ps
- pg_psql
- pg_upgrade
- pipelines_create
- pipelines_info
- pipelines_list
- pipelines_promote
- ps_list
- ps_restart
- ps_scale
- rename_app
- transfer_app
Related Tools
- @heroku/heroku-mcp-server
- @heroku/heroku-mcp-server
- @heroku/heroku-mcp-server
- @heroku/heroku-mcp-server
- @heroku/heroku-mcp-server