# Postgres Mcp Go

> A PostgreSQL MCP (Model Context Protocol) server implementation in Go that provides secure database access for AI agents.

- **Type:** MCP server
- **Install:** `agentstack add mcp-tendant-postgres-mcp-go`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [tendant](https://agentstack.voostack.com/s/tendant)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [tendant](https://github.com/tendant)
- **Source:** https://github.com/tendant/postgres-mcp-go

## Install

```sh
agentstack add mcp-tendant-postgres-mcp-go
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# postgres-mcp-go

A PostgreSQL MCP (Model Context Protocol) server implementation in Go that provides secure database access for AI agents.

## Features

- **Multiple modes**: stdio and HTTP server
- **Security**: Read-only mode support, query validation
- **Connection pooling**: Efficient PostgreSQL connection management
- **Configurable limits**: Row limits, timeouts, request size controls

## Quick Start

```bash
# Build
make build

# Run in stdio mode (for AI agents)
DATABASE_URL="postgres://user:pass@host/db" make run-stdio

# Run HTTP server
DATABASE_URL="postgres://user:pass@host/db" make run-http
```

## Usage

```bash
# Basic usage
./bin/postgres-mcp --database-url "postgres://user:pass@host/db"

# Read-only mode (recommended)
./bin/postgres-mcp --database-url "postgres://user:pass@host/db" --readonly

# HTTP mode
./bin/postgres-mcp --mode http --listen :8080 --database-url "postgres://user:pass@host/db"
```

## Configuration

- `--mode`: `stdio` (default) or `http`
- `--database-url`: PostgreSQL connection string
- `--readonly`: Reject mutating SQL statements
- `--max-rows`: Limit rows returned per query
- `--timeout`: Per-request timeout
- `--listen`: HTTP listen address (HTTP mode)

## Requirements

- Go 1.23.3+
- PostgreSQL database

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [tendant](https://github.com/tendant)
- **Source:** [tendant/postgres-mcp-go](https://github.com/tendant/postgres-mcp-go)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-tendant-postgres-mcp-go
- Seller: https://agentstack.voostack.com/s/tendant
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
