home / mcp / github mcp server

GitHub MCP Server

remote MCP with GitHub OAuth authentication and built-in analytics tracking powered by MCP Analytics

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bighadj22-mcp-analytics-github-oauth": {
      "url": "https://your-worker-name.your-subdomain.workers.dev/sse",
      "headers": {
        "GITHUB_CLIENT_ID": "YOUR_CLIENT_ID",
        "GITHUB_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "COOKIE_ENCRYPTION_KEY": "YOUR_ENCRYPTION_KEY",
        "MCP_ANALYTICS_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

You deploy an MCP server with GitHub OAuth authentication and built-in analytics to securely connect users, track tool usage, and manage access. It runs on Cloudflare Workers with Durable Objects, supports remote MCP clients, and includes an image generation tool for authorized users.

How to use

To connect a client, start by deploying your MCP server and signing in with GitHub. Authorized users can access tools like add and generateImage, while image generation is restricted to those in your access list. Use your MCP URL to add the server to your MCP clients, then initiate a session to perform tools and view analytics through the integrated dashboard.

How to install

Prerequisites: Node.js and npm, or the tooling required by your MCP client. You will also set up GitHub OAuth and analytics as part of the configuration.

1. Clone the project repository for your MCP server and install dependencies.

2. Install required dependencies.

Configuration and setup

Configure authentication, access control, and analytics by following these steps. This includes setting up GitHub OAuth, enabling analytics, and defining who can access the image generation tool.

Edit the access control to restrict the image generation tool to authorized usernames.

Deployment and hosting

Deploy to Cloudflare Workers to make your MCP server accessible at the specified subdomain. Your MCP server URL will be in the form of https://<your-worker-name>.<subdomain>.workers.dev/sse.

Testing and client setup

Test the server using an MCP inspector or a client like Claude Desktop or other MCP clients. Use the connection URL and, if needed, the provided example client configuration to integrate with your server.

Security and privacy

Rely on OAuth 2.1 for authentication, encrypt tokens in transit and at rest, enforce fine‑grained access control, and sanitize logs to protect sensitive information.

Analytics and monitoring

Analytics are automatically collected to track tool usage, performance, user sessions, and errors. View dashboards for real‑time insights and debugging information.

Notes and supported clients

The server supports both remote HTTP MCP connections and local stdio MCP commands for development and testing. You can run a client with a remote URL or use a local CLI configuration.

Available tools

add

Simple math addition tool for testing connectivity. Use it to verify MCP tool invocation.

generateImage

AI-powered image generation for authorized users using Flux model.