Introducing stateful MCP client capabilities on Amazon Bedrock AgentCore Runtime
Summary
Amazon Bedrock AgentCore Runtime now supports stateful Model Context Protocol (MCP) client capabilities, enabling interactive, multi-turn agent workflows. This enhancement addresses limitations of stateless MCP implementations, which struggled with mid-execution user clarification, LLM content requests, and real-time progress updates. The new capabilities include Elicitation for requesting user input, Sampling for client-side LLM content generation, and Progress Notifications for streaming real-time updates during long-running tasks. Stateful mode provisions a dedicated microVM for each user session, persisting for up to 8 hours or 15 minutes of inactivity, maintaining continuity via a "Mcp-Session-Id" header. This completes the bidirectional protocol implementation for MCP, an open standard for LLM application connectivity with external tools and data sources.
Key takeaway
For AI Engineers building interactive agents on Amazon Bedrock, adopting stateful MCP on AgentCore Runtime is crucial for enabling complex, multi-turn conversations. Your applications can now pause for user input, leverage client-side LLMs for dynamic content, and provide real-time progress updates, significantly improving user experience and agent capabilities. Configure your MCP server with `stateless_http=False` and implement the new client handlers to integrate these features.
Key insights
Stateful MCP on Amazon Bedrock AgentCore Runtime enables interactive, multi-turn AI agent workflows.
Principles
- Bidirectional communication enhances agent interactivity.
- Session isolation ensures dedicated resources per user.
- Client-side LLM sampling centralizes model access control.
Method
Configure MCP servers with `stateless_http=False` to enable stateful mode, then implement `elicitation_handler`, `sampling_handler`, and `progress_handler` on the client to support interactive features.
In practice
- Use Elicitation for dynamic user input in workflows.
- Employ Sampling for LLM-generated content without server credentials.
- Implement Progress Notifications for long-running operations.
Topics
- Amazon Bedrock AgentCore Runtime
- Model Context Protocol
- Stateful AI Agents
- Elicitation
- LLM Sampling
Code references
Best for: AI Engineer, Machine Learning Engineer, AI Architect
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Artificial Intelligence.