PostgreSQL Database Management
STDIOMCP server that provides PostgreSQL database management capabilities and debugging assistance.
MCP server that provides PostgreSQL database management capabilities and debugging assistance.
A Model Context Protocol (MCP) server that provides PostgreSQL database management capabilities. This server assists with analyzing existing PostgreSQL setups, providing implementation guidance, and debugging database issues.
analyze_database
)Analyzes PostgreSQL database configuration and performance metrics:
// Example usage { "connectionString": "postgresql://user:password@localhost:5432/dbname", "analysisType": "performance" // Optional: "configuration" | "performance" | "security" }
get_setup_instructions
)Provides step-by-step PostgreSQL installation and configuration guidance:
// Example usage { "platform": "linux", // Required: "linux" | "macos" | "windows" "version": "15", // Optional: PostgreSQL version "useCase": "production" // Optional: "development" | "production" }
debug_database
)Debug common PostgreSQL issues:
// Example usage { "connectionString": "postgresql://user:password@localhost:5432/dbname", "issue": "performance", // Required: "connection" | "performance" | "locks" | "replication" "logLevel": "debug" // Optional: "info" | "debug" | "trace" }
To install PostgreSQL MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @nahmanmate/postgresql-mcp-server --client claude
npm install
npm run build
{ "mcpServers": { "postgresql-mcp": { "command": "node", "args": ["/path/to/postgresql-mcp-server/build/index.js"], "disabled": false, "alwaysAllow": [] } } }
npm run dev
- Start development server with hot reloadnpm run lint
- Run ESLintnpm test
- Run testsConnection Security
Query Safety
Authentication
The server implements comprehensive error handling:
The evals package loads an mcp client that then runs the index.ts file, so there is no need to rebuild between tests. You can see the full documentation here.
OPENAI_API_KEY=your-key npx mcp-eval src/evals/evals.ts src/index.ts
This project is licensed under the AGPLv3 License - see LICENSE file for details.