agentic-community / agentic-community/mcp-gateway-registry

Server-specific headers not injected into nginx proxy config

Aberta
#285 2 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
911
Forks
234
Merge médio
1d 11h
PRs com merge (30d)
62

Descrição

## 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.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.