Skip to content

Conversation

@atharva1051
Copy link

@atharva1051 atharva1051 commented Jan 27, 2026

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

  • Added http subcommand with --port flag (default 8080)
  • Implemented RunHTTPServer() using MCP SDK's StreamableHTTPHandler
  • Per-request token extraction from Authorization header
  • HTTPServerConfig struct for HTTP-specific configuration
  • Exposed port 8080 in Dockerfile
  • Comprehensive documentation: VS Code config, Docker deployment, GHES/GHEC support, security considerations

MCP impact

  • No tool or API changes

HTTP mode uses existing tools—only the transport and authentication model changed.

Prompts tested (tool changes only)

N/A

Security / limits

  • Auth / permissions considered

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

  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Updated (README / docs / examples)

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 <[email protected]> on behalf of Mercedes-Benz Research And Development India, Provider Information

atharva1051 and others added 10 commits January 23, 2026 10:57
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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 <[email protected]>
Add InsiderMode support to HTTP server mode
need health check at lb level

Co-authored-by: Copilot <[email protected]>
feat: http mode for centralized deployments
@atharva1051 atharva1051 marked this pull request as ready for review January 27, 2026 08:54
@atharva1051 atharva1051 requested a review from a team as a code owner January 27, 2026 08:54
Copilot AI review requested due to automatic review settings January 27, 2026 08:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 http subcommand and RunHTTPServer() 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant