-
Notifications
You must be signed in to change notification settings - Fork 917
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Describe
While using the library, I noticed that the FastApiMCP class supports forwarding custom HTTP headers via the headers allowlist parameter (defined in fastapi_mcp/server.py).
However, this behavior is not documented in docs/advanced/auth.mdx.
Currently the docs explain basic authorization header passthrough, but users have no indication that:
- additional headers can be forwarded
- the feature is configurable at initialization
- forwarded headers are accessible inside tools
Documenting this would make custom authentication, tracing, and metadata propagation much more discoverable.
Proposed Addition
Add a new subsection under the Advanced Auth page: Forwarding Custom HTTP Headers
explain the headers allowlist to show how to pass it to FastApiMCP(headers=[...])
Additional Context
I already prepared a pull request #248 adding this documentation.
Opening this issue to track the improvement and reference the PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation