agentic-community / agentic-community/mcp-gateway-registry
Server-specific headers not injected into nginx proxy config
- 主要语言
- Python
- 星标
- 912
- 派生
- 234
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 62
描述
## Bug Description
When registering an MCP server with custom `headers` (e.g., Authorization bearer tokens for backends like Home Assistant), these headers are:
- ✅ Used correctly for health checks (`health/service.py`)
- ✅ Used correctly for internal MCP client calls (`core/mcp_client.py`)
- ❌ NOT injected into the nginx proxy configuration (`core/nginx_service.py`)
This means the gateway always passes the client's JWT to backends instead of the configured server-specific token.
## Steps to Reproduce
1. Register a server with: `"headers": [{"Authorization": "Bearer my-backend-token"}]`
2. Make a request through the gateway
3. Observe the backend receives the client's Keycloak JWT, not `my-backend-token`
## Expected Behavior
The nginx location block should use the server-configured Authorization header.
## Proposed Fix
Modify `_create_location_block()` in `nginx_service.py` to accept and inject server-specific headers.
贡献指南
评估
这个 Issue 还没有评估数据。