Deploy MCP Server
Databases Bearer Token

PostgreSQL REST API

Open-source relational database with powerful SQL features

PostgreSQL is a powerful, open-source object-relational database system with over 35 years of active development. It provides robust ACID compliance, advanced data types, full-text search, and extensive indexing capabilities. Developers choose PostgreSQL for its reliability, data integrity, and support for complex queries, JSON operations, and geospatial data through PostGIS.

Base URL https://api.postgresql.rest/v1

API Endpoints

MethodEndpointDescription
GET/databasesList all databases in the PostgreSQL instance
POST/databasesCreate a new database with specified configuration
DELETE/databases/{database_name}Drop a database permanently
GET/databases/{database_name}/tablesList all tables in a specific database
POST/databases/{database_name}/tablesCreate a new table with defined schema
GET/databases/{database_name}/tables/{table_name}/schemaGet the schema definition for a specific table
POST/databases/{database_name}/queryExecute a SQL query and return results
POST/databases/{database_name}/tables/{table_name}/rowsInsert new rows into a table
GET/databases/{database_name}/tables/{table_name}/rowsRetrieve rows from a table with optional filtering
PATCH/databases/{database_name}/tables/{table_name}/rows/{row_id}Update specific rows in a table
DELETE/databases/{database_name}/tables/{table_name}/rows/{row_id}Delete rows from a table
GET/databases/{database_name}/indexesList all indexes in the database
POST/databases/{database_name}/indexesCreate a new index on specified columns
GET/databases/{database_name}/usersList database users and their permissions
POST/databases/{database_name}/backupCreate a backup of the database

Code Examples

curl -X POST https://api.postgresql.rest/v1/databases/myapp/query \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "SELECT * FROM users WHERE created_at > $1 LIMIT 10",
    "params": ["2024-01-01"]
  }'

Connect PostgreSQL to AI

Deploy a PostgreSQL MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to PostgreSQL through these tools:

execute_sql_query Execute arbitrary SQL queries against PostgreSQL databases with parameter binding and return structured results
get_table_schema Retrieve complete table schema including columns, data types, constraints, and indexes for analysis and migration
analyze_query_performance Run EXPLAIN ANALYZE on queries to get execution plans and performance metrics for optimization
manage_database_users Create, modify, and manage PostgreSQL users with granular permissions and role-based access control
create_backup_restore Generate database backups and restore from previous snapshots for disaster recovery and data protection

Deploy in 60 seconds

Describe what you need, AI generates the code, and IOX deploys it globally.

Deploy PostgreSQL MCP Server →

Related APIs