feat: Add multi-user mode with streamable HTTP transport support #472
+956
−1
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.
Closes: #471
Overview
This PR introduces a completely new multi-user mode to the GitHub MCP Server, enabling HTTP-based deployments where multiple users can authenticate with their own GitHub tokens per request.
Changes Made
🏗️ New Multi-User Architecture
multi-user
command that starts an HTTP serverMultiUserStreamableHttpServerConfig
for multi-user HTTP configurationRunMultiUserStreamableHttpServer
function for multi-user HTTP mode--port
flag (defaults to 8080)🔧 Implementation Details
server.NewStreamableHTTPServer()
from mcp-go library📝 Command Interface
🐳 Docker Support
Key Features
👥 Multi-Tenant Support
🌐 Production Ready
Testing
✅ Manual Testing
multi-user
command starts HTTP server correctly/mcp
endpoint accepts MCP protocol requests--port
flag works🧪 Test Commands
📊 Expected Response
Benefits
🌐 Enterprise Ready
🔒 Security Model
⚡ Performance & Scalability
Backward Compatibility
Files Changed
Core Implementation
internal/ghmcp/server.go
: Added multi-user server implementation with HTTP supportcmd/github-mcp-server/main.go
: Added newmulti-user
command with port configurationMulti-User Toolsets
Docker Support
Dockerfile
: Updated to support new multi-user HTTP mode deploymentsArchitecture Comparison
Before (Single-User Only)
After (Multi-User Option)
Configuration Examples
VS Code MCP Configuration (Multi-User HTTP Mode)
Kubernetes Deployment
Future Enhancements
This foundation enables several future improvements:
Checklist
Deployment Impact
Zero Risk to Existing Users
Rollout Strategy
multi-user
command as opt-in featureThis PR introduces a completely new operational mode that makes the GitHub MCP Server suitable for enterprise and multi-tenant deployments, while maintaining full backward compatibility with existing single-user usage patterns.