Postgres MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Postgres MCP Server
A Model Context Protocol (MCP) server that exposes Postgres database information to VS Code agents and other MCP-compatible clients.
Features
List available databases
List schemas in a database
List tables in a schema
Get table schema (columns)
Execute read-only SQL queries
Related MCP server: pgsql-mcp-server
Setup
Create a virtual environment and install dependencies:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txtConfigure your Postgres connection in
.env:DB_HOST=localhost DB_PORT=5432 DB_NAME=postgres DB_USER=postgres DB_PASSWORD=your_passwordRun the server:
source venv/bin/activate python server.py
Usage with VS Code
Add to your .vscode/mcp.json:
{
"servers": {
"postgres-mcp": {
"type": "stdio",
"command": "venv/bin/python",
"args": ["server.py"]
}
}
}Tools
list_databases: Lists all databaseslist_schemas: Lists schemas in a databaselist_tables: Lists tables in a schemaget_table_schema: Gets column details for a tableexecute_query: Runs SELECT queries (read-only)
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Managed Postgres MCP: projects, SQL, docs search, and storage buckets via OAuth.
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables secure querying of PostgreSQL databases through MCP-compatible clients. Supports read-only SQL execution, table exploration, and connection management with built-in security validation.349 npm9MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with PostgreSQL databases through MCP, supporting queries, DDL, DML, and schema inspection.6MIT
- AlicenseAqualityDmaintenanceProvides read-only access to PostgreSQL databases, enabling querying, schema exploration, and table metadata retrieval via MCP tools like query, list-tables, describe-table, list-schemas, and list-environments.5MIT
- FlicenseAqualityCmaintenanceEnables inspecting database schemas and executing read-only SQL queries on a PostgreSQL database via MCP tools.3-