Overview
PostgreSQL MCP Server is a Model Context Protocol (MCP) server designed to provide PostgreSQL database management capabilities, assisting users in analyzing existing PostgreSQL setups, offering implementation guidance, and debugging database issues.
To use the PostgreSQL MCP Server, clone the repository, install the dependencies, build the server, and configure it in your MCP settings file. You can then utilize its features for database analysis, setup instructions, and debugging.
- Database Analysis: Analyze PostgreSQL configurations and performance metrics. - Setup Instructions: Provides step-by-step installation and configuration guidance. - Database Debugging: Debug common PostgreSQL issues like connection problems and performance bottlenecks.
- Analyzing and optimizing PostgreSQL database performance.
- Guiding users through the installation and configuration of PostgreSQL.
- Debugging and resolving common database issues in production environments.
Add to your AI client
Use these steps to connect PostgreSQL MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"nahmanmate-postgresql-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-nahmanmate-postgresql-mcp-server-mcp-mirror"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"nahmanmate-postgresql-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-nahmanmate-postgresql-mcp-server-mcp-mirror"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"nahmanmate-postgresql-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-nahmanmate-postgresql-mcp-server-mcp-mirror"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"nahmanmate-postgresql-mcp-server-mcp-mirror": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-nahmanmate-postgresql-mcp-server-mcp-mirror"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"nahmanmate-postgresql-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-nahmanmate-postgresql-mcp-server-mcp-mirror"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"nahmanmate-postgresql-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-nahmanmate-postgresql-mcp-server-mcp-mirror"
]
}
}
}FAQ
**What are the prerequisites for using the server?**
You need Node.js >= 18.0.0, a PostgreSQL server, and network access to the target PostgreSQL instances.
**Is there a specific PostgreSQL version required?**
The server supports various PostgreSQL versions, but it's recommended to use the latest stable version for optimal performance.
**How can I contribute to the project?**
You can contribute by forking the repository, creating a feature branch, committing your changes, and submitting a Pull Request.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":1327,"uuid":"2f77cb92-bf7b-404d-8537-59084c951f08","name":"nahmanmate_postgresql-mcp-server","title":"PostgreSQL MCP Server","description":"Mirror of","avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","created_at":"2025-02-20T15:12:43.578+00:00","updated_at":"2025-02-23T07:12:22.8+00:00","status":"created","author_name":"MCP-Mirror","author_avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","tags":"postgresql,database-management,mcp-server","category":"databases","is_featured":false,"sort":1,"url":"https://github.com/MCP-Mirror/nahmanmate_postgresql-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":null,"user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]