MCP.so
Sign In

Model Context Protocol (MCP) Server + Github OAuth

@zaki-yama-labs

About Model Context Protocol (MCP) Server + Github OAuth

No overview available yet

Basic information

Category

Developer Tools

Runtime

node

Transports

stdio

Publisher

zaki-yama-labs

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "math": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp-github-oauth.<your-subdomain>.workers.dev/sse"
      ]
    }
  }
}

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

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

This is a Model Context Protocol (MCP) server that supports remote MCP connections with built-in GitHub OAuth. It is deployed to Cloudflare Workers and acts as both an OAuth server to MCP clients and an OAuth client to GitHub. It serves as a reference example for integrating OAuth providers with an MCP server using the workers-oauth-provider library.

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

Clone the repository, install dependencies, create a GitHub OAuth App, set secrets via Wrangler (GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, COOKIE_ENCRYPTION_KEY), create a KV namespace, and deploy using wrangler deploy. For local development, create a separate GitHub OAuth App, configure .dev.vars, and run wrangler dev. Test using the MCP Inspector by connecting to the SSE endpoint. Connect MCP clients like Claude Desktop by adding the server configuration with npx mcp-remote pointing to the SSE URL.

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

  • Acts as OAuth server to MCP clients and OAuth client to GitHub.
  • Deployed on Cloudflare Workers, using Durable Objects and KV storage.
  • Provides tools: add, userInfoOctokit, and generateImage (restricted).
  • Supports remote connections via Server-Sent Events (SSE).
  • Includes built-in OAuth flow for user authentication.

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

  • Deploy a remote MCP server with GitHub authentication for tool access.
  • Restrict sensitive tools (e.g., image generation) to specific GitHub usernames.
  • Use as a reference implementation for integrating other OAuth providers with MCP on Cloudflare.
  • Allow MCP clients (Claude Desktop, Cursor, Windsurf) to connect and invoke authenticated tools.

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

What runtime dependencies does this server require?

It requires Cloudflare Workers, Durable Objects, a KV namespace, and the wrangler CLI. You also need a GitHub OAuth App credentials (Client ID and Client Secret).

How are authentication tokens and user data stored?

OAuth tokens and authentication state are securely stored in a dedicated Cloudflare KV namespace (OAUTH_KV).

What transport protocol does this server use for MCP connections?

It uses Server-Sent Events (SSE) over HTTP. The SSE endpoint is located at /sse.

How is user authorization handled?

All authenticated GitHub users can access basic tools (add, userInfoOctokit). The generateImage tool is restricted to specific GitHub usernames set in the ALLOWED_USERNAMES configuration.

Can I connect this server to MCP clients that don't support authentication?

Clients like Cursor that do not support OAuth directly require the use of npx mcp-remote to wrap the remote SSE connection into a local STDIO server, handling authentication transparently.

Comments

More Developer Tools MCP servers