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
관련 서버
mcp-parseable-server
MCP server for Parseable observability platform
Binance Cryptocurrency MCP
Access real-time Binance cryptocurrency market data, including prices, order books, and trading history.
Metabase Server
Integrate with Metabase to query databases and visualize data. Requires Metabase URL and API key for authentication.
MongoDB That Works
A MongoDB MCP server with schema discovery and field validation. Requires a MONGODB_URI environment variable.
Epicor Kinetic MCP Server by CData
A read-only MCP server by CData that enables LLMs to query live data from Epicor Kinetic.
Prometheus MCP Server
A Prometheus MCP server with full API support for comprehensive management and deep interaction with Prometheus beyond basic query support. Written in go, it is a single binary install that is capable of STDIO, SSE, and HTTP transports for complex deployments.
CData Connect Cloud
Query and manage data through CData Connect Cloud, providing a unified interface to various data sources.
Blockscout
Access blockchain data like balances, tokens, and NFTs from Blockscout APIs. Supports multi-chain and progress notifications.
Tigris Data
A serverless NoSQL database and search platform.
D&D 5E MCP Server
Access Dungeons & Dragons 5th Edition content, including spells, classes, and monsters, via the Open5e API.