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
Похожие серверы
Trino MCP Server
A Go implementation of a Model Context Protocol (MCP) server for Trino, enabling LLM models to query distributed SQL databases through standardized tools.
Gunsnation MCP
MCP server that gives assistants real-time access to the Gunsnation firearms catalog
Open Formula 1 MCP Server
MCP Server to retrieve and analyze Formula 1 (F1) races, cars, drivers, lap, pit stops and more.
Library MCP
A local server to query and interact with Markdown knowledge bases by tags, text, slug, or date.
STRING-MCP
Interact with the STRING protein-protein interaction database API.
Pylar
Build custom MCP tools on any datasource and ship them to any agent builder from one control plane—using only SQL and a secure link.
SQLAlchemy ODBC
An MCP server for connecting to any ODBC-compliant database via SQLAlchemy, supporting various DBMS backends.
Claude Conversation Memory System
Provides searchable local storage for Claude conversation history, enabling context retrieval during sessions.
Metabase MCP Server
Interact with Metabase, the open-source business intelligence platform, using Large Language Models.
OpenDart-MCP
Access the DART (Data Analysis, Retrieval and Transfer System) API for detailed financial information retrieval and analysis.