drio
Open app

PostgreSQL MCP Server

Source

This repo is an extension of PostgreSQL MCP Server providing functionalities to create tables, insert entries, update entries, delete entries, and drop tables.

Catalog onlyCatalog onlySTDIO

Overview

PostgreSQL MCP Server is an extension that allows Large Language Models (LLMs) to interact with PostgreSQL databases, enabling CRUD (Create, Read, Update, Delete) operations on database entries.

To use the server, install Docker, clone the repository, run the PostgreSQL Docker container, and connect it with the Claude Desktop app by updating the configuration file.

  • Create, insert, update, delete, and drop tables dynamically. - Execute read-only SQL queries against the connected database. - Provides schema information for each table in JSON format.
  1. Creating and managing database schemas dynamically.
  2. Performing complex queries and data manipulations through LLMs.
  3. Integrating with applications that require database interactions.

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": {
    "ai-agents-mcp-pg-vignesh-codes": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-ai-agents-mcp-pg-vignesh-codes"
      ]
    }
  }
}

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": {
    "ai-agents-mcp-pg-vignesh-codes": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-ai-agents-mcp-pg-vignesh-codes"
      ]
    }
  }
}

Claude Code

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

.mcp.json (project root)

{
  "mcpServers": {
    "ai-agents-mcp-pg-vignesh-codes": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-ai-agents-mcp-pg-vignesh-codes"
      ]
    }
  }
}

VS Code (Copilot)

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

.vscode/mcp.json

{
  "servers": {
    "ai-agents-mcp-pg-vignesh-codes": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-ai-agents-mcp-pg-vignesh-codes"
      ]
    }
  }
}

Windsurf

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

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "ai-agents-mcp-pg-vignesh-codes": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-ai-agents-mcp-pg-vignesh-codes"
      ]
    }
  }
}

Cline

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

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "ai-agents-mcp-pg-vignesh-codes": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-ai-agents-mcp-pg-vignesh-codes"
      ]
    }
  }
}

FAQ

Can I use this server with any PostgreSQL database?

Yes! It is designed to work with any PostgreSQL database.

Is there a limit to the number of tables I can create?

No, you can create as many tables as your database can handle.

What happens if I delete a table?

The table and all its data will be permanently removed from the database.