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
Serveurs connexes
Shibui Finance
Ask questions about 5,200+ US stocks in plain English. 64 years of prices, financials, technicals, and backtests.
Node MSSQL
A server for interacting with Microsoft SQL Server databases using the node-mssql library.
PostgreSQL
An MCP server for interacting with a PostgreSQL database.
MarkLogic MCP Server by CData
A read-only MCP server by CData for querying live MarkLogic data with LLMs. Requires a separate CData JDBC Driver.
Databricks MCP Server
Interact with Databricks Unity Catalog metadata to explore catalogs, schemas, tables, and execute SQL queries.
OpenDart-MCP
Access the DART (Data Analysis, Retrieval and Transfer System) API for detailed financial information retrieval and analysis.
PostgreSQL
Provides read-only access to PostgreSQL databases, allowing LLMs to inspect schemas and execute queries.
Sefaria Jewish Library MCP Server
Provides access to Jewish texts from the Sefaria library.
DeFi Rates
Real-time DeFi lending rates across 14+ protocols (Aave, Morpho, Spark, Compound, Venus, etc). Query borrow/supply rates, c ompare platforms, calculate looping strategies on 6 chains (Ethereum, Arbitrum, Base, BSC, Solana, HyperEVM).
StockFlow
Provides real-time stock data and options analysis from Yahoo Finance, enabling market data access, stock analysis, and options strategy evaluation.