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
Server Terkait
FinDataMCP
Provides financial data. Requires external Python dependencies installed with the uv package manager.
DeepMemory
DeepMemory MCP is a small Model Context Protocol (MCP) server that provides long-term memory storage for conversational agents.
CData WooCommerce
A read-only MCP server for querying live WooCommerce data using the CData JDBC Driver.
Grist
Integrate with the Grist API to manage relational spreadsheets and data. Requires a Grist API key.
MySQL
A server for managing MySQL databases.
Verodat
Interact with Verodat AI Ready Data platform
AITable
Provides read and write access to AITable.ai, a collaborative database and spreadsheet platform.
GraphMem
An MCP server for graph-based memory management, enabling AI to create, retrieve, and manage knowledge entities and their relationships.
Coresignal
Access comprehensive B2B data on companies, employees, and job postings for your LLMs and AI workflows.
MCP Vertica
A server for managing and querying Vertica databases, including connection, schema, and security management.