PostgREST
MCP server for PostgREST — REST API layer for PostgreSQL databases.
От сообщества: Добавлен пользователем или импортирован; проверьте владельца перед подключениемРаботаетНужен API-ключГлобальныйБесплатноМожет изменять данные
Что умеет
- Pg Get Schema: Get the PostgREST OpenAPI schema — lists all available tables, views, functions, and their columns/types. Use this first to discover the database structure.
- Pg Describe Table: Get detailed column information for a table/view — column names, types, formats, required fields, defaults, and constraints. Parsed from the OpenAPI schema.
- Pg List Records: List records from a table/view with filtering, column selection, ordering, and pagination. Filter syntax (PostgREST operators): age=gt.18 — greater than status=eq.active — equals name
Какие данные видит
Нужен ли аккаунт
Нужен API-ключ из настроек сервиса
MCP server for PostgREST — REST API layer for PostgreSQL databases.
Features
- Discover database schema (tables, views, functions, columns)
- Query records with PostgREST filter syntax (eq, gt, like, in, fts, or)
- Resource embedding — JOIN related tables via select parameter
- Full CRUD operations (insert, update, upsert, delete, replace)
- Call stored PostgreSQL functions via RPC
- Count records with exact, planned, or estimated methods
10 Tools
Schema: get OpenAPI schema, describe table columns/types Read: list records with filters/select/order/pagination, count records, call functions (RPC) Write: insert, update, upsert (merge/ignore duplicates), delete, replace (PUT)
Configuration
- POSTGREST_URL — Your PostgREST server URL (e.g. http://localhost:3000)
- POSTGREST_TOKEN — JWT token for authenticated requests (optional)
Список инструментов сервера (10)
Технические названия из tools/list. Нужны только разработчикам.
| pg_get_schema | Get the PostgREST OpenAPI schema — lists all available tables, views, functions, and their columns/types. Use this first to discover the database structure. |
| pg_describe_table | Get detailed column information for a table/view — column names, types, formats, required fields, defaults, and constraints. Parsed from the OpenAPI schema. |
| pg_list_records | List records from a table/view with filtering, column selection, ordering, and pagination. Filter syntax (PostgREST operators): age=gt.18 — greater than status=eq.active — equals name=ilike.*john* — case-insensitive LIKE id=in.(1,2,3) — IN list deleted_at=is.null — NULL check or=(age.lt.18,age.gt.65) — OR conditions Select syntax (column selection + resource embedding): id,name,email — specific columns *,orders(*) — embed related table (JOIN) id,user:user_id(name) — renamed embed with column selection Order syntax: created_at.desc — descending status.asc,name.desc — multiple columns |
| pg_count_records | Count records in a table/view matching optional filters. Returns count using exact (precise but slower), planned (fast estimate from query planner), or estimated method. |
| pg_call_function | Call a PostgreSQL function/procedure via RPC. Use POST (default) for volatile functions, GET for immutable/stable functions. Parameters are passed as JSON body (POST) or query string (GET). |
| pg_insert_records | Insert one or more records into a table. Pass a single object or array of objects. Use return="representation" to get the created records back. |
| pg_update_records | Update records matching a filter. IMPORTANT: filter is required to prevent accidental full-table updates. Use return="representation" to see updated records. |
| pg_upsert_records | Insert or update records (upsert). Uses "merge-duplicates" (update existing) or "ignore-duplicates" (skip existing) resolution. Conflict detection uses primary key by default, or specify on_conflict column. |
| pg_delete_records | Delete records matching a filter. IMPORTANT: filter is required to prevent accidental full-table deletion. Use return="representation" to see deleted records. |
| pg_replace_record | Full replace (PUT) a single record matching a filter. All columns must be specified including the primary key. Creates the record if it does not exist. |