Pass one ctx.auth shape to middleware and to tool callbacks
Author: aiden-laneCreated Sep 28, 2026Updated Sep 28, 2026
We maintain @getonlane/mcp-auth, an adapter for mcp-use servers (mcp-use 2.5.2).
What we see: middleware receives ctx.auth as the raw AuthInfo, while tool callbacks receive auth.payload. An adapter has to handle both shapes.
What we need: one documented ctx.auth shape in middleware and in callbacks (or a documented accessor that returns the same object in both places).
Why: a single shape removes a class of auth bugs in adapters and in user code.
We are happy to send a PR.
Source: mcp-use/mcp-use