Skip to content
Back to search

pgedge-postgres-mcp

pgEdge MCP Server. A PostgreSQL MCP server with a Natural Language Agent CLI and Web UI.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/pgEdge/pgedge-postgres-mcp with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/pgEdge/pgedge-postgres-mcp'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/pgedge--pgedge-postgres-mcp/badge.svg)](/listings/pgedge--pgedge-postgres-mcp)

HTML

<a href="/listings/pgedge--pgedge-postgres-mcp"><img src="/api/listings/pgedge--pgedge-postgres-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

The project uses golangci-lint v1.x. Install it with:

go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

Note: The configuration file [`.golangci.yml`](.golangci.yml) is compatible with golangci-lint v1.x (not v2).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 231 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # pgEdge Postgres MCP Server and Natural Language Agent
  2. [![CI - MCP Server](https://github.com/pgEdge/pgedge-postgres-mcp/actions/workflows/ci-server.yml/badge.svg?branch=main)](https://github.com/pgEdge/pgedge-postgres-mcp/actions/workflows/ci-server.yml?query=branch%3Amain)
  3. [![CI - CLI Client](https://github.com/pgEdge/pgedge-postgres-mcp/actions/workflows/ci-cli-client.yml/badge.svg?branch=main)](https://github.com/pgEdge/pgedge-postgres-mcp/actions/workflows/ci-cli-client.yml?query=branch%3Amain)
  4. [![CI - Web Client](https://github.com/pgEdge/pgedge-postgres-mcp/actions/workflows/ci-web-client.yml/badge.svg?branch=main)](https://github.com/pgEdge/pgedge-postgres-mcp/actions/workflows/ci-web-client.yml?query=branch%3Amain)
  5. [![CI - Docker](https://github.com/pgEdge/pgedge-postgres-mcp/actions/workflows/ci-docker.yml/badge.svg?branch=main)](https://github.com/pgEdge/pgedge-postgres-mcp/actions/workflows/ci-docker.yml?query=branch%3Amain)
  6. [![CI - Documentation](https://github.com/pgEdge/pgedge-postgres-mcp/actions/workflows/ci-docs.yml/badge.svg?branch=main)](https://github.com/pgEdge/pgedge-postgres-mcp/actions/workflows/ci-docs.yml?query=branch%3Amain)
  7. - About the pgEdge Postgres MCP Server
  8. - [pgEdge Postgres MCP Server](docs/index.md)
  9. - [Choosing the Right Solution](docs/guide/mcp-vs-rag.md)
  10. - [Best Practices - Querying the Server](docs/guide/querying.md)
  11. - Installing the MCP Server
  12. - [Quick Start](docs/guide/quickstart.md)
  13. - [Quickstart Demo with Northwind](docs/guide/quickstart_demo.md)
  14. - [Deploying on Docker](docs/guide/deploy_docker.md)
  15. - [Deploying from Source](docs/guide/deploy_source.md)
  16. - [Testing the MCP Server Deployment](docs/guide/test_server.md)
  17. - Configuring the MCP Server
  18. - [Specifying Configuration Preferences](docs/guide/configuration.md)
  19. - [Using Environment Variables to Specify Options](docs/guide/env_variable_config.md)
  20. - [Including Provider Embeddings in a Configuration File](docs/guide/provider_config.md)
  21. - [Configuring the Agent for Multiple Databases](docs/guide/multiple_db_config.md)
  22. - [Configuring Supporting Services; HTTP, systemd, and nginx](docs/guide/services_config.md)
  23. - [Using an Encryption Secret File](docs/guide/encryption_secret.md)
  24. - [Enabling or Disabling Features](docs/guide/feature_config.md)
  25. - Configuring and Using a Client Application
  26. - [Connecting with the Web Client](docs/guide/web-client.md)
  27. - [Using the Go Chat Client](docs/guide/cli-client.md)
  28. - [Configuring the Server for use with Claude Desktop](docs/guide/claude_desktop.md)
  29. - [Configuring the Server for use with Cursor](docs/guide/cursor.md)
  30. - [Reviewing Server Logs](docs/guide/server_logs.md)
  31. - Authentication and Security
  32. - [Authentication - Overview](docs/guide/authentication.md)
  33. - [Authentication - User Management](docs/guide/auth_user.md)
  34. - [Authentication - OAuth](docs/guide/auth_oauth.md)
  35. - [Authentication - Token Management](docs/guide/auth_token.md)
  36. - [Security Checklist](docs/guide/security.md)
  37. - [Security Management](docs/guide/security_mgmt.md)
  38. - Reference
  39. - [Using MCP Tools](docs/reference/tools.md)
  40. - [Using MCP Resources](docs/reference/resources.md)
  41. - [Using MCP Prompts](docs/reference/prompts.md)
  42. - [Error Reference](docs/reference/error-reference.md)
  43. - [Server Configuration File](docs/reference/config-examples/server.md)
  44. - [API Token Configuration File](docs/reference/config-examples/tokens.md)
  45. - [CLI Client Configuration Details](docs/reference/config-examples/cli-client.md)
  46. - Advanced Topics
  47. - [Creating Custom Definitions](docs/advanced/custom-definitions.md)
  48. - [Configuring and Using Knowledgebase Search](docs/advanced/knowledgebase.md)
  49. - [Using the LLM Proxy](docs/advanced/llm-proxy.md)
  50. - [Row-Level and Column-Level Security](docs/advanced/row-level-security.md)
  51. - [Distributed Deployment](docs/advanced/distributed-deployment.md)
  52. - For Developers
  53. - [For Developers - Overview](docs/developers/overview.md)
  54. - [MCP Protocol](docs/developers/mcp-protocol.md)
  55. - [API Reference](docs/developers/api-reference.md)
  56. - [API Browser](docs/api/browser.md)
  57. - [Client Examples](docs/developers/client-examples.md)
  58. - Building Chat Clients
  59. - [Overview](docs/developers/building-chat-clients.md)
  60. - [Python (Stdio + Claude)](docs/developers/stdio-anthropic-chatbot.md)
  61. - [Python (HTTP + Ollama)](docs/developers/http-ollama-chatbot.md)
  62. - Contributing
  63. - [Development Setup](docs/contributing/development.md)
  64. - [Architecture](docs/contributing/architecture.md)
  65. - [Internal Architecture](docs/contributing/internal-architecture.md)
  66. - [Testing](docs/contributing/testing.md)
  67. - [CI/CD](docs/contributing/ci-cd.md)
  68. - [Accessing Online Help](docs/guide/help.md)
  69. - [Troubleshooting](docs/guide/troubleshooting.md)
  70. - [Release Notes](docs/changelog.md)
  71. - [Licence](docs/LICENSE.md)
  72. The pgEdge Postgres Model Context Protocol (MCP) server enables
  73. SQL queries against PostgreSQL databases through MCP-compatible
  74. clients. The Natural Language Agent provides supporting
  75. functionality that allows you to use natural language to form
  76. SQL queries.
  77. > **Supported Versions:** PostgreSQL 14 and higher.
  78. > **NOT FOR PUBLIC-FACING APPLICATIONS**: This MCP server provides
  79. > LLMs with read access to your entire database schema and data.
  80. > It should only be used for internal tools, developer workflows,
  81. > or environments where all users are trusted. For public-facing
  82. > applications, consider the
  83. > [pgEdge RAG Server](https://github.com/pgedge/pgedge-rag-server)
  84. > instead. See the
  85. > [Choosing the Right Solution](docs/guide/mcp-vs-rag.md) guide
  86. > for details.
  87. ## Quick Start
  88. The [Quick Start](docs/guide/quickstart.md) guide covers
  89. installation and setup for all supported clients:
  90. | Client | Transport | Best For |
  91. |--------|-----------|----------|
  92. | CLI (Stdio) | Stdio | Local single-user development |
  93. | CLI (HTTP) | HTTP | Multi-user or remote access |
  94. | Web UI | HTTP | Browser-based chat interface |
  95. | Claude Code | Stdio | Anthropic CLI agent |
  96. | Claude Desktop | Stdio | Anthropic desktop app |
  97. | Cursor | Stdio | AI code editor |
  98. | Windsurf | Stdio | Codeium code editor |
  99. | VS Code Copilot | Stdio | GitHub Copilot agent |
  100. For a guided demo with sample data, see the
  101. [Quickstart Demo with Northwind](docs/guide/quickstart_demo.md).
  102. ## Key Features
  103. - **Read-Only Protection** - All queries run in read-only
  104. transactions by default
  105. - **Resources** - Access PostgreSQL statistics and more
  106. - **Tools** - Query execution, schema analysis, advanced hybrid
  107. search (BM25+MMR), embedding generation, resource reading,
  108. and more
  109. - **Prompts** - Guided workflows for semantic search setup,
  110. database exploration, query diagnostics, and more
  111. - **Production Chat Client** - Full-featured Go client with
  112. Anthropic prompt caching (90% cost reduction)
  113. - **HTTP/HTTPS Mode** - Direct API access with user and token
  114. authentication
  115. - **Web Interface** - Modern React-based UI with AI-powered chat
  116. for natural language database interaction
  117. - **Docker Support** - Pre-built images on
  118. [GitHub Container Registry](https://github.com/orgs/pgEdge/packages?repo_name=pgedge-postgres-mcp)
  119. with Docker Compose deployment
  120. - **Secure** - TLS support, user and token auth, read-only
  121. enforcement
  122. - **Hot Reload** - Automatic reload of authentication files
  123. without server restart
  124. ## Development
  125. ### Prerequisites
  126. - Go 1.26.11 or higher
  127. - PostgreSQL 14 or higher (for testing)
  128. - golangci-lint v1.x (for linting)
  129. ### Setup Linter
  130. The project uses golangci-lint v1.x. Install it with:
  131. ```bash
  132. go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
  133. ```
  134. Note: The configuration file [`.golangci.yml`](.golangci.yml)
  135. is compatible with golangci-lint v1.x (not v2).
  136. ### Building
  137. ```bash
  138. git clone https://github.com/pgEdge/pgedge-postgres-mcp.git
  139. cd pgedge-postgres-mcp
  140. make build
  141. ```
  142. ### Testing
  143. ```bash
  144. # Run all tests
  145. make test
  146. # Run server tests with a database
  147. export TEST_PGEDGE_POSTGRES_CONNECTION_STRING=\
  148. "postgres://localhost/postgres?sslmode=disable"
  149. go test ./...
  150. # Run with coverage
  151. go test -v -cover ./...
  152. # Run linting
  153. make lint
  154. ```
  155. #### Web UI Tests
  156. The web UI has a comprehensive test suite. See
  157. [web/TEST_SUMMARY.md](web/TEST_SUMMARY.md) for details.
  158. ```bash
  159. cd web
  160. npm test # Run all tests
  161. npm run test:watch # Watch mode
  162. npm run test:coverage # With coverage
  163. ```
  164. ## Security
  165. - Read-only transaction enforcement (configurable per database)
  166. - User and API token authentication with expiration
  167. - TLS/HTTPS support
  168. - SHA256 token hashing
  169. - File permission enforcement (0600)
  170. - Input validation and sanitization
  171. See the [Security Guide](docs/guide/security.md) for
  172. comprehensive security documentation.
  173. ## Troubleshooting
  174. **Tools not visible in Claude Desktop?**
  175. - Use absolute paths in config
  176. - Restart Claude Desktop completely
  177. - Check JSON syntax
  178. **Database connection errors?**
  179. - Ensure database connection is configured before starting the
  180. server (via config file, environment variables, or
  181. command-line flags)
  182. - Verify PostgreSQL is running: `pg_isready`
  183. - Check connection parameters are correct
  184. See the [Troubleshooting Guide](docs/guide/troubleshooting.md)
  185. for detailed solutions.
  186. ## Support
  187. To report an issue with the software, visit:
  188. [GitHub Issues](https://github.com/pgEdge/pgedge-postgres-mcp/issues)
  189. For more information, visit
  190. [docs.pgedge.com](https://docs.pgedge.com)
  191. This project is licensed under the
  192. [PostgreSQL License](LICENSE.md).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.