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
Máy chủ liên quan
MongoDB Movie Database FastMCP Tools
A server for querying and analyzing the MongoDB sample_mflix movie database.
Talk with Your Database
Interact with PostgreSQL, MySQL, MariaDB, and SQLite databases using SQLAlchemy.
Apple Health Data with Elasticsearch
A Python-based MCP server that connects to an Elasticsearch index with Apple HealthKit data.
Chroma
Embeddings, vector search, document storage, and full-text search with the open-source AI application database
Claude Conversation Memory System
Provides searchable local storage for Claude conversation history, enabling context retrieval during sessions.
Metabase MCP Server
Integrates AI assistants with the Metabase analytics platform.
College Football Data
Access college football statistics from the College Football Data API.
Elasticsearch
Connect to and interact with an Elasticsearch cluster directly from any MCP client using environment variables for configuration.
Dremio
Integrate Large Language Models (LLMs) with the Dremio data lakehouse platform.
MCP Qdrant Codebase Embeddings
Uses Qdrant vector embeddings to understand semantic relationships in codebases.