github-mcp-server icon indicating copy to clipboard operation
github-mcp-server copied to clipboard

Add HTTP server mode with OAuth token support

Open talalryz opened this issue 2 months ago • 11 comments

What does this change do

  • This adds HTTP server mode to the GitHub MCP Server, enabling multi-client support with "bring your own token" OAuth functionality.

Why is this change needed

  • Github Remote MCP server supports OAuth & HTTP but DOES NOT SUPPORT Github enterprise server
  • Github Local MCP server supports github enterprise server but DOES NOT SUPPORT Oauth or HTTP
  • Enterprise server users would prefer OAuth forwarding + HTTP instead of every user creating and managing their own personal access tokens.

Key changes

  • Add http command to start HTTP server on configurable port (default 8080)
  • Support per-request OAuth tokens via Authorization header
  • Fall back to GITHUB_PERSONAL_ACCESS_TOKEN env var if no header provided
  • Modify client factories to extract token from request context
  • Add comprehensive HTTP server documentation to README

This implementation is based off PR #888 by @Dreadnoth, updated to work with the current codebase architecture and dependencies. There have also been other attempts at solving this:

  • https://github.com/github/github-mcp-server/issues/311
  • https://github.com/github/github-mcp-server/pull/464

🤖 Generated with Claude Code

Closes:

  • issues related to this:
    • https://github.com/github/github-mcp-server/issues/132
    • https://github.com/github/github-mcp-server/issues/606

talalryz avatar Oct 14 '25 07:10 talalryz

Fingers crossed :)

Dreadnoth avatar Oct 14 '25 12:10 Dreadnoth

This would be really helpful to have!

CLoui avatar Oct 14 '25 16:10 CLoui

Yeah, we have a few PoCs running thi MCP version as server, I don't know why it was ignored

Dreadnoth avatar Oct 14 '25 18:10 Dreadnoth

similar attempt https://github.com/github/github-mcp-server/issues/549#issuecomment-3489822336

tuannvm avatar Nov 05 '25 08:11 tuannvm

+1 for this. Please consider merging this PR as it would be very useful.

paulcwarren avatar Nov 05 '25 15:11 paulcwarren

+1

garethjevans avatar Nov 06 '25 19:11 garethjevans

Thank you all for expressing interest in a remote MCP server for Enterprise Server (and especially for coding one up). I will make sure your voices are heard as we discuss this further internally.

SamMorrowDrums avatar Nov 15 '25 21:11 SamMorrowDrums

+1

kakasahebKK avatar Nov 18 '25 08:11 kakasahebKK

+1

sachin-kale-pubmatic avatar Nov 21 '25 06:11 sachin-kale-pubmatic

We are upgrading to the new Go SDK, and after that has landed we will look at updating this PR and merging. It will be officially unsupported as users will be providing their own infra and deployment strategies and unless we have bundled the server with GHES we have no control or visibility, but I also agree it is high time to enable something so we will be revisiting this shortly.

In the meantime, please join the discussion and share your thoughts and opinions.

:pray: Thank you for the work to and for showing your interest.

SamMorrowDrums avatar Nov 25 '25 09:11 SamMorrowDrums

Related GHES Issues Summary

Here's a summary of GHES-related issues and feature requests that have been filed in this repository:

Open Issues

Issue Title Type 👍
#500 Support subdomain isolation for GHES hosts enhancement -
#471 Add Streamable HTTP Transport Support for Multi-User Mode enhancement -
#299 Network timeouts when interacting with GitHub Enterprise Server bug 1
#157 Better support custom TLS situations when using Docker enhancement 2

Closed Issues (for reference)

Issue Title Type 👍 Resolution
#662 Custom GHES host names are not supported bug - ✅ Completed
#661 Fix GHES hostnames detection to use exact match bug - Duplicate of #662
#311 Support GitHub App installation-token authentication for MCP enhancement 30 ✅ Completed
#864 get_file_contents not working properly (path resolution) bug 14 ✅ Completed
#623 Multiple account support - 4 ✅ Completed
#606 BYO OAuth Access Token for GHES - - ✅ Completed
#503 Remote server authentication for GHES - 3 ✅ Completed
#206 Support multiple instances (GHES + GHEC) enhancement 2 Not planned
#404 Invalid JSON schemas with GHES bug - Not planned
#933 API rate limits with MCP server - - ✅ Completed

This demonstrates significant community interest in GHES support and related features.

SamMorrowDrums avatar Nov 25 '25 09:11 SamMorrowDrums