coleam00 avatar

Cloudflare

coleam00/remote-mcp-server-with-auth

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 tools

Public 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:


View the full README on GitHub

Details

Repository
github.com/coleam00/remote-mcp-server-with-auth
Categories
Cloud & Infrastructure, Developer Tools

More from coleam00

Related Cloud & Infrastructure MCP servers

View all
1eniayomi avatarGCPeniayomi/gcp-mcpA Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your Google Cloud Platform environment. This allows for natural la198stars
2dave-london avatarPare Dockerdave-london/parePare Docker ג€” Structured Docker operations (ps, images, logs, build, compose) as typed JSON.128stars
3pulsemcp avatarVercelpulsemcp/mcp-serversMCP server for Vercel — manage deployments and view build and runtime application logs.0stars
4xenmcp avatarXenMCP Docker agentxenmcp/docker-agentRead-only MCP server for one Docker host: containers, inspect, logs, stats, events. No exec.4stars
5dsouzaanush avatarHeroku Code MCPdsouzaanush/heroku-code-mcpSearch and execute Heroku Platform API operations1stars
6helm-protocol avatarOpenttt Pothelm-protocol/openttt-mcpCryptographic audit trail for Claude Code workflows — tamper-proof timestamps, IETF TTTPS compliant.1stars