MCP.so
登录
P

Postgresql MCP Server

@prasanna00019

基本信息

分类

数据库

传输方式

stdio

作者

prasanna00019

提交者

Prasanna H

关于 Postgresql MCP Server

## Overview

Postgresql MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "SchemaIntelligence": {
      "command": "C:\\Users\\user\\.local\\bin\\uv.EXE",
      "args": [
        "run",
        "--frozen",
        "--with",
        "mcp[cli]",
        "--with",
        "psycopg2",
        "--with",
        "ollama",
        "--with",
        "pymermaid",
        "--with",
        "requests",
        "--with",
        "pillow",
        "mcp",
        "run",
        "C:\\Users\\user\\Desktop\\MCP-ToolHub\\PostgreSQL-MCP\\postgresql_server.py"
      ],
      "env": {
        "DB_HOST": "localhost",
        "DB_PORT": "6739",
        "DB_NAME": "MCP",
        "DB_USER": "postgres",
        "DB_PASSWORD": "radha",
        "OLLAMA_BASE_URL": "http://192.168.1.143:11434",
        "OLLAMA_MODEL": "gpt-oss:120b-cloud",
        "DEBUG": "False"
      }
    }
  }
}

Postgresql MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Postgresql Mcp?

Postgresql Mcp is an MCP server that delivers intelligent analysis, documentation, and complete CRUD operations for PostgreSQL databases. It combines deterministic schema extraction with AI-powered reasoning and secure data manipulation, enabling users and AI agents to understand and interact with complex database structures.

How to use Postgresql Mcp?

The server exposes 27 tools covering all PostgreSQL operations. Use an MCP client (e.g., Claude Desktop) to connect and invoke tools for schema extraction, query analysis, data management, and monitoring.

Key features of Postgresql Mcp

  • Comprehensive Coverage: 27 tools for all PostgreSQL operations
  • Schema Extraction: Automatically extract tables, columns, and constraints
  • Intelligent Analysis: Detect junction tables and suggest optimal joins
  • AI-Powered Insights: Generate business explanations via Ollama/LLM
  • Complete CRUD Operations: With SQL injection prevention
  • Query Optimization: Execution plan and index analysis
  • Multiple Output Formats: Mermaid diagrams, SVG, PNG, PDF, Markdown

Use cases of Postgresql Mcp

  • Document an existing PostgreSQL database schema automatically
  • Optimize slow queries through execution plan and index analysis
  • Perform safe, parameterized data operations across tables
  • Monitor database statistics, cache metrics, and connection usage
  • Generate visual ER diagrams and relationship flowcharts

常见问题

1

How many tools does Postgresql Mcp provide?

The server started with 38 tools, was optimized to 19, and then extended to 27 high-value tools covering query optimization, data management, transactions, and monitoring.

2

What security measures are in place?

All CRUD operations use parameterized queries and input validation to prevent SQL injection.

3

Does Postgresql Mcp support transactions?

Yes, it supports atomic multi-operation transactions with rollback capabilities.

4

What output formats are available for diagrams?

Output includes Mermaid ER diagrams, relationship flowcharts, and rendered files in SVG, PNG, PDF, and Markdown.

5

How does AI-powered analysis work?

The server leverages Ollama or another LLM to generate business explanations and recommendations from database schemas and query results.

评论

数据库 分类下的更多 MCP 服务器