Postgres MCP Server

by abiswas97

Not rated
GitHub

About

Provides secure database access to PostgreSQL using the Kysely ORM.

Details

Author
abiswas97
Categories
Database

Setup

Install Postgres MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/abiswas97/postgres-mcp-server

Follow the installation instructions in the repository README, then restart your MCP client.

A Model Context Protocol (MCP) server that provides secure database access to PostgreSQL through Kysely ORM. This server enables Claude Desktop to interact with PostgreSQL databases using natural language.

- MCP Tools: Query execution, table listing, schema inspection, and constraint information
- Type Safety: Full TypeScript support with typed inputs/outputs
- Connection Pooling: Configurable connection limits with idle timeout
- Error Handling: Graceful error messages for connection and query issues
- Security: Parameterized queries to prevent SQL injection

Create a.envfile with your database credentials:

DB_HOST=127.0.0.1 DB_PORT=5432 DB_USER=postgres DB_PASSWORD=your_password_here DB_NAME=postgres DB_SSL=true

- Pagination: Query tool supports up to 500 rows per page with automatic LIMIT/OFFSET handling
- Security: Parameterized queries prevent SQL injection, READ_ONLY mode by default
- Type Safety: Full TypeScript support with Zod schema validation

Add this server to your Claude Desktop configuration file:

{ "mcpServers": { "postgres-mcp-server": { "command": "npx", "args": ["postgres-mcp-server"], "env": { "DB_HOST": "127.0.0.1", "DB_PORT": "5432", "DB_USER": "postgres", "DB_PASSWORD": "your_password_here", "DB_NAME": "your_database_name", "DB_SSL": "true" } } } }

- macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:%APPDATA%\Claude\claude_desktop_config.json

# Clone and install dependencies git clone https://github.com/abiswas97/postgres-mcp-server.git cd postgres-mcp-server npm install # Run in development mode with hot reload npm run dev # Build for production npm run build # Run tests npm run test # Run specific test suites npm run test:unit npm run test:integration

Official Airtable MCP server and skills for working with bases, records, workflows, and business operations from AI agents.

MCP Server For Apache Doris, an MPP-based real-time data warehouse.

Official MCP Server from Atlan which enables you to bring the power of metadata to your AI tools

Query Onchain data, like ERC20 tokens, transaction history, smart contract state.

Read and write access to your Baserow tables.

Introspect and query your apps deployed to Convex.

Interact with the data stored in Couchbase clusters using natural language.

Maritime intelligence for tracking vessels, analysing ports, and exploring ship data.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.