Serves as the deployment platform for the MCP server with KV storage for OAuth state management and scalable request handling.
Provides OAuth authentication and user authorization, allowing GitHub usernames to control access levels for database operations.
Enables secure database operations including schema discovery, read-only queries, and write operations (INSERT/UPDATE/DELETE) with role-based access control and SQL injection protection.
Offers comprehensive error tracking, performance monitoring, and distributed tracing with user context binding for production debugging.
🔐 My Credentials MCP Server
Secure PostgreSQL Database Access & Credential Generation for Claude Desktop
A Model Context Protocol (MCP) server that provides secure database operations and credential generation tools through Claude Desktop. This server enables you to interact with your PostgreSQL database and generate various types of credentials using natural language.
✨ Features
🗄️ Database Operations
- Query Database: Execute read-only SQL queries via natural language
- Database Management: Insert, update, delete operations (with role-based permissions)
- Schema Discovery: Automatically discover tables, columns, and relationships
- Product Feedback System: Built-in suggestion and bug reporting system
- Enhanced Tool Descriptions: Comprehensive examples, table schemas, and SQL guidance for better LLM execution
🔐 Credential Generation (14 Tools)
- Unique Identifiers: UUID4, ULID, Nano ID generation
- Passwords: Secure passwords with customizable complexity rules
- API Keys: Various formats (hex, base64, base64url)
- Tokens: Bearer tokens, JWT secrets, session tokens, CSRF tokens
- Cryptographic Elements: Salts, IVs, HMAC keys, encryption keys
- Service-Specific: AWS credentials, GitHub tokens, database passwords
- Batch Operations: Generate multiple credentials in one operation
🛡️ Security Features
- GitHub OAuth Authentication: Single-user access control
- SQL Injection Protection: Multi-layer validation and sanitization
- Role-Based Permissions: Separate read/write access levels
- HTTP API Wrapper: Bypasses Cloudflare Workers limitations
- Audit Logging: All operations tracked with user context
🆕 Recent Enhancements (v0.0.1)
🔧 Bug Fixes & Stability
- ✅ Fixed HTTP 500 Errors: Resolved
submitProductSuggestion
API conflicts - ✅ Schema Registration: Fixed TypeScript compilation issues with Zod schemas
- ✅ Database Parameter Handling: Improved SQL query processing for HTTP API wrapper
- ✅ API Unification: Eliminated duplicate HTTP implementations
📚 Enhanced Documentation
- 🎯 Comprehensive Tool Descriptions: Each MCP tool now includes detailed parameter explanations, usage examples, and workflows
- 📊 Complete Table Schemas: Full column definitions and relationships for all database tables
- 🔍 SQL Query Examples: Practical PostgreSQL examples for common operations
- ⚠️ Best Practices Guide: Security warnings, troubleshooting tips, and optimization guidance
- 💡 LLM-Optimized: Enhanced descriptions reduce parameter errors and improve execution success rates
🏗️ Architecture
This MCP server uses a hybrid architecture optimized for production deployment:
- MCP Server: Deployed on Cloudflare Workers for global availability
- HTTP API Wrapper: Express.js server bypassing connection limitations
- Database: PostgreSQL with connection pooling and security validation
📋 Database Tables
Core Tables
local_credentials
- Secure credential storage and managementcomplaints
- Anonymous feedback system for AI agentsproduct_improvement_suggestions
- User feedback and enhancement requests
🚀 Quick Start for Developers
Prerequisites
- Node.js 18+
- PostgreSQL database
- Cloudflare account (free tier works)
- GitHub account for OAuth
1. Clone Repository
2. Database Setup
Set up your PostgreSQL database and note the connection details:
3. Configure Environment Variables
Create .dev.vars
file:
4. Setup GitHub OAuth App
- Go to GitHub Developer Settings
- Create new OAuth App:
- Homepage URL:
http://localhost:8792
(development) - Callback URL:
http://localhost:8792/callback
- Homepage URL:
- Copy Client ID and Secret to
.dev.vars
5. Configure User Access
Edit src/tools/http-api-tools.ts
line 11:
6. Deploy HTTP API Wrapper (Recommended)
The HTTP API wrapper provides better reliability for database connections:
7. Deploy to Cloudflare Workers
8. Connect to Claude Desktop
Add to your Claude Desktop configuration:
🛠️ Available MCP Tools
Database Tools
listTables
- Discover database schema and structurequeryDatabase
- Execute read-only SQL queriesexecuteDatabase
- Execute write operations (privileged users only)
Product Feedback Tools
submitProductSuggestion
- Submit improvement suggestions or bug reportsgetProductSuggestions
- Browse and search feedback with filtersupdateSuggestionStatus
- Update suggestion status (developers only)
Credential Generation Tools
generateUuid
- UUID4 and ULID generationgeneratePassword
- Secure passwords with complexity rulesgenerateApiKey
- API keys in various formatsgenerateToken
- Bearer, JWT, session, CSRF tokensgenerateCrypto
- Cryptographic elements (salts, keys, IVs)generateServiceCredential
- Service-specific credentialsgenerateBatch
- Multiple credentials in one operation- [7 more generation tools...]
💡 Usage Examples
Database Queries
Credential Generation
Product Feedback
🔒 Security Considerations
- Single User Access: Configure your GitHub username for exclusive access
- Environment Variables: Never hardcode credentials in your code
- SQL Validation: Built-in protection against SQL injection
- HTTPS Only: All communication encrypted in transit
- Audit Trail: Complete logging of all operations
📚 Development
File Structure
Testing
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
📄 License
This project is licensed under the MIT License. See LICENSE for details.
🔗 Links
- GitHub Repository: https://github.com/preangelleo/my-credentials-mcp
- Model Context Protocol: https://modelcontextprotocol.io/introduction
- Cloudflare Workers: https://workers.cloudflare.com/
- Claude Desktop: https://claude.ai/download
⚠️ Important Notes
- This server is designed for single-user access with your GitHub account
- Always use environment variables for sensitive configuration
- Test thoroughly in development before deploying to production
- Regular security audits recommended for production deployments
Built with ❤️ for the Claude Desktop community
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables secure chat-based interaction with PostgreSQL databases through Claude Desktop. Features GitHub OAuth authentication, role-based access control, and enterprise-grade security for database queries and operations.
Related MCP Servers
- -securityAlicense-qualityConnects Claude Desktop directly to databases, allowing it to explore database structures, write SQL queries, analyze datasets, and create reports through an API layer with tools for table exploration and query execution.Last updated -314Mozilla Public License 2.0
- -securityFlicense-qualityA server that enables interaction with PostgreSQL, MySQL, MariaDB, or SQLite databases through Claude Desktop using natural language queries.Last updated -
- -securityFlicense-qualityProvides Claude Desktop with secure access to multiple database connections, allowing users to query MySQL, PostgreSQL, SQLite, and SQL Server databases directly through natural language.Last updated -
- -securityAlicense-qualityProvides Claude with direct access to databases including SQLite, SQL Server, PostgreSQL, and MySQL, enabling execution of SQL queries and table management through natural language.Last updated -4801MIT License