feat: http mode for centralized deployments#1907
Open
atharva1051 wants to merge 16 commits intogithub:mainfrom
Open
feat: http mode for centralized deployments#1907atharva1051 wants to merge 16 commits intogithub:mainfrom
atharva1051 wants to merge 16 commits intogithub:mainfrom
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Add InsiderMode field to HTTPServerConfig and pass it from CLI flags. This ensures that the --insider-mode flag works for HTTP mode just like it does for stdio mode, enabling experimental features when set. Co-authored-by: atharva1051 <53966412+atharva1051@users.noreply.github.com>
Co-authored-by: atharva1051 <53966412+atharva1051@users.noreply.github.com>
Add InsiderMode support to HTTP server mode
need health check at lb level Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
feat: http mode for centralized deployments
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an HTTP server transport mode to support centralized, multi-tenant deployments where each client authenticates per request using an Authorization: Bearer <token> header.
Changes:
- Introduces
httpsubcommand andRunHTTPServer()using MCP SDK’s streamable HTTP handler with per-request token extraction. - Adds HTTP-specific configuration (
HTTPServerConfig) and container exposure for the default HTTP port. - Documents HTTP mode usage, client configuration (VS Code), and deployment/security considerations in README.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/ghmcp/server.go | Adds HTTP server config, token extraction helper, and RunHTTPServer() implementation. |
| cmd/github-mcp-server/main.go | Adds http subcommand and --port flag wiring into HTTPServerConfig. |
| README.md | Documents HTTP server mode, auth model, deployment options, and troubleshooting. |
| Dockerfile | Exposes port 8080 for HTTP mode. |
| go.mod | Removes unused color-related dependencies. |
| go.sum | Updates dependency checksums to match go.mod changes. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds HTTP server mode enabling multi-tenant deployments where each client provides their own GitHub token via
Authorization: Bearer <token>header.Why
Enterprise scenarios require centralized MCP infrastructure serving multiple authenticated clients concurrently, which stdio mode's single-token-per-process model cannot support.
What changed
httpsubcommand with--portflag (default 8080)RunHTTPServer()using MCP SDK'sStreamableHTTPHandlerAuthorizationheaderHTTPServerConfigstruct for HTTP-specific configurationMCP impact
HTTP mode uses existing tools—only the transport and authentication model changed.
Prompts tested (tool changes only)
N/A
Security / limits
Tokens validated per-request, never stored. Each client's token creates isolated server instance with their permissions. Token scope filtering applied for PAT tokens.
Tool renaming
Lint & tests
./script/lint./script/testDocs
Added HTTP mode section to README with client configuration examples (VS Code), Docker deployment patterns (basic, production with docker-compose), and troubleshooting guide.
The program was tested solely for our own use cases, which might differ from yours.
Atharva Patil <atharva.a.patil@mercedes-benz.com> on behalf of Mercedes-Benz Research And Development India, Provider Information