drio
Open app

PostgreSQL MCP Server

Source

Catalog onlyCatalog onlySTDIO

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, performance metrics, and security assessments. - Setup Instructions: Provides detailed installation and configuration guidance for PostgreSQL. - Database Debugging: Helps debug common PostgreSQL issues like connection problems and performance bottlenecks.
  1. Analyzing and optimizing PostgreSQL database performance.
  2. Guiding users through the installation and configuration of PostgreSQL on various platforms.
  3. 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": {
    "postgresql-mcp-server-nahmanmate": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgresql-mcp-server-nahmanmate"
      ]
    }
  }
}

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": {
    "postgresql-mcp-server-nahmanmate": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgresql-mcp-server-nahmanmate"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "postgresql-mcp-server-nahmanmate": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgresql-mcp-server-nahmanmate"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "postgresql-mcp-server-nahmanmate": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgresql-mcp-server-nahmanmate"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "postgresql-mcp-server-nahmanmate": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgresql-mcp-server-nahmanmate"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "postgresql-mcp-server-nahmanmate": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgresql-mcp-server-nahmanmate"
      ]
    }
  }
}

FAQ

**What platforms does PostgreSQL MCP Server support?**

It supports Linux, macOS, and Windows platforms for installation.

**What are the prerequisites for using this server?**

You need Node.js >= 18.0.0 and access to a PostgreSQL server for database operations.

**Is there a license for this project?**

Yes, it is licensed under the AGPLv3 License.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":1542,"uuid":"7a3d759a-b945-4fb0-8444-c61e844a199c","name":"postgresql-mcp-server","title":"PostgreSQL MCP Server","description":"","avatar_url":"https://avatars.githubusercontent.com/u/192176108?v=4","created_at":"2025-02-20T16:20:54.358Z","updated_at":"2025-02-23T07:22:06.967Z","status":"created","author_name":"nahmanmate","author_avatar_url":"https://avatars.githubusercontent.com/u/192176108?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/nahmanmate/postgresql-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":"https://camo.githubusercontent.com/f137a74aa3e3abeac1cb3c486d9c74be68de6901e3cd5dc3d381711b8b940650/68747470733a2f2f736d6974686572792e61692f62616467652f406e61686d616e6d6174652f706f737467726573716c2d6d63702d736572766572","type":null,"metadata":"{\"star\":\"11\",\"license\":\"AGPL-3.0 license\",\"language\":\"TypeScript\",\"is_official\":false,\"latest_commit_time\":\"2025-05-01 10:23:57\"}","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"}]]}]