MCP.so
登录

MCP Server + Github OAuth

@zaki-yama-labs

基本信息

分类

开发工具

传输方式

stdio

作者

zaki-yama-labs

关于 MCP Server + Github OAuth

暂无概览

#mcp#github-oauth#cloudflare

MCP Server + Github OAuth 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

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

MCP Server + Github OAuth 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

点击上方按钮,在临时沙箱中运行此服务器并实时获取工具列表。

概览

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.

常见问题

1

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).

2

How are authentication tokens and user data stored?

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

3

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`.

4

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.

5

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.

评论

开发工具 分类下的更多 MCP 服务器