- Home
- MCP servers
- Model Context Protocol
Model Context Protocol
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You deploy a remote MCP server powered by Cloudflare Workers that uses GitHub OAuth to authenticate MCP clients and securely expose tools via server-sent events. This enables you to connect from MCP clients and control access to capabilities like adding numbers, retrieving user information, and generating images for authorized users.
How to use
You connect to the remote MCP server from your MCP client by using the server’s SSE endpoint and completing the GitHub OAuth flow. Once connected, authenticated users can access basic tools such as add and userInfoOctokit. Access to the generateImage tool is restricted to specific GitHub usernames you define.
How to install
Prerequisites: ensure you have Node.js and npm installed on your machine. You will also use Wrangler to deploy and manage secrets for Cloudflare Workers.
# Install dependencies and bootstrap the remote MCP server project
npm install
# Create the remote MCP server using the Cloudflare template
npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-github-oauth
Additional sections
Production setup requires creating a GitHub OAuth App and configuring secrets and a KV namespace. Use the following steps to prepare and deploy your MCP server.
# Create a GitHub OAuth App and note the Client ID and Client Secret
# Then set secrets for the Cloudflare Workers project
wrangler secret put GITHUB_CLIENT_ID
wrangler secret put GITHUB_CLIENT_SECRET
wrangler secret put COOKIE_ENCRYPTION_KEY # add any random string, e.g. openssl rand -hex 32
# Create a KV namespace for OAuth state
wrangler kv:namespace create "OAUTH_KV"
# Update the Wrangler configuration with the KV namespace ID as needed
# Deploy the MCP server
wrangler deploy
Access control and local development notes
GitHub OAuth controls access. The server’s Tools are available to authenticated users as described above. For local development, you can run the server in a development mode and test the OAuth flow against a localhost URL set in your GitHub OAuth App.
Local development steps include configuring a development OAuth app with the following URLs: Homepage http://localhost:8788 and Callback http://localhost:8788/callback, then starting the local server and testing the SSE endpoint at http://localhost:8788/sse.
Using Claude Desktop and other MCP clients
To connect Claude Desktop to your remote MCP server, replace the existing MCP configuration with the provided snippet and restart Claude Desktop. After authentication completes, your tools will become available for use.
Available tools
add
Adds two numbers or combines numeric inputs as part of the available MCP tools.
userInfoOctokit
Fetches authenticated user information using Octokit to tailor tool responses.
generateImage
Generates an image based on user input, restricted to allowed GitHub usernames.