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
İlgili Sunucular
Token Metrics
Token Metrics integration for fetching real-time crypto market data, trading signals, price predictions, and advanced analytics.
MCP Database Server
Provides database access for SQLite, SQL Server, PostgreSQL, and MySQL.
CData Tableau CRM Analytics Server
A read-only MCP server for querying live Tableau CRM Analytics data using the CData JDBC Driver.
Data.gov.il
Access Israeli Government Open Data from the data.gov.il portal.
Google Directory by CData
A read-only MCP server for querying live Google Directory data using the CData JDBC Driver.
Tabular MCP Server
An MCP server for local Tabular Models like PowerBI. It allows LLM clients to debug, analyze, and compose DAX queries by connecting to a local Tabular model instance.
PostgreSQL Full Access MCP Server
A full-access PostgreSQL server for MCP with read/write capabilities and enhanced schema metadata.
Data Pilot (Snowflake)
A comprehensive Model Context Protocol (MCP) server for interacting with Snowflake using natural language and AI.
GraphRAG
Query a hybrid graph (Neo4j) and vector (Qdrant) database for powerful semantic and graph-based document retrieval.
Mongo
A Model Context Protocol (MCP) server that enables LLMs to interact directly with MongoDB databases