go-mcp-postgresServer

guoling2008
GitHub
PostgreSQLMCPCRUD Operations

Loading subscription status...

πŸ’‘ Description

go-mcp-postgres is designed to interact with Postgres databases, providing a streamlined Model Context Protocol (MCP) server for performing CRUD operations and automation without the need for Node.js or Python environments. It includes tools for schema management and SQL query execution with safeguards against unexpected writes.

πŸ“ JSON Entries

{
  "mcpServers": [
    {
      "postgres": {
        "args": [
          "--dsn",
          "postgresql://user:pass@host:port/db"
        ],
        "command": "go-mcp-postgres"
      }
    }
  ]
}

πŸ› οΈ Tools

list_databaselist_tablecreate_tablealter_tabledesc_tableread_querywrite_queryupdate_querydelete_querycount_query

⚑ Features

  • CRUD operations on PostgreSQL
  • Schema management tools
  • Read-only mode
  • Language support

πŸ’¬ Example Queries

  • List all databases
  • Show structure of a specific table
  • Create a new table in the database
  • Execute a read-only SQL query
  • Count the number of rows in a specific table