Model Context Protocol (MCP) Server + Github OAuth
@fredrikp999
关于 Model Context Protocol (MCP) Server + Github OAuth
Example MCP server with OAuth based on https://developers.cloudflare.com/agents/guides/remote-mcp-server/
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp-github-oauth.<your-subdomain>.workers.dev/sse"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
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, deployable to your own Cloudflare account. It serves as a reference example for integrating other OAuth providers with an MCP server deployed to Cloudflare.
How to use Model Context Protocol (MCP) Server + Github OAuth?
Clone the repo and install dependencies with npm install. Create a GitHub OAuth App, set secrets via Wrangler, create a KV namespace, and deploy with wrangler deploy. Test using the MCP Inspector by connecting to the SSE endpoint. Configure Claude Desktop or other MCP clients to connect using the mcp-remote command.
Key features of Model Context Protocol (MCP) Server + Github OAuth
- Built‑in GitHub OAuth authentication for remote MCP connections
- Deployable to Cloudflare Workers with persistent KV storage
- Supports conditional tool availability based on GitHub usernames
- Acts as both OAuth server to clients and OAuth client to GitHub
- Uses Durable Objects for persistent state and authentication context
- Exposes tools via Server‑Sent Events (SSE) protocol
Use cases of Model Context Protocol (MCP) Server + Github OAuth
- Deploy a remote MCP server authenticated via GitHub login
- Restrict sensitive tools (e.g., image generation) to specific GitHub users
- Connect MCP clients like Claude Desktop or Cursor to a protected remote server
- Use as a reference for integrating other OAuth providers with Cloudflare Workers
FAQ from Model Context Protocol (MCP) Server + Github OAuth
What OAuth providers are supported?
The server ships with GitHub OAuth built‑in, but the README notes it can be used as a reference for integrating other OAuth providers.
What runtime and dependencies are required?
The server runs on Cloudflare Workers. Dependencies include the workers-oauth-provider library, Durable MCP, and the MCP Remote library. Local development requires Node.js and Wrangler.
Where does authentication state data live?
Tokens and authentication state are stored in a Cloudflare KV namespace (called OAUTH_KV) configured during deployment.
Are there any known limits?
The README notes that Claude Desktop does not yet fully support remote MCP servers and may show error messages, though tools still work. Cursor supports HTTP+SSE servers but not authentication, so the mcp-remote command is still required.
What transports and authentication are supported?
The server uses Server‑Sent Events (SSE) as the transport. Authentication is handled via GitHub OAuth; all authenticated GitHub users can access basic tools, while the generateImage tool is restricted to usernames listed in the ALLOWED_USERNAMES configuration.
开发工具 分类下的更多 MCP 服务器
Test
x1xhlolFULL Augment Code, Claude Code, Cluely, CodeBuddy, Comet, Cursor, Devin AI, Junie, Kiro, Leap.new, Lovable, Manus, NotionAI, Orchids.app, Perplexity, Poke, Qoder, Replit, Same.dev, Trae, Traycer AI, VSCode Agent, Warp.dev, Windsurf, Xcode, Z.ai Code, Dia & v0. (And other Open Sou
Hello World MCP Server (Reference Extension)
anthropicsDesktop Extensions: One-click local MCP server installation in desktop apps
Grafana MCP server
grafanaMCP server for Grafana
sentry-mcp
getsentryAn MCP server for interacting with Sentry via LLMs.
MCP-Bridge
SecretiveShellA middleware to provide an openAI compatible endpoint that can call MCP tools
评论