Back to Home
trangpl193 icon

strange-mcp-postgres

Verified Safe

by trangpl193

Overview

Provides a Model Context Protocol (MCP) interface for performing PostgreSQL database operations, enabling AI models or other systems to interact with a database via an HTTP API.

Installation

Run Command
npx mcp-postgres

Environment Variables

  • DB_HOST
  • DB_PORT
  • DB_NAME
  • DB_USER
  • DB_PASSWORD
  • MCP_API_KEY
  • MCP_PORT

Security Notes

The server uses parameterized queries ($1, $2, etc.) for all database operations (SELECT, INSERT, UPDATE, DELETE, transactions, schema introspection), which is a robust defense against SQL injection. Configuration, including database credentials and API keys, is loaded from environment variables or passed programmatically, avoiding hardcoded secrets. API key authentication is implemented to control access to the server's endpoints. No 'eval' or other direct dynamic code execution from user input is apparent in the provided source code.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassMedium
Avg Tokens500
Stars0
Forks0
Last Update2026-01-19

Tags

PostgreSQLDatabaseAPISQLMCP