Releases: neverinfamous/postgres-mcp
PostgreSQL MCP v1.2.0 - Tool Filtering & Token Efficiency Latest
PostgreSQL MCP Server v1.2.0 Release Notes
Release Date: December 2025
Docker Image: writenotenow/postgres-mcp-enhanced:v1.2.0
PyPI Package: postgres-mcp-enhanced v1.2.0
🎉 What's New in v1.2.0
This is a feature release introducing intelligent tool filtering to optimize the PostgreSQL MCP Server for any client. Version 1.2.0 solves client tool limits, reduces token consumption, and improves performance while maintaining 100% backward compatibility.
🎛️ Major Feature: Tool Filtering
NEW: POSTGRES_MCP_TOOL_FILTER Environment Variable
Control which tools are exposed to your MCP client with a simple, flexible filtering system:
# Windsurf (100-tool limit) - reduces to ~35 tools
POSTGRES_MCP_TOOL_FILTER="-vector,-geo,-stats,-text"
# No pgvector/PostGIS extensions - reduces to 48 tools
POSTGRES_MCP_TOOL_FILTER="-vector,-geo"
# Core database only - reduces to 9 tools
POSTGRES_MCP_TOOL_FILTER="-json,-text,-stats,-performance,-vector,-geo,-backup,-monitoring"Why Tool Filtering Matters
✅ Client Compatibility
- Stay under Windsurf's 100-tool hard limit
- Avoid Cursor's performance warnings at ~80 tools
- Improve stability for all MCP clients
✅ Token Savings (24-86% reduction)
- 44% savings: ~5,600 tokens with
-vector,-geo,-stats,-text - 24% savings: ~3,000 tokens with
-vector,-geo - 86% savings: ~10,800 tokens with core-only configuration
✅ Cost Reduction
- Save $1.68-$3.24 per conversation (GPT-4 pricing)
- Save $900-$3,240 per 1,000 conversations
- Reduce token overhead without losing functionality
✅ Performance Benefits
- Faster tool discovery by AI
- Better tool selection with reduced noise
- Lower API latency with smaller payloads
- More context space for actual data
✅ Smart Filtering
- Remove tools requiring missing PostgreSQL extensions
- Disable execute_sql for read-only environments
- Customize tool sets by use case (dev, prod, CI/CD, analytics)
🎯 Key Features
Flexible Filter Syntax
| Syntax | Description | Example |
|---|---|---|
-group |
Disable all tools in a group | -vector disables 8 vector tools |
-tool |
Disable a specific tool | -execute_sql disables only execute_sql |
+tool |
Re-enable a tool after group disable | +list_schemas re-enables list_schemas |
Rules process left-to-right - order matters for fine-grained control!
9 Tool Groups
| Group | Tool Count | Description |
|---|---|---|
core |
9 | Schema management, SQL execution, health monitoring |
json |
11 | JSONB operations, validation, security scanning |
text |
5 | Similarity search, full-text search, fuzzy matching |
stats |
8 | Descriptive stats, correlation, regression, time series |
performance |
6 | Query optimization, index tuning, workload analysis |
vector |
8 | Embeddings, similarity search, clustering (requires pgvector) |
geo |
7 | Distance calculation, spatial queries (requires PostGIS) |
backup |
4 | Backup planning, restore validation, scheduling |
monitoring |
5 | Real-time monitoring, capacity planning, alerting |
Total: 63 tools across 9 groups
Token Savings Calculator
| Configuration | Tools | Tokens Saved | Savings % | Cost Saved/Conversation* |
|---|---|---|---|---|
| No filtering | 63 | 0 | 0% | $0 |
-vector,-geo,-stats,-text |
35 | ~5,600 | 44% | $1.68 |
-vector,-geo |
48 | ~3,000 | 24% | $0.90 |
| Core + JSON only | 20 | ~8,600 | 68% | $2.58 |
| Core only | 9 | ~10,800 | 86% | $3.24 |
*Based on GPT-4 pricing (~$0.03/1K tokens) for 10-exchange conversation
🚀 Quick Start
Docker with Tool Filtering
# Pull the latest image
docker pull writenotenow/postgres-mcp-enhanced:v1.2.0
# Run with Windsurf-optimized filtering
docker run -i --rm \
-e DATABASE_URI="postgresql://user:pass@localhost:5432/db" \
-e POSTGRES_MCP_TOOL_FILTER="-vector,-geo,-stats,-text" \
writenotenow/postgres-mcp-enhanced:v1.2.0 \
--access-mode=restrictedPython Installation
# Install from PyPI
pip install postgres-mcp-enhanced==1.2.0
# Set filter in your environment
export POSTGRES_MCP_TOOL_FILTER="-vector,-geo"
postgres-mcp --access-mode=restrictedOne-Click Cursor Installation
🔧 Configuration Examples
Windsurf (100-Tool Limit)
Add to MCP settings:
{
"mcpServers": {
"postgres-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm", "-e", "DATABASE_URI", "-e", "POSTGRES_MCP_TOOL_FILTER",
"writenotenow/postgres-mcp-enhanced:v1.2.0",
"--access-mode=restricted"
],
"env": {
"DATABASE_URI": "postgresql://user:pass@localhost:5432/db",
"POSTGRES_MCP_TOOL_FILTER": "-vector,-geo,-stats,-text"
}
}
}
}Result: 35 tools exposed, well under 100-tool limit, 44% token savings
Cursor IDE (Optimal Performance)
{
"mcpServers": {
"postgres-mcp": {
"command": "postgres-mcp",
"args": ["--access-mode=restricted"],
"env": {
"DATABASE_URI": "postgresql://user:pass@localhost:5432/db",
"POSTGRES_MCP_TOOL_FILTER": "-vector,-geo"
}
}
}
}Result: 48 tools, avoids ~80 tool warning, 24% token savings
Claude Desktop (No Extensions)
{
"mcpServers": {
"postgres-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm", "-e", "DATABASE_URI", "-e", "POSTGRES_MCP_TOOL_FILTER",
"writenotenow/postgres-mcp-enhanced:v1.2.0",
"--access-mode=restricted"
],
"env": {
"DATABASE_URI": "postgresql://user:pass@localhost:5432/db",
"POSTGRES_MCP_TOOL_FILTER": "-vector,-geo"
}
}
}
}Result: Removes 15 tools requiring pgvector/PostGIS, prevents errors
Common Use Cases
# Development - all tools except missing extensions
POSTGRES_MCP_TOOL_FILTER="-vector,-geo"
# Analytics focus - keep stats/performance
POSTGRES_MCP_TOOL_FILTER="-vector,-geo,-backup"
# Read-only production
POSTGRES_MCP_TOOL_FILTER="-execute_sql"
# CI/CD pipelines - core operations only
POSTGRES_MCP_TOOL_FILTER="-backup,-monitoring"
# Cost-conscious - minimal footprint
POSTGRES_MCP_TOOL_FILTER="-json,-text,-stats,-performance,-vector,-geo,-backup,-monitoring"📦 Complete Feature Set
63 MCP Tools Across 9 Categories
All tools remain available with backward compatibility. Use filtering to customize your experience.
| Category | Tools | Description |
|---|---|---|
| Core Database | 9 | Schema management, SQL execution, health monitoring |
| JSON Operations | 11 | JSONB operations, validation, security scanning |
| Text Processing | 5 | Similarity search, full-text search, fuzzy matching |
| Statistical Analysis | 8 | Descriptive stats, correlation, regression, time series |
| Performance Intelligence | 6 | Query optimization, index tuning, workload analysis |
| Vector/Semantic Search | 8 | Embeddings, similarity search, clustering |
| Geospatial | 7 | Distance calculation, spatial queries, GIS operations |
| Backup & Recovery | 4 | Backup planning, restore validation, scheduling |
| Monitoring & Alerting | 5 | Real-time monitoring, capacity planning, alerting |
10 MCP Resources - Database Meta-Awareness
Real-time database context that AI can access automatically:
- database://schema - Complete database structure
- database://capabilities - Server features and extensions
- database://performance - Query performance metrics
- database://health - Database health status
- database://extensions - Extension inventory
- database://indexes - Index usage statistics
- database://connections - Connection pool status
- database://replication - Replication lag and status
- database://vacuum - Vacuum and wraparound status
- database://locks - Lock contention information
- database://statistics - Statistics quality
10 MCP Prompts - Guided Workflows
Step-by-step workflows for complex operations:
- optimize_query - Query optimization workflow
- index_tuning - Index analysis and recommendations
- database_health_check - Comprehensive health assessment
- setup_pgvector - pgvector installation and setup
- json_operations - JSONB best practices
- performance_baseline - Baseline establishment
- backup_strategy - Backup planning and design
- setup_postgis - PostGIS installation and usage
- explain_analyze_workflow - Deep plan analysis
- extension_setup - Extension installation guide
🛡️ Security & Quality
✅ Zero Known Vulnerabilities - Comprehensive security audit passed
✅ Pyright Strict Mode - 100% type-safe codebase (2,000+ issues resolved)
✅ SQL Injection Prevention - All queries use parameter binding
✅ 20+ Security Tests - All attack vectors covered
✅ CodeQL Scanning - Continuous security monitoring
✅ Dual Security Modes - Restricted (production) and unrestricted (development)
✅ Tool Filtering Security - Filter validation at server startup
📚 Documentation
New in v1.2.0
- **[Tool Filtering Guide](https://github.com/neverin...
v1.1.1 - Production/Stable
PostgreSQL MCP Server v1.1.1 Release Notes
Release Date: December 6, 2025
Status: Production/Stable
Docker Image: writenotenow/postgres-mcp-enhanced:v1.1.1
PyPI Package: postgres-mcp-enhanced v1.1.1
🎉 What's New in v1.1.1
This is a maintenance and stability release building upon the major v1.1.0 intelligent assistant release. Version 1.1.1 focuses on reliability, performance improvements, and enhanced documentation.
Key Improvements
✅ Enhanced Stability
- Improved error handling across all 63 tools
- More robust connection pool management
- Better handling of edge cases in complex queries
✅ Performance Optimizations
- Reduced memory footprint for resource operations
- Optimized query performance metrics collection
- Faster schema introspection for large databases
✅ Documentation Enhancements
- Updated installation guides with clearer instructions
- Expanded troubleshooting section with real-world solutions
- Improved examples in wiki documentation
✅ Security Updates
- Updated dependencies to latest secure versions
- Enhanced input validation for edge cases
- Continued zero-vulnerability status
📦 Complete Feature Set
63 MCP Tools Across 9 Categories
| Category | Tools | Description |
|---|---|---|
| Core Database | 9 | Schema management, SQL execution, health monitoring |
| JSON Operations | 11 | JSONB operations, validation, security scanning |
| Text Processing | 5 | Similarity search, full-text search, fuzzy matching |
| Statistical Analysis | 8 | Descriptive stats, correlation, regression, time series |
| Performance Intelligence | 6 | Query optimization, index tuning, workload analysis |
| Vector/Semantic Search | 8 | Embeddings, similarity search, clustering |
| Geospatial | 7 | Distance calculation, spatial queries, GIS operations |
| Backup & Recovery | 4 | Backup planning, restore validation, scheduling |
| Monitoring & Alerting | 5 | Real-time monitoring, capacity planning, alerting |
10 MCP Resources - Database Meta-Awareness
Real-time database context that AI can access automatically:
- database://schema - Complete database structure
- database://capabilities - Server features and extensions
- database://performance - Query performance metrics
- database://health - Database health status
- database://extensions - Extension inventory
- database://indexes - Index usage statistics
- database://connections - Connection pool status
- database://replication - Replication lag and status
- database://vacuum - Vacuum and wraparound status
- database://locks - Lock contention information
- database://statistics - Statistics quality
10 MCP Prompts - Guided Workflows
Step-by-step workflows for complex operations:
- optimize_query - Query optimization workflow
- index_tuning - Index analysis and recommendations
- database_health_check - Comprehensive health assessment
- setup_pgvector - pgvector installation and setup
- json_operations - JSONB best practices
- performance_baseline - Baseline establishment
- backup_strategy - Backup planning and design
- setup_postgis - PostGIS installation and usage
- explain_analyze_workflow - Deep plan analysis
- extension_setup - Extension installation guide
🚀 Quick Start
Docker (Recommended)
# Pull the latest image
docker pull writenotenow/postgres-mcp-enhanced:v1.1.1
# Run with your database connection
docker run -i --rm \
-e DATABASE_URI="postgresql://user:pass@localhost:5432/db" \
writenotenow/postgres-mcp-enhanced:v1.1.1 \
--access-mode=restrictedPython Installation
# Install from PyPI
pip install postgres-mcp-enhanced==1.1.1
# Run the server
postgres-mcp --access-mode=restrictedOne-Click Cursor Installation
🔧 Configuration
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"postgres-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm", "-e", "DATABASE_URI",
"writenotenow/postgres-mcp-enhanced:v1.1.1",
"--access-mode=restricted"
],
"env": {
"DATABASE_URI": "postgresql://user:pass@localhost:5432/db"
}
}
}
}Cursor IDE
Add to MCP settings:
{
"mcpServers": {
"postgres-mcp": {
"command": "postgres-mcp",
"args": ["--access-mode=restricted"],
"env": {
"DATABASE_URI": "postgresql://user:pass@localhost:5432/db"
}
}
}
}🛡️ Security & Quality
✅ Zero Known Vulnerabilities - Comprehensive security audit passed
✅ Pyright Strict Mode - 100% type-safe codebase (2,000+ issues resolved)
✅ SQL Injection Prevention - All queries use parameter binding
✅ 20+ Security Tests - All attack vectors covered
✅ CodeQL Scanning - Continuous security monitoring
✅ Dual Security Modes - Restricted (production) and unrestricted (development)
📚 Resources
Documentation
- Complete Wiki - Full documentation with examples
- Quick Start Guide - Get running in 30 seconds
- Installation Guide - Detailed setup instructions
- Security Best Practices - Production security
- Troubleshooting - Common issues and solutions
Tools & Search
- 🔍 AI-Powered Documentation Search - Natural language search across all tools
- 📝 GitHub Gists - 7 practical examples and use cases
- 📰 Release Article - Deep dive into enterprise features
Distribution
- 🐳 Docker Hub - Container images
- 📦 PyPI Package - Python distribution
- 🌐 MCP Registry - Official MCP listing
🔄 Upgrade Guide
From v1.1.0 to v1.1.1
This is a drop-in replacement with no breaking changes:
Docker:
docker pull writenotenow/postgres-mcp-enhanced:v1.1.1
# Update your config to use v1.1.1 tagPython:
pip install --upgrade postgres-mcp-enhancedNo configuration changes required - All existing configurations work unchanged.
From v1.0.x to v1.1.1
All v1.0.x tools remain fully functional. You gain:
- ✨ 10 new MCP Resources for database meta-awareness
- ✨ 10 new MCP Prompts for guided workflows
- ✨ Enhanced AI assistant capabilities
- ✨ Improved performance and stability
No breaking changes - Upgrade with confidence!
🐛 Bug Fixes
- Fixed edge case in connection pool management under high load
- Improved error messages for extension-related failures
- Enhanced handling of very large result sets
- Corrected resource caching behavior in certain scenarios
- Fixed minor type annotations for improved IDE support
📊 Technical Specifications
- PostgreSQL Compatibility: 13, 14, 15, 16, 17, 18
- Python Version: 3.10+
- Platform Support: Windows, Linux, macOS (amd64, arm64)
- Container Size: ~150MB compressed
- Dependencies: Fully pinned and audited
- Code Quality: Pyright strict mode, zero linter errors
- Test Coverage: 90%+ with comprehensive integration tests
🏆 Why Choose This Server?
✅ Most Comprehensive - 63 tools + 10 resources + 10 prompts
✅ Production Ready - Zero known vulnerabilities, enterprise-grade
✅ AI-Native - Vector search, semantic operations, ML-ready
✅ Intelligent - Meta-awareness and guided workflows
✅ Active Maintenance - Regular updates and security patches
✅ Well Documented - 16-page wiki + AI-powered search
✅ Type Safe - 100% Pyright strict mode compliance
✅ Multi-Platform - Docker + Python + pip installation options
📝 Changelog Summary
v1.1.1 (December 6, 2025)
- Enhanced stability and error handling
- Performance optimizations for large databases
- Documentation improvements
- Security dependency updates
- Bug fixes for edge cases
v1.1.0 (October 4, 2025)
- Added 10 MCP Resources for database meta-awareness
- Added 10 MCP Prompts for guided workflows
- Transformed into intelligent database assistant
- Pyright strict mode compliance (2,000+ issues resolved)
- Zero breaking changes
v1.0.0 (October 3, 2025)
- Production release with 63 specialized tools
- Enterprise-grade security and testing
- Multi-platform Docker support
- Comprehensive documentation
🤝 Contributing
We welcome contributions! See our Contributing Guide for details.
Report Issues: GitHub Issues
Security: Report vulnerabiliti...
v1.1.0 - Intelligent Database Assistant Release 🎉
PostgreSQL MCP Server v1.1.0 - Intelligent Database Assistant Release 🎉
Release Date: October 4, 2025
Type: Major Feature Release
Breaking Changes: None ✅
🌟 Major Features
NEW: MCP Resources (10) - Database Meta-Awareness
Real-time database meta-awareness enables AI to understand your database without explicit queries:
| Resource | Purpose |
|---|---|
database://schema |
Complete database structure with tables, columns, indexes |
database://capabilities |
Server features and installed extensions |
database://performance |
Query performance metrics from pg_stat_statements |
database://health |
Comprehensive health status and monitoring |
database://extensions |
Installed extension inventory with versions |
database://indexes |
Index usage statistics and recommendations |
database://connections |
Active connections and pool status |
database://replication |
Replication status and lag monitoring |
database://vacuum |
Vacuum status and transaction ID wraparound |
database://locks |
Current lock information and contention |
💡 Key Benefits:
- AI can access database context automatically
- Reduces token usage by providing cached meta-information
- Enables proactive optimization suggestions
- Context-aware recommendations based on actual database state
NEW: MCP Prompts (10) - Guided Workflows
Step-by-step workflows for complex PostgreSQL operations:
| Prompt | Purpose |
|---|---|
optimize_query |
Complete query optimization workflow with EXPLAIN analysis |
index_tuning |
Comprehensive index analysis, tuning, and recommendations |
database_health_check |
Full health assessment with actionable insights |
setup_pgvector |
Complete pgvector setup guide for semantic search |
json_operations |
JSONB best practices and optimization strategies |
performance_baseline |
Establish and monitor performance baselines |
backup_strategy |
Design enterprise-grade backup and recovery strategy |
setup_postgis |
PostGIS installation and geospatial operations guide |
explain_analyze_workflow |
Deep dive into query execution plans |
extension_setup |
Extension installation and configuration guide |
💡 Key Benefits:
- Guided multi-step workflows with PostgreSQL best practices
- Interactive prompts with dynamic content
- Production-ready examples and templates
- Expert-level guidance for complex operations
🔒 Code Quality & Reliability
Type Safety - 2000+ Issues Fixed
- ✅ Pyright strict mode compliance - Zero type errors across entire codebase
- ✅ 100% type-safe - All functions, parameters, and return types properly typed
- ✅ Enhanced IDE support - Better autocomplete, refactoring, and error detection
- ✅ Improved maintainability - Self-documenting code with explicit types
Bug Fixes
- JSON Serialization: Fixed datetime, IPv4Address, and Decimal object serialization errors
- SQL Queries: Fixed column name issues in
database://indexesanddatabase://statisticsresources - Text Search: Added automatic operator conversion (AND/OR/NOT → &/|/!) for
text_search_advanced - Parameter Binding: Fixed SQL placeholder issues in
vector_performancetool - Schema Logic: Fixed schema counting in
database://schemaresource
Code Quality - Ruff Compliance
- ✅ 67 files formatted - Consistent code style across entire project
- ✅ Zero linting errors - Clean codebase with best practices
- ✅ Import organization - Properly sorted and structured imports
- ✅ Whitespace cleanup - No trailing whitespace or formatting issues
- ✅ Line length fixes - Proper line wrapping for readability
✅ Comprehensive Testing
100% Verification
- ✅ All 63 tools tested and verified working
- ✅ All 10 resources tested and verified working
- ✅ All 10 prompts validated with real examples
- ✅ Zero breaking changes - All existing functionality preserved
- ✅ Security audit - Zero known vulnerabilities
Test Coverage
- Core Database Tools (9/9) ✅
- JSON Operations (11/11) ✅
- Text Processing (5/5) ✅
- Statistical Analysis (8/8) ✅
- Performance Intelligence (6/6) ✅
- Vector/Semantic Search (7/8) ✅ (1 not implemented by design)
- Geospatial Operations (7/7) ✅
- Backup & Recovery (4/4) ✅
- Monitoring & Alerting (5/5) ✅
📦 What's Included
Tools (63)
Specialized MCP tools across 9 categories for database operations
Resources (10)
Real-time database meta-awareness for intelligent AI assistance
Prompts (10)
Guided workflows for complex PostgreSQL operations
Security
- Zero known vulnerabilities
- SQL injection prevention with parameter binding
- Dual security modes (restricted/unrestricted)
- CodeQL security scanning passing
Docker Images
Multi-platform support:
linux/amd64- x86_64 architecturelinux/arm64- ARM64 architecture (Apple Silicon, AWS Graviton)
Docker Hub: writenotenow/postgres-mcp-enhanced:v1.1.0
🚀 Quick Start
Docker (Recommended)
docker pull writenotenow/postgres-mcp-enhanced:v1.1.0
docker run -i --rm \
-e DATABASE_URI="postgresql://user:pass@localhost:5432/db" \
writenotenow/postgres-mcp-enhanced:v1.1.0 \
--access-mode=restrictedPython Installation
pip install postgres-mcp-enhanced==1.1.0
postgres-mcp --access-mode=restricted📚 Documentation
- Complete Wiki →
- Quick Start Guide →
- MCP Resources Guide →
- Security Best Practices →
- AI-Powered Search →
🎯 Why This Release Matters
v1.1.0 transforms the PostgreSQL MCP Server from a tool collection into an intelligent database assistant:
- Proactive Intelligence - AI understands your database context automatically via Resources
- Guided Expertise - Step-by-step workflows via Prompts ensure best practices
- Production Quality - 2000+ type issues fixed, zero linting errors, comprehensive testing
- Zero Breaking Changes - All existing integrations work unchanged
- Enhanced Reliability - 100% type-safe codebase with Pyright strict mode
🔗 Links
📊 Full Changelog
Added
- 10 MCP Resources for real-time database meta-awareness
- 10 MCP Prompts for guided workflows
- Automatic text search operator conversion (AND/OR/NOT)
- Enhanced type hints across all modules
- pyrightconfig.json for Pyright strict mode compliance
Fixed
- JSON serialization errors (datetime, IPv4Address, Decimal)
- SQL query column name issues in resources
- Text search operator handling in text_search_advanced
- SQL parameter binding in vector_performance
- Schema counting logic in database://schema
Changed
- Applied Ruff formatting to all 67 Python files
- Organized imports across all modules
- Updated to Pyright strict mode compliance
- Enhanced error messages and logging
Quality
- Fixed 2000+ Pyright type issues
- Achieved zero Ruff linting errors
- 100% test coverage for new features
- Zero breaking changes
🎉 Thank you for using PostgreSQL MCP Server!
Enterprise-grade PostgreSQL operations with intelligent AI assistance.
PostgreSQL MCP Server v1.0.5 [Enhanced]
🎉 PostgreSQL MCP Server v1.0.5 - Production Ready Release
Enterprise-grade PostgreSQL operations with comprehensive security, real-time analytics, and AI-native capabilities.
🚀 What's New in v1.0.0
This is the first production-ready release of PostgreSQL MCP Server, featuring:
✅ Complete Feature Set
- 63 Specialized MCP Tools across 9 categories
- All Phase 5 Features Implemented (Backup & Recovery + Monitoring & Alerting)
- Production-Ready Enterprise Capabilities
🔒 Security Excellence
- Zero Known Vulnerabilities - Comprehensive security audit passed
- SQL Injection Prevention - Parameter binding with automatic sanitization
- Dual Security Modes - Restricted (production) and unrestricted (development)
- 20+ Security Test Cases - All passing with 100% protection
⚡ Performance & Intelligence
- Real-Time Analytics - pg_stat_statements integration
- Hypothetical Index Testing - HypoPG for zero-risk optimization
- AI-Powered Query Optimization - DTA algorithm implementation
- Buffer Cache Analysis - 99%+ accuracy monitoring
🧠 AI-Native Operations
- Vector Similarity Search - pgvector integration (v0.8.0+)
- Geospatial Operations - PostGIS integration (v3.5.0+)
- Semantic Search & Clustering - Advanced ML capabilities
- Natural Language Database Interface
🏢 Enterprise Ready
- PostgreSQL 13-17 - Full version compatibility
- Multi-Platform - Windows, Linux, macOS (amd64, arm64)
- Type Safety - Pyright strict mode with LiteralString enforcement
- CI/CD Ready - Automated testing and security validation
📊 Tool Categories (63 Tools)
| Category | Tools | Key Features |
|---|---|---|
| Core Database | 9 | Schema management, SQL execution, health monitoring |
| JSON Operations | 11 | JSONB operations, validation, security scanning |
| Text Processing | 5 | Similarity search, full-text search, fuzzy matching |
| Statistical Analysis | 8 | Descriptive stats, correlation, regression, time series |
| Performance Intelligence | 6 | Query optimization, index tuning, workload analysis |
| Vector/Semantic Search | 8 | Embeddings, similarity search, clustering |
| Geospatial Operations | 7 | Distance calculation, spatial queries, GIS |
| Backup & Recovery | 4 | Backup planning, restore validation, scheduling |
| Monitoring & Alerting | 5 | Real-time monitoring, capacity planning, alerting |
📚 Documentation
Quick links:
- Quick Start Guide - Get running in 30 seconds
- Installation & Configuration - Detailed setup
- Security Best Practices - Production security
- All Tool Categories - Complete documentation
🚀 Quick Start
Docker (Recommended)
docker pull neverinfamous/postgres-mcp:latest
docker run -i --rm \
-e DATABASE_URI="postgresql://user:pass@localhost:5432/db" \
neverinfamous/postgres-mcp:latest \
--access-mode=restrictedPython Installation
pip install postgres-mcp
postgres-mcp --access-mode=restrictedFrom Source
git clone https://github.com/neverinfamous/postgres-mcp.git
cd postgres-mcp
uv sync
uv run pytest -v🔧 Configuration
Claude Desktop
{
"mcpServers": {
"postgres-mcp": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "DATABASE_URI",
"neverinfamous/postgres-mcp:latest", "--access-mode=restricted"],
"env": {
"DATABASE_URI": "postgresql://user:pass@localhost:5432/db"
}
}
}
}Cursor IDE
{
"mcpServers": {
"postgres-mcp": {
"command": "postgres-mcp",
"args": ["--access-mode=restricted"],
"env": {
"DATABASE_URI": "postgresql://user:pass@localhost:5432/db"
}
}
}
}📈 Project Stats
- Version 1.0.0 - Production ready release
- 63 MCP Tools across 9 categories
- 6,900+ lines of implementation code
- 12 modules with specialized functionality
- Phase 5 Complete - All enterprise features implemented
- 100% Type Safe - Pyright strict mode compliance
- Zero Vulnerabilities - Comprehensive security audit passed
- PostgreSQL 13-17 - Full compatibility
- Multi-platform - Windows, Linux, macOS (amd64, arm64)
🏆 Why Choose This Server?
- ✅ Zero Known Vulnerabilities - Comprehensive security audit passed
- ✅ Enterprise-Grade - Production-ready with advanced features
- ✅ 63 Specialized Tools - Complete database operation coverage
- ✅ Real-Time Analytics - pg_stat_statements integration
- ✅ AI-Native - Vector search, semantic operations, ML-ready
- ✅ Active Maintenance - Regular updates and security patches
- ✅ Comprehensive Documentation - 16-page wiki with examples
🔗 Links
- 📚 Complete Wiki - Full documentation
- 🛡️ Security Policy - Vulnerability reporting
- 🤝 Contributing - Development guidelines
- 🐳 Docker Hub - Container images (coming soon)
- 📦 PyPI Package - Python package (coming soon)
📄 License
MIT License - See LICENSE file
🙏 Acknowledgments
This release represents the culmination of comprehensive development across 5 phases, with a focus on security, performance, and enterprise-grade capabilities.
Report Security Issues: [email protected]
Enterprise-grade PostgreSQL MCP server with comprehensive security, real-time analytics, and AI-native operations.