docs(auth): add section on custom header passthrough in FastApiMCP #248
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes
This PR adds a new subsection to docs/advanced/auth.mdx documenting the headers allowlist parameter available on the FastApiMCP class.
While reading the existing Auth documentation, I noticed that the default behavior (forwarding the authorization header) is described, but the mechanism for forwarding additional custom headers was not documented. This made it non-obvious that multi-tenant IDs, request IDs, or other metadata could be passed through to tool invocations.
This addition improves discoverability for users implementing custom authentication, tracing, or metadata propagation.
Issue ticket number and link (if applicable)
N/A - documentation improvement surfaced during use of the library.
Screenshots of the feature / bugfix
N/A - documentation improvement surfaced during use of the library.
Checklist before requesting a review