home / mcp / github mcp server
Provides a remote MCP server authenticated via GitHub OAuth, exposing tools for interactive computation and user information.
Configuration
View docs{
"mcpServers": {
"julian-figueroa-mcp-cloudflare-oauth": {
"url": "https://mcp-github-oauth.<your-subdomain>.workers.dev/sse",
"headers": {
"GITHUB_CLIENT_ID": "<your-client-id> (set in production)",
"GITHUB_CLIENT_SECRET": "<your-client-secret> (set in production)",
"COOKIE_ENCRYPTION_KEY": "<random-string> (set in production)"
}
}
}
}This MCP server enables remote Model Context Protocol connections with GitHub OAuth built in. You can deploy it to your own Cloudflare account, connect users via GitHub login, and expose tools to MCP clients such as inspectors and chatbots. It provides a practical, self-hosted way to offer authenticated MCP tools to collaborators and applications.
Authenticate to your remote MCP server using GitHub. After signing in, you gain access to tools that your server exposes, with the specific tools and their access controlled by you. You can test the remote server with the Inspector to verify the server is reachable and that authentication flows complete correctly.
Prerequisites: ensure you have Node.js and npm installed on your machine.
1) Install dependencies or create the remote MCP server project using the provided template.
2) Set up GitHub OAuth credentials in production. Create a GitHub OAuth App and note the Client ID and Client Secret. Also generate a random string for COOKIE_ENCRYPTION_KEY.
3) Configure secrets and KeeP KV namespace as shown.
4) Deploy and test using Wrangler and the provided commands.
Access to the remote MCP server is controlled by GitHub OAuth. All authenticated GitHub users can access basic tools such as add and userInfoOctokit. The generateImage tool is restricted to specific GitHub usernames listed in ALLOWED_USERNAMES.
To use the server from Claude Desktop, you configure the MCP server in Claude’s settings and then sign in through the OAuth flow to grant Claude access. After authentication, the tools become available in Claude’s interface.
For local development, you can run a development OAuth flow with a local GitHub OAuth App and test against http://localhost:8788. You can test the local server with the Inspector using http://localhost:8788/sse.
The server uses OAuth to authenticate MCP clients and securely stores tokens in KV. Access to specific tools can be restricted by user identity, such as allowing image generation only for certain GitHub usernames.
Test the remote MCP server from the Inspector using the SSE endpoint. After you complete the OAuth flow, you can list available tools and verify responses.
Add numbers or values as part of a tool operation available to authenticated users.
Fetch authenticated user information using Octokit bindings.
Generate images using a restricted tool available only to allowed GitHub usernames.