
coleam00/remote-mcp-server-with-auth
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
coleam00/remote-mcp-server-with-auth は、https://github.com/coleam00/remote-mcp-server-with-auth. からインポートされたMCPサーバー候補です。
概要
coleam00/remote-mcp-server-with-auth は、https://github.com/coleam00/remote-mcp-server-with-auth. からインポートされたMCPサーバー候補です。
概要(AI 翻訳)
これはモデルコンテキストプロトコル(MCP)サーバーで、PostgreSQLデータベースとチャットできるもので、Cloudflare経由でGitHub OAuthを使ったリモートMCPサーバーとして展開可能です。これは本番環境対応のMCPです。
主な特徴
- ** 🗄️ Lifespanとのデータベース統合**:すべてのMCPツール呼び出しに対する直接PostgreSQLデータベース接続
- ** 🛠️ モジュール式、単一目的ツール**:MCPツールおよびその説明に関するベストプラクティスに従う
- ** 🔐 ロールベースアクセス**:GitHubのユーザー名に基づくデータベース書き込み権限
- ** 📊 スキーマ発見**:自動テーブルおよびカラム情報取得
- ** 🛡️ SQLインジェクション保護**:組み込みの検証とサニタイズ
- ** 📈 モニタリング**:生産監視のためのオプションSentry統合
- ** ☁️ Cloud Native**:Cloudflare Workersによるグローバル規模の提供
モジュールアーキテクチャ
このMCPサーバーは、拡張や保守が容易なクリーンでモジュール化されたアーキテクチャを採用しています:
src/tools/- 個別のツール実装を別ファイルにまとめるregisterAllTools()- 集中型ツール登録システム- 拡張可能なデザイン -
tools/でファイルを作成し登録することで新しいツールを追加できます
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 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:
src/tools/- Individual tool implementations in separate filesregisterAllTools()- Centralized tool registration system- Extensible Design - Add new tools by creating files in
tools/and registering them
This architecture allows you to easily add new database operations, external API integrations, or any other MCP tools while keeping the codebase organized and maintainable.
Transport Protocols
This MCP server supports both modern and legacy transport protocols:
/mcp- Streamable HTTP (recommended): Uses a single endpoint with bidirectional communication, automatic connection upgrades, and better resilience for network interruptions/sse- Server-Sent Events (legacy): Uses separate endpoints for requests/responses, maintained for backward compatibility
For new implementations, use the /mcp endpoint as it provides better performance and reliability.
How It Works
The MCP server provides three main tools for database interaction:
listTables- Get database schema and table information (all authenticated users)queryDatabase- Execute read-only SQL queries (all authenticated users)executeDatabase- Execute write operations like INSERT/UPDATE/DELETE (privileged users only)
Authentication Flow: Users authenticate via GitHub OAuth → Server validates permissions → Tools become available based on user’s GitHub username.
Security Model:
- All authenticated GitHub users can read data
- Only specific GitHub usernames can write/modify data
- SQL injection protection and query validation built-in
Simple Example First
インストール
npx mcp-remote https://mcp-github-oauth.<your-subdomain>.workers.dev/mcp