{
  "markdown": "# pgEdge Postgres MCP Server and Natural Language Agent\n\n[![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)\n[![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)\n[![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)\n[![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)\n[![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)\n\n- About the pgEdge Postgres MCP Server\n    - [pgEdge Postgres MCP Server](docs/index.md)\n    - [Choosing the Right Solution](docs/guide/mcp-vs-rag.md)\n    - [Best Practices - Querying the Server](docs/guide/querying.md)\n- Installing the MCP Server\n    - [Quick Start](docs/guide/quickstart.md)\n    - [Quickstart Demo with Northwind](docs/guide/quickstart_demo.md)\n    - [Deploying on Docker](docs/guide/deploy_docker.md)\n    - [Deploying from Source](docs/guide/deploy_source.md)\n    - [Testing the MCP Server Deployment](docs/guide/test_server.md)\n- Configuring the MCP Server\n    - [Specifying Configuration Preferences](docs/guide/configuration.md)\n    - [Using Environment Variables to Specify Options](docs/guide/env_variable_config.md)\n    - [Including Provider Embeddings in a Configuration File](docs/guide/provider_config.md)\n    - [Configuring the Agent for Multiple Databases](docs/guide/multiple_db_config.md)\n    - [Configuring Supporting Services; HTTP, systemd, and nginx](docs/guide/services_config.md)\n    - [Using an Encryption Secret File](docs/guide/encryption_secret.md)\n    - [Enabling or Disabling Features](docs/guide/feature_config.md)\n- Configuring and Using a Client Application\n    - [Connecting with the Web Client](docs/guide/web-client.md)\n    - [Using the Go Chat Client](docs/guide/cli-client.md)\n    - [Configuring the Server for use with Claude Desktop](docs/guide/claude_desktop.md)\n    - [Configuring the Server for use with Cursor](docs/guide/cursor.md)\n- [Reviewing Server Logs](docs/guide/server_logs.md)\n- Authentication and Security\n    - [Authentication - Overview](docs/guide/authentication.md)\n    - [Authentication - User Management](docs/guide/auth_user.md)\n    - [Authentication - Token Management](docs/guide/auth_token.md)\n    - [Security Checklist](docs/guide/security.md)\n    - [Security Management](docs/guide/security_mgmt.md)\n- Reference\n    - [Using MCP Tools](docs/reference/tools.md)\n    - [Using MCP Resources](docs/reference/resources.md)\n    - [Using MCP Prompts](docs/reference/prompts.md)\n    - [Error Reference](docs/reference/error-reference.md)\n    - [Server Configuration File](docs/reference/config-examples/server.md)\n    - [API Token Configuration File](docs/reference/config-examples/tokens.md)\n    - [CLI Client Configuration Details](docs/reference/config-examples/cli-client.md)\n- Advanced Topics\n    - [Creating Custom Definitions](docs/advanced/custom-definitions.md)\n    - [Configuring and Using Knowledgebase Search](docs/advanced/knowledgebase.md)\n    - [Using the LLM Proxy](docs/advanced/llm-proxy.md)\n    - [Row-Level and Column-Level Security](docs/advanced/row-level-security.md)\n    - [Distributed Deployment](docs/advanced/distributed-deployment.md)\n- For Developers\n    - [For Developers - Overview](docs/developers/overview.md)\n    - [MCP Protocol](docs/developers/mcp-protocol.md)\n    - [API Reference](docs/developers/api-reference.md)\n    - [API Browser](docs/api/browser.md)\n    - [Client Examples](docs/developers/client-examples.md)\n    - Building Chat Clients\n        - [Overview](docs/developers/building-chat-clients.md)\n        - [Python (Stdio + Claude)](docs/developers/stdio-anthropic-chatbot.md)\n        - [Python (HTTP + Ollama)](docs/developers/http-ollama-chatbot.md)\n- Contributing\n    - [Development Setup](docs/contributing/development.md)\n    - [Architecture](docs/contributing/architecture.md)\n    - [Internal Architecture](docs/contributing/internal-architecture.md)\n    - [Testing](docs/contributing/testing.md)\n    - [CI/CD](docs/contributing/ci-cd.md)\n- [Accessing Online Help](docs/guide/help.md)\n- [Troubleshooting](docs/guide/troubleshooting.md)\n- [Release Notes](docs/changelog.md)\n- [Licence](docs/LICENSE.md)\n\nThe pgEdge Postgres Model Context Protocol (MCP) server enables\nSQL queries against PostgreSQL databases through MCP-compatible\nclients. The Natural Language Agent provides supporting\nfunctionality that allows you to use natural language to form\nSQL queries.\n\n> **Supported Versions:** PostgreSQL 14 and higher.\n\n> **NOT FOR PUBLIC-FACING APPLICATIONS**: This MCP server provides\n> LLMs with read access to your entire database schema and data.\n> It should only be used for internal tools, developer workflows,\n> or environments where all users are trusted. For public-facing\n> applications, consider the\n> [pgEdge RAG Server](https://github.com/pgedge/pgedge-rag-server)\n> instead. See the\n> [Choosing the Right Solution](docs/guide/mcp-vs-rag.md) guide\n> for details.\n\n## Quick Start\n\nThe [Quick Start](docs/guide/quickstart.md) guide covers\ninstallation and setup for all supported clients:\n\n| Client | Transport | Best For |\n|--------|-----------|----------|\n| CLI (Stdio) | Stdio | Local single-user development |\n| CLI (HTTP) | HTTP | Multi-user or remote access |\n| Web UI | HTTP | Browser-based chat interface |\n| Claude Code | Stdio | Anthropic CLI agent |\n| Claude Desktop | Stdio | Anthropic desktop app |\n| Cursor | Stdio | AI code editor |\n| Windsurf | Stdio | Codeium code editor |\n| VS Code Copilot | Stdio | GitHub Copilot agent |\n\nFor a guided demo with sample data, see the\n[Quickstart Demo with Northwind](docs/guide/quickstart_demo.md).\n\n## Key Features\n\n- **Read-Only Protection** - All queries run in read-only\n  transactions by default\n- **Resources** - Access PostgreSQL statistics and more\n- **Tools** - Query execution, schema analysis, advanced hybrid\n  search (BM25+MMR), embedding generation, resource reading,\n  and more\n- **Prompts** - Guided workflows for semantic search setup,\n  database exploration, query diagnostics, and more\n- **Production Chat Client** - Full-featured Go client with\n  Anthropic prompt caching (90% cost reduction)\n- **HTTP/HTTPS Mode** - Direct API access with user and token\n  authentication\n- **Web Interface** - Modern React-based UI with AI-powered chat\n  for natural language database interaction\n- **Docker Support** - Pre-built images on\n  [GitHub Container Registry](https://github.com/orgs/pgEdge/packages?repo_name=pgedge-postgres-mcp)\n  with Docker Compose deployment\n- **Secure** - TLS support, user and token auth, read-only\n  enforcement\n- **Hot Reload** - Automatic reload of authentication files\n  without server restart\n\n## Development\n\n### Prerequisites\n\n- Go 1.21 or higher\n- PostgreSQL 14 or higher (for testing)\n- golangci-lint v1.x (for linting)\n\n### Setup Linter\n\nThe project uses golangci-lint v1.x. Install it with:\n\n```bash\ngo install github.com/golangci/golangci-lint/cmd/golangci-lint@latest\n```\n\nNote: The configuration file [`.golangci.yml`](.golangci.yml)\nis compatible with golangci-lint v1.x (not v2).\n\n### Building\n\n```bash\ngit clone https://github.com/pgEdge/pgedge-postgres-mcp.git\ncd pgedge-postgres-mcp\nmake build\n```\n\n### Testing\n\n```bash\n# Run all tests\nmake test\n\n# Run server tests with a database\nexport TEST_PGEDGE_POSTGRES_CONNECTION_STRING=\\\n  \"postgres://localhost/postgres?sslmode=disable\"\ngo test ./...\n\n# Run with coverage\ngo test -v -cover ./...\n\n# Run linting\nmake lint\n```\n\n#### Web UI Tests\n\nThe web UI has a comprehensive test suite. See\n[web/TEST_SUMMARY.md](web/TEST_SUMMARY.md) for details.\n\n```bash\ncd web\nnpm test                # Run all tests\nnpm run test:watch      # Watch mode\nnpm run test:coverage   # With coverage\n```\n\n## Security\n\n- Read-only transaction enforcement (configurable per database)\n- User and API token authentication with expiration\n- TLS/HTTPS support\n- SHA256 token hashing\n- File permission enforcement (0600)\n- Input validation and sanitization\n\nSee the [Security Guide](docs/guide/security.md) for\ncomprehensive security documentation.\n\n## Troubleshooting\n\n**Tools not visible in Claude Desktop?**\n- Use absolute paths in config\n- Restart Claude Desktop completely\n- Check JSON syntax\n\n**Database connection errors?**\n- Ensure database connection is configured before starting the\n  server (via config file, environment variables, or\n  command-line flags)\n- Verify PostgreSQL is running: `pg_isready`\n- Check connection parameters are correct\n\nSee the [Troubleshooting Guide](docs/guide/troubleshooting.md)\nfor detailed solutions.\n\n## Support\n\nTo report an issue with the software, visit:\n[GitHub Issues](https://github.com/pgEdge/pgedge-postgres-mcp/issues)\n\nFor more information, visit\n[docs.pgedge.com](https://docs.pgedge.com)\n\nThis project is licensed under the\n[PostgreSQL License](LICENSE.md).\n",
  "bytes": 9550,
  "sha": "3f7520a840b47a514401a69c453efdac20def7e8a0496715f0fe4414efa07b22",
  "repo_slug": "pgedge/pgedge-postgres-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_pgedge_postgres_mcp_81e79cf9/readme"
}