
Cloudflare
The Cloudflare Remote PostgreSQL Database MCP Server enables remote database interaction through a production-ready MCP server deployable on Cloudflare Workers with GitHub OAuth authentication. It provides three core tools—`listTables`, `queryDatabase`, and `executeDatabase`—that allow authenticated users to discover database schemas and execute queries, with role-based write permissions controlled by GitHub usernames and built-in SQL injection protection. The server solves the problem of securely exposing PostgreSQL databases to AI models with fine-grained access control, supporting both modern HTTP streaming and legacy Server-Sent Events transport protocols.
- GitHub stars
- 294
- tools
- 3
- last updated
- Mar 5, 2026
Tools
3 toolsPublic tool metadata for what this MCP can expose to an agent.
listTablesDiscover database schema and structure.
Discover database schema and structure.
No parameter schema in public metadata yet.
queryDatabaseExecute read-only SQL queries.
Execute read-only SQL queries.
No parameter schema in public metadata yet.
executeDatabaseExecute write operations (INSERT, UPDATE, DELETE, DDL).
Execute write operations (INSERT, UPDATE, DELETE, DDL).
No parameter schema in public metadata yet.
Sponsors
Readme
Cloudflare Remote PostgreSQL Database MCP Server + GitHub OAuth
This is a Model Context Protocol (MCP) server that enables you to chat with your PostgreSQL database, deployable as a remote MCP server with GitHub OAuth through Cloudflare. This is production ready MCP.
Key Features
- 🗄️ Database Integration with Lifespan: Direct PostgreSQL database connection for all MCP tool calls
- 🛠️ Modular, Single Purpose Tools: Following best practices around MCP tools and their descriptions
- 🔐 Role-Based Access: GitHub username-based permissions for database write operations
- 📊 Schema Discovery: Automatic table and column information retrieval
- 🛡️ SQL Injection Protection: Built-in validation and sanitization
- 📈 Monitoring: Optional Sentry integration for production monitoring
- ☁️ Cloud Native: Powered by Cloudflare Workers for global scale
Modular Architecture
This MCP server uses a clean, modular architecture that makes it easy to extend and maintain:
Details
- Repository
- github.com/coleam00/remote-mcp-server-with-auth
- Categories
- Cloud & Infrastructure, Developer Tools