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
相關伺服器
bmdpat Agent Memory
Agent Memory as a Service with x402 USDC micropayments on Base blockchain — provides memory_store, memory_recall, memory_forget, and memory_stats tools.
FDA Data MCP
FDA-only compliance data MCP (recalls, warning letters, inspections, 483s, approvals, CFR parts).
Statsource
A server for statistical analysis, enabling LLMs to analyze data from various sources, calculate statistics, and generate predictions.
MCP ODBC Server
Access ODBC-accessible data sources using a configured Data Source Name (DSN).
mcp-database-server
Production-grade Model Context Protocol (MCP) server for unified SQL database access. Connect multiple databases through a single MCP server with schema discovery, relationship mapping, caching, and safety controls.
GraphMem
An MCP server for graph-based memory management, enabling AI to create, retrieve, and manage knowledge entities and their relationships.
Pinterest by CData
A read-only MCP server for querying live Pinterest data, powered by the CData JDBC Driver.
MySQL
MySQL database integration with configurable access controls and schema inspection
Turso Cloud
Integrate with Turso databases for LLMs, featuring a two-level authentication system for secure operations.
microCMS MCP Server
Interact with the microCMS headless CMS API, enabling AI assistants to manage content.