• Hi Oleksandr, sorry for the late reply.


    Yes, Nenya handles the authentication between the Agents and the MCP Servers. The upstream providers never see MCP server credentials or URLs.

    We support HTTP MCP servers with configurable auth headers passed through by the gateway, but stdio MCP servers are outside the current scope.

    The gateway talks to MCP servers directly (via HTTPTransport with configured headers). When MCP tools get injected into the upstream LLM request, only the tool names (prefixed with the server name, e.g. mempalace__search), descriptions, and parameter schemas are sent in the JSON body as OpenAI function tool definitions (internal/mcp/openai.go:MCPToolsToOpenAI). When the LLM calls a tool, the gateway intercepts it, routes it to the MCP server internally, and only sends the tool result text back to the LLM. The MCP server URL and auth headers never leave the gateway — they're only used by the transport layer (internal/mcp/transport.go:setHeaders) when the gateway itself connects to the MCP server.