MCP Elicitation:AI 智能體如何向人類徵求輸入
MCP Elicitation: How AI Agents Ask for Human Input 🤖
MCP Elicitation 讓 AI 智能體透過表單模式收集結構化資料,或以 URL 模式引導用戶處理登入、同意等敏感流程。文章探討 2026-07-28 MCP 規格中的無狀態重試、requestState、能力檢查,並提供使用 mcp 2.3.0 的 Python 範例。無人回應時,無人值守的智能體需要合適的後備方案。
Sometimes an AI agent can't finish a task without asking a person something.
Maybe it needs a deployment target. Maybe the user needs to sign in to another service.
MCP elicitation provides two ways to handle this:
📝 Form mode: collect structured input, such as choices or missing values.
🔗 URL mode: send the user to a browser for sign-in, consent, or other sensitive flows.
In my latest article, I explore how elicitation works under the 2026-07-28 MCP specification, including stateless retries, requestState, capability checks, and a working Python example using mcp 2.3.0.
One takeaway: design for the case where nobody is there to answer. Not every workflow can avoid human input, but unattended agents need a sensible fallback whenever possible.
How are you handling human-in-the-loop steps in your MCP servers?
MCP #AI #Python #AIAgents
來源:DEV Community · dev.to