postgres-mcp-server

lioarce01/postgres-mcp-server

3.1

If you are the rightful owner of postgres-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This project implements an MCP server for interacting with a PostgreSQL database using LLMs, allowing structured access and manipulation through natural language.

The Postgres MCP Server is designed to facilitate seamless interaction between language models and PostgreSQL databases. By leveraging the Model-Context-Protocol (MCP) framework, this server enables natural language processing capabilities to access and manipulate database content efficiently. Built with TypeScript and Node.js, the server ensures a robust and scalable solution for developers looking to integrate language models with database operations. The use of Docker for containerization allows for easy deployment and management across different environments. This project is particularly useful for applications that require dynamic database interactions driven by natural language inputs, such as chatbots, virtual assistants, and automated reporting tools. The server's architecture supports a lightweight and efficient operation, making it suitable for both development and production environments.

Features

  • Expose a PostgreSQL interface to LLMs
  • Built with TypeScript and Node.js
  • Lightweight Docker image using multi-stage builds
  • Facilitates natural language interaction with databases
  • Supports easy deployment and management with Docker

Usages

docker with LLM Agent

{
  "mcpServers": {
    "postgres": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "postgres-mcp",
        "postgresql://username:password@host.docker.internal:5432/mydb"
      ]
    }
  }
}