PostgreSQL MCP Server
Execute queries directly on a PostgreSQL database.
PostgreSQL MCP Server
A Model Context Protocol (MCP) server that provides direct PostgreSQL database query execution capabilities. This server enables custom SQL query execution against PostgreSQL databases with support for parameterized queries and configurable timeouts. This project is designed specifically for use with the Cursor IDE.
Prerequisites
- Node.js >= 18.0.0
- PostgreSQL server (for target database operations)
- Network access to target PostgreSQL instances
Installation
Installing via Smithery
To install PostgreSQL Database Query Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @1Levick3/postgresql-mcp-server --client claude
Manual Installation
- Clone the repository
- Install dependencies:
npm install - Build the server:
npm run build - Add to MCP settings file:
{ "mcpServers": { "postgresql-mcp": { "command": "node", "args": ["/Users/1Levick3/Desktop/postgresql-mcp-server/build/index.js"], "disabled": false, "alwaysAllow": [], "env": { "POSTGRES_CONNECTION_STRING": "postgresUrl", "POSTGRES_SSL_CERT_PATH": "/Users/1levick3/Desktop/root.crt" } } } }
Development
npm run dev- Start development server with hot reloadnpm run lint- Run ESLintnpm test- Run tests
Security Considerations
- Connection Security
- Uses connection pooling
- Implements connection timeouts
- Validates connection strings
- Supports SSL/TLS connections
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
相關伺服器
pgEdge PostgreSQL MCP Server
100% Open Source Enterprise PostgreSQL MCP with natural language queries, hybrid search (pgvector+BM25)
Graphiti MCP Server
A framework for building and querying temporally-aware knowledge graphs for AI agents.
CData MYOB AccountRight
A read-only MCP server for MYOB AccountRight, enabling LLMs to query live data using the CData JDBC Driver.
Open Formula 1 MCP Server
MCP Server to retrieve and analyze Formula 1 (F1) races, cars, drivers, lap, pit stops and more.
IQ.wiki
Access data and information from IQ.wiki, the world's largest crypto and blockchain encyclopedia.
Discogs MCP Server
Access the Discogs API for music cataloging, search, and other database operations.
SqlAugur
MCP server providing AI assistants with safe, read-only access to SQL Server databases. Built with C#/.NET 10, it uses AST-based query validation (Microsoft's T-SQL parser) to ensure only SELECT statements execute - blocking INSERT/UPDATE/DELETE/DROP/EXEC at the syntax tree level. Features include schema exploration, PlantUML/Mermaid ER diagram generation, rate limiting, and integrated DBA diagnostic toolsets (First Responder Kit, DarlingData, sp_WhoIsActive).
OpenSearch MCP Server
An MCP server for interacting with OpenSearch clusters, configured via environment variables.
Zero-Vector MCP
A high-performance vector database server for AI persona memory management.
Databricks MCP Server
Interact with Databricks Unity Catalog metadata to explore catalogs, schemas, tables, and execute SQL queries.