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
相關伺服器
libSQL by xexr
MCP server for libSQL databases with comprehensive security and management tools. Supports file, local HTTP, and remote Turso databases with connection pooling, transaction support, and 6 specialized database tools.
Odoo Accounting MCP Server
Integrates with Odoo Accounting via XML-RPC, allowing AI tools to query and analyze account journal entries for auditing purposes.
Seq MCP Server
Search and stream events from a Seq server.
PostgreSQL MCP Server
A server for managing PostgreSQL databases, enabling comprehensive database operations.
Cursor10x MCP
A memory system for the Cursor code editor, providing persistent context awareness for Claude via a Turso database.
DICOM MCP Server
Enables AI assistants to query, read, and move data on DICOM servers such as PACS and VNA for medical imaging.
MCP Database Server
Provides database access for SQLite, SQL Server, PostgreSQL, and MySQL.
Canada's Food Guide
A nutrition analysis platform integrating Canada's Food Guide recipes with Health Canada's official nutrition databases.
CData SAP ByDesign
A read-only MCP server for querying live SAP ByDesign data. Requires a separate CData JDBC Driver for SAP ByDesign.
Acumatica MCP Server by CData
A read-only MCP server for querying live Acumatica data using the CData JDBC Driver.