Replies: 1 comment
-
Thanks for checking this. Yes, there is a way to support this, but it requires a new feature in Current Architecture Gap
Your GitHub Enterprise Use CaseWhat you want:
Current limitation:
Recommended ApproachStep 1: Use the translate bridge# Expose GitHub MCP via translate (will need new --header-to-env flag)
python3 -m mcpgateway.translate \
--stdio "uvx mcp-server-github" \
--port 9000 \
--header-to-env "Authorization=GITHUB_TOKEN" Step 2: Register with main gateway# Register as gateway peer with header passthrough
POST /gateways
{
"name": "github-mcp",
"url": "http://localhost:9000",
"passthrough_headers": ["Authorization"]
} Step 3: Create virtual serverPOST /servers
{
"name": "github",
"gateway_id": <gateway_id>
} Step 4: Use with dynamic tokens# Each user's request gets their token
curl -H "Authorization: Bearer user1-pat-token" \
http://gateway:4444/servers/github/sse Implementation StatusGitHub Issue Created: #964 The issue includes:
Current WorkaroundUntil the feature is implemented, you'd need to:
Next Steps
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way of supporting STDIO MCP that requires a token to be available as an environment variable, which should be dynamically set on user requests?
Example:
We want to expose the GitHub MCP through the gateway, which requires PAT to be set as an environment variable. We want the users to pass their own PAT through the header. So, ideally, we expect the token to be extracted from the request header and transformed to an environment variable at runtime.
Note: this is for a self-hosted GitHub Enterprise.
Beta Was this translation helpful? Give feedback.
All reactions