Go-MCP-Postgres is a ready-to-use MCP server for interacting with PostgreSQL databases, adapted from Zhwt's MySQL implementation. It provides tools for database schema management and CRUD operations with safety features like read-only mode and query plan validation. Written in Go with no external dependencies, it supports both stdio and SSE transport modes, includes multilingual support, and is particularly useful for database automation tasks without requiring Node.js or Python environments.
暂无评论. 成为第一个评论的人!
登录以参与讨论
Returns a list of matching database names. Parameters: None
Returns a list of matching table names. Parameters: name (optional string) - If provided, list tables with the specified name, otherwise, list all tables.
Creates a new table in the database. Parameters: query (string) - The SQL query to create the table. Returns: x rows affected.
Alters an existing table in the Postgres server. Parameters: query (string) - The SQL query to alter the table. Returns: x rows affected.
Describes the structure of a table. Parameters: name (string) - The name of the table to describe. Returns: The structure of the table.
Executes a read-only SQL query. Parameters: query (string) - The SQL query to execute. Returns: The result of the query.
Executes a write SQL query. Parameters: query (string) - The SQL query to execute. Returns: x rows affected, last insert id: <last_insert_id>.
Executes an update SQL query. Parameters: query (string) - The SQL query to execute. Returns: x rows affected.
Executes a delete SQL query. Parameters: query (string) - The SQL query to execute. Returns: x rows affected.
Queries the number of rows in a certain table. Parameters: name (string) - The name of the table to count. Returns: The row number of the table.