Simple PostgreSQL MCP Server
An MCP server for executing SQL queries on PostgreSQL databases with configurable permissions.
Simple PostgreSQL MCP Server
A minimal Model Context Protocol (MCP) server for executing SQL queries on PostgreSQL databases with configurable permissions.
Features
- Execute SQL queries with optional read-only or write access
- Server-level mode (read-only/write) configurable via command line
- Returns structured results with metadata
- Simple setup using a PostgreSQL connection string
Getting Started
- Clone the repository
git clone https://github.com/perrypixel/Simple-Postgres-MCP cd Simple-Postgres-MCP - Install dependencies
npm install - Build the project
npm run build
MCP Configuration
Add the following to your MCP client configuration (mcp.json):
Write Mode (default)
{
"mcpServers": {
"simple-postgresql-mcp": {
"command": "node",
"args": [
"/path/to/build/index.js",
"postgresql://username:password@localhost:5432/database_name",
"write"
]
}
}
}
Read-Only Mode
{
"mcpServers": {
"simple-postgresql-mcp": {
"command": "node",
"args": [
"/path/to/build/index.js",
"postgresql://username:password@localhost:5432/database_name",
"readonly"
]
}
}
}
Note: Update the path in the configuration to point to the
index.jsfile inside yourbuildfolder.
Usage
- Copy the appropriate MCP configuration (read-only or write mode) to your tool’s
mcp.json(e.g., Cursor, Windsurf, Copilot, etc.). - Start your MCP client. The server is now ready to use!
Support
If you find this tool helpful, you can support the development by:
- Buying me a coffee at https://ko-fi.com/perrypixel
- UPI to kevinp@apl
관련 서버
Enhanced Medication Information MCP Server
Provides real-time access to FDA drug data, including shortages, labeling, and recalls, via the openFDA API.
CData SAP Hybris C4C
A read-only MCP server for querying live SAP Hybris C4C data, powered by the CData JDBC Driver.
Postgres MCP
A remote MCP server for Postgres, deployable on Cloudflare Workers without authentication.
MemoryMesh
A knowledge graph server for AI models, focusing on text-based RPGs and interactive storytelling.
Momento MCP Server
An MCP server providing a simple interface to Momento's serverless caching service.
Vertica MCP Server
Provides read-only access to Vertica databases.
OpenDart-MCP
Access the DART (Data Analysis, Retrieval and Transfer System) API for detailed financial information retrieval and analysis.
CData Cloudant MCP Server
A read-only MCP server by CData for querying live Cloudant data with LLMs. Requires the CData JDBC Driver for Cloudant.
Zurich Open Data MCP Server
Enables Claude, ChatGPT, and other MCP-compatible AI assistants to directly query 900+ datasets, geodata, parliamentary proceedings, tourism data, linked data, and real-time environmental and mobility information from the City of Zurich. 20 Tools, 6 Resources, 6 APIs.
Insights Knowledge Base
A free, plug-and-play knowledge base with over 10,000 built-in insight reports and support for parsing private documents.