Handling an AI Agent triggered MCP Elicitation callback

I’m wondering if anyone has an example they could share of handling an AI Agent triggered MCP Elicitation callback. I realize this might not be the best fit for Streamlit given its linear execution model, but I’m hoping someone has found a solution.

I’d treat the elicitation callback as an out-of-band request rather than trying to render UI from inside it. The pattern I’d prototype is a background MCP session that writes the pending request into per-session state, then lets a normal Streamlit rerun render the form and pass the result back through a synchronization primitive. I don’t have a verified end-to-end example to claim this works with the current SDK callback contract, so that return contract and the cross-thread behavior are the first things I’d test.