go-mcp-postgres
@guoling2008
About go-mcp-postgres
Zero burden, ready-to-use Model Context Protocol (MCP) server for interacting with postgresql and automation with sse / stdio mode and i18n support
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"postgres": {
"command": "go-mcp-postgres",
"args": [
"--dsn",
"postgresql://user:pass@host:port/db"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is go-mcp-postgres?
go-mcp-postgres is a lightweight, standalone Model Context Protocol (MCP) server for interacting with PostgreSQL databases. It requires no Node.js or Python runtime and provides tools for CRUD operations, schema management, and read-only queries. It is intended for developers and AI agents who need zero‑burden database automation.
How to use go-mcp-postgres?
Download the latest binary from the releases page or install via go install -v github.com/guoling2008/go-mcp-postgres@latest. Configure it in your MCP client using the --dsn flag for stdio mode, or use --t sse --ip <ip> --port <port> for SSE mode. Optional flags include --read-only (disables write tools) and --with-explain-check (forces EXPLAIN before every query).
Key features of go-mcp-postgres
- Single binary, no Node.js or Python required
- Full CRUD operations on PostgreSQL databases and tables
- Read‑only mode to prevent accidental writes
- Optional EXPLAIN‑based query plan check
- Multi‑language support (en/zh‑CN via
--lang) - Schema tools: list databases, tables, describe, create, alter
Use cases of go-mcp-postgres
- AI‑assisted database schema exploration and management
- Automating read‑only data extraction and reporting
- Safe database administration with read‑only mode enabled
- Multi‑language environments needing English or Chinese tool descriptions
FAQ from go-mcp-postgres
Does go-mcp-postgres need Node.js or Python?
No. It is a standalone Go binary with no external runtime dependencies.
What is the difference between stdio and SSE modes?
Stdio mode is the default, suitable for local MCP integrations. SSE mode (--t sse) listens on a specified IP and port for remote connections.
How does the EXPLAIN check work?
By default, every write query is preceded by an EXPLAIN statement to verify the query plan matches expected patterns. Use --with-explain-check to disable this behavior.
Can I use go-mcp-postgres in a production environment?
The README notes this is a work in progress and may not yet be ready for production use.
What languages are supported?
Currently English (en) and Chinese (zh‑CN) are built‑in. Custom language files can be added in the locales folder.
Frequently asked questions
Does go-mcp-postgres need Node.js or Python?
No. It is a standalone Go binary with no external runtime dependencies.
What is the difference between stdio and SSE modes?
Stdio mode is the default, suitable for local MCP integrations. SSE mode (`--t sse`) listens on a specified IP and port for remote connections.
How does the EXPLAIN check work?
By default, every write query is preceded by an `EXPLAIN` statement to verify the query plan matches expected patterns. Use `--with-explain-check` to disable this behavior.
Can I use go-mcp-postgres in a production environment?
The README notes this is a work in progress and may not yet be ready for production use.
What languages are supported?
Currently English (en) and Chinese (zh‑CN) are built‑in. Custom language files can be added in the locales folder.
Basic information
More Databases MCP servers
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
MongoDB Lens
furey🍃🔎 MongoDB Lens: Full Featured MCP Server for MongoDB Databases
MCP MongoDB Server
kiliczshA Model Context Protocol Server for MongoDB
Multi Database MCP Server
FreePeakA powerful multi-database server implementing the Model Context Protocol (MCP) to provide AI assistants with structured access to databases.
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Comments