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
相关服务器
MemoryMesh
A knowledge graph server for AI models, focusing on text-based RPGs and interactive storytelling.
Pinecone
Connect AI tools with Pinecone projects to search, configure indexes, generate code, and manage data.
Unofficial ChEMBL MCP Server
Access the ChEMBL chemical database for drug discovery, chemical informatics, and bioactivity research using specialized tools via its REST API.
IQ.wiki
Access data and information from IQ.wiki, the world's largest crypto and blockchain encyclopedia.
LoL Data MCP Server
Provides real-time, structured access to League of Legends game data, including champions, items, abilities, game mechanics, and patch information.
Act-On MCP Server by CData
A read-only MCP server that enables LLMs to query live Act-On data. Requires a separate CData JDBC Driver for Act-On.
Google Analytics MCP Server by CData
A read-only MCP server for querying live Google Analytics data using LLMs. Powered by CData.
MLB SportRadar
Access MLB game data, standings, and player statistics using the SportRadar API.
Elasticsearch/OpenSearch
An MCP Server for interacting with Elasticsearch and OpenSearch clusters.
Airtable
Interact with Airtable's API to manage bases, tables, and records.