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:
This project is licensed under the AGPLv3 License - see LICENSE file for details.
{
"mcpServers": {
"postgresql-mcp": {
"env": {},
"args": [
"/path/to/postgresql-mcp-server/build/index.js"
],
"command": "node"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.