DeployGet started

Deploy MCP Postgres Server

OpenAPI definition for the Deploy MCP Postgres server. The API exposes schema discovery, SQL execution, performance insights, and health checks backed by a live PostgreSQL connection provided at request time.

Version 1.0.09 endpoints
Deploy MCP Postgres Server logo

Endpoints

GET/analysis/db-healthanalyze_db_health

Run diagnostic checks against the connected database and report potential issues.

Parameters

NameInRequiredDescription
include_diagnosticsqueryNoInclude raw diagnostic data alongside summarized findings.

Responses

StatusDescription
200Results of health checks and recommended actions.
400The request payload or parameters were invalid.
401Authentication failed or connection string could not be used.
500Unexpected error while communicating with Postgres.
POST/analysis/query/indexesanalyze_query_indexes

Analyze a specific query and suggest indexes that could improve its execution plan.

Request body

  • application/json

Responses

StatusDescription
200Index recommendations relevant to the query.
400The request payload or parameters were invalid.
401Authentication failed or connection string could not be used.
500Unexpected error while communicating with Postgres.
POST/analysis/workload/indexesanalyze_workload_indexes

Suggest indexes that could improve performance for a representative workload of queries.

Request body

  • application/json

Responses

StatusDescription
200Index recommendations tailored to the supplied workload.
400The request payload or parameters were invalid.
401Authentication failed or connection string could not be used.
500Unexpected error while communicating with Postgres.
GET/monitoring/top-queriesget_top_queries

Return statements with the highest execution cost according to pg_stat_statements.

Parameters

NameInRequiredDescription
interval_minutesqueryNoHow far back in minutes to consider statistics for ranking.
limitqueryNoMaximum number of queries to return.

Responses

StatusDescription
200Top queries ordered by total execution time.
400The request payload or parameters were invalid.
401Authentication failed or connection string could not be used.
500Unexpected error while communicating with Postgres.
GET/schemaslist_schemas

Return the schemas accessible through the provided Postgres connection.

Parameters

NameInRequiredDescription
include_system_schemasqueryNoWhether to include system schemas such as `pg_catalog` and `information_schema`.

Responses

StatusDescription
200Schemas visible to the connection user.
400The request payload or parameters were invalid.
401Authentication failed or connection string could not be used.
500Unexpected error while communicating with Postgres.
GET/schemas/{schema}/objectslist_objects

Enumerate tables, views, functions, and other objects that live in the target schema.

Parameters

NameInRequiredDescription
schemapathYesSchema name to inspect.
typesqueryNoFilter results to one or more object types.

Responses

StatusDescription
200Objects that match the criteria.
400The request payload or parameters were invalid.
401Authentication failed or connection string could not be used.
500Unexpected error while communicating with Postgres.
GET/schemas/{schema}/objects/{object}get_object_details

Return DDL, column metadata, indexes, and dependencies for a schema-qualified object.

Parameters

NameInRequiredDescription
schemapathYesSchema that owns the object.
objectpathYesName of the object to inspect.
include_statsqueryNoWhen true, include planner statistics and index usage details where available.

Responses

StatusDescription
200Detailed metadata for the requested object.
400The request payload or parameters were invalid.
401Authentication failed or connection string could not be used.
500Unexpected error while communicating with Postgres.
POST/sql/executeexecute_sql

Run a SQL statement and return any resulting rows.

Request body

  • application/json

Responses

StatusDescription
200Execution results from the database.
400The request payload or parameters were invalid.
401Authentication failed or connection string could not be used.
500Unexpected error while communicating with Postgres.
POST/sql/explainexplain_query

Return the execution plan produced by EXPLAIN or EXPLAIN ANALYZE.

Request body

  • application/json

Responses

StatusDescription
200Query plan returned by Postgres.
400The request payload or parameters were invalid.
401Authentication failed or connection string could not be used.
500Unexpected error while communicating with Postgres.

See Deploy in action in under five minutes

Product Screenshot