Model Context Protocol (MCP) Server + Github OAuth logo

Model Context Protocol (MCP) Server + Github OAuth

by fredrikp999

This is an MCP server that supports remote MCP connections with built-in GitHub OAuth. It can be deployed to Cloudflare and allows users to connect by signing in with their GitHub account.

View on GitHub

Last updated: N/A

What is Model Context Protocol (MCP) Server + Github OAuth?

This is a Model Context Protocol (MCP) server that integrates with GitHub OAuth for authentication. It allows MCP clients to connect remotely to the server after authenticating with their GitHub accounts. The server is designed to be deployed on Cloudflare Workers.

How to use Model Context Protocol (MCP) Server + Github OAuth?

To use this server, you need to create a GitHub OAuth App, configure the necessary secrets in your Cloudflare environment, and deploy the server using Wrangler. Users can then connect to the server using MCP clients like Inspector or Claude Desktop after authenticating through the GitHub OAuth flow.

Key features of Model Context Protocol (MCP) Server + Github OAuth

  • GitHub OAuth integration for authentication

  • Remote MCP connections support

  • Cloudflare Workers deployment

  • Access control based on GitHub usernames

  • Uses Durable Objects for persistent state management

Use cases of Model Context Protocol (MCP) Server + Github OAuth

  • Providing secure access to MCP tools for authenticated GitHub users

  • Integrating MCP functionality with applications that require GitHub authentication

  • Building custom MCP servers with OAuth support

  • Enabling remote access to MCP tools from various MCP clients

FAQ from Model Context Protocol (MCP) Server + Github OAuth

What is MCP?

MCP stands for Model Context Protocol. It's a protocol for connecting tools and models to applications.

How do I deploy this server?

You can deploy this server to your Cloudflare account using Wrangler after setting up your GitHub OAuth App and configuring the necessary secrets.

How do I create a Github OAuth App?

Go to Github settings and create a new OAuth App. Specify the Homepage URL and Authorization callback URL, and note your Client ID and generate a Client secret.

What is the purpose of the COOKIE_ENCRYPTION_KEY?

The COOKIE_ENCRYPTION_KEY is used to encrypt cookies and enhance security. It should be a random string.

How do I connect to the server using Inspector?

Enter the server's SSE endpoint (e.g., https://mcp-github-oauth.<your-subdomain>.workers.dev/sse) into Inspector and follow the authentication flow.