-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: Add multi-user mode with streamable HTTP transport support #472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…' subcommand for per-request authentication - All tools now accept 'auth_token' parameter instead of using global token - Backward compatible with original 'stdio' command - Added comprehensive documentation, demo, and test scripts - Enables 95-99% cost reduction vs container-per-user approach
I prefer the use of Header |
That is true. For http, authorization should only be in headers and sent on every single request as headers, as mentioned. The agent should also not have access to the token. For transparency, as mentioned previously in response to related issues, we are working on a remote server, and we use this local one as a library, rather than make it work for both. We will be releasing that soon. Thank you for the contribution though, it's appreciated. We just will wait for our remote release before we decide what to do here. |
Will remote server like |
I will leave this hanging until the announcement... |
@devendershekhawat thank you for the high quality pr 🎆 We have now https://github.com/github/github-mcp-server?tab=readme-ov-file#remote-github-mcp-server released. |
|
@ycjcl868 sorry do you mean, the listTools endpoint should not require authorization? Might this be what you envisioned? If so leave a comment and we can think about implementing it. |
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.