my-mcp-server-github-auth
This project is an MCP server that supports remote connections via GitHub OAuth, enabling tool execution through various clients. It is designed to be deployed on Cloudflare and utilizes OAuth Provider, Durable MCP, and MCP Remote libraries for robust functionality.
Overview
This project is a Model Context Protocol (MCP) server integrated with Github OAuth, designed to facilitate remote MCP connections. It can be deployed on a Cloudflare account with GitHub OAuth authentication enabled. Users can sign in using their GitHub account to connect to the MCP server. The server features integration with Cloudflare Workers and acts both as an OAuth Server and Client, demonstrating how to integrate other OAuth providers. Key features include persistent state management with Cloudflare's Durable Objects and secure token management.
Key Features
- Github OAuth integration
- Cloudflare Workers powered deployment
- Remote tool invocation via MCP clients
Setup and Deployment
- Create GitHub OAuth apps for local and production environments
- Configure environment variables and secrets with Wrangler
- Deploy to your Cloudflare worker domain and local development
Tools and Authentication
- Execute tools like 'add' and 'userInfoOctokit' upon successful GitHub authentication
- Manage tool access based on user permissions with the
ALLOWED_USERNAMES
configuration
Clients
- Access the MCP server from various clients like Claude Desktop and Cursor
Components
- OAuth Provider for Cloudflare Workers
- Durable MCP for persistent state management
- MCP Remote library for tool definition and SSE connections