# Authenticate MCP sessions correctly from the first request

> We fixed an issue where headers supplied by header_provider were not being applied during MCP session initialization, only during subsequent requests.

- Published: 2026-04-14
- Author: Agno Team
- Category: Changelog
- Canonical: https://agno-com-nine.vercel.app/articles/authenticate-mcp-sessions-correctly-from-the-first-request
- Markdown: https://agno-com-nine.vercel.app/articles/authenticate-mcp-sessions-correctly-from-the-first-request.md

We fixed an issue where headers supplied by `header_provider` were not being applied during MCP session initialization, only during subsequent requests. Sessions now open with the correct headers from the start, preventing authentication and routing failures on first contact.
