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
Servidores relacionados
Unity Catalog MCP Server
An MCP server that allows LLM agents to seamlessly execute functions within Unity Catalog.
MySQL MCP Server
A MySQL database server for AI assistants, enabling full CRUD operations, transaction management, and intelligent rollback.
Financial Datasets
Stock market API made for AI agents
MCP Memory Dashboard
A desktop application for managing and interacting with the MCP Memory Service, a semantic memory system built on the Model Context Protocol.
SurveyMonkey by CData
A read-only MCP server for querying live SurveyMonkey data, powered by CData.
Supabase MCP Server
An MCP server providing administrative control over a Supabase PostgreSQL database, compatible with Cursor's Composer and Codeium's Cascade.
Snowflake Cortex
An experimental MCP server to access Snowflake Cortex insights from your development environment.
CData AlloyDB MCP Server
A read-only MCP server for AlloyDB, enabling LLMs to query live data directly from AlloyDB databases.
Eugene Intelligence
Financial data for AI agents. SEC XBRL fundamentals, insider trades, 13F holdings, treasury yields. Source-traced.
GeoServer MCP Server
Connects Large Language Models to the GeoServer REST API, enabling AI assistants to interact with geospatial data and services.