PostgreSQL MCP Server
Предоставляет доступ только для чтения к базам PostgreSQL через Model Context Protocol. Позволяет AI-агентам изучать схемы баз данных, выполнять SELECT-запросы и исследовать структуру таблиц. Для защиты от случайного изменения данных использует изоляцию транзакций только для чтения. Ранее входил в набор эталонных серверов, теперь архивирован и доступен в servers-archived.
Описание переведено автоматически и пока не проверено редактором.
Подключение
Добавьте эту конфигурацию в .claude/mcp.json
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://localhost/mydb"
],
"env": {
"POSTGRES_CONNECTION_STRING": "<YOUR_POSTGRES_CONNECTION_STRING>"
}
}
}
}Инструменты (3)
query
Execute a read-only SQL query against the connected PostgreSQL database and return results.
{
"type": "object",
"required": [
"sql"
],
"properties": {
"sql": {
"type": "string",
"description": "SQL query to execute (SELECT statements only)"
}
}
}list_tables
List all tables in the connected PostgreSQL database with their schemas.
{
"type": "object",
"properties": {
"schema": {
"type": "string",
"description": "Schema name to filter tables (defaults to public)"
}
}
}describe_table
Get the column definitions, types, and constraints for a specific table.
{
"type": "object",
"required": [
"table_name"
],
"properties": {
"schema": {
"type": "string",
"description": "Schema name (defaults to public)"
},
"table_name": {
"type": "string",
"description": "Name of the table to describe"
}
}
}Ресурсы (1)
postgres://{host}/{database}/schemaAccess to the database schema information including tables, columns, and relationships.
Промпты
Этот сервер не предоставляет промпты.
Сведения о сервере
- Лицензия
- MIT
- Версия
- 0.6.2
- Звёзды
- 265
- Последнее обновление
- 27 января 2026 г.