Introducing stateful MCP client capabilities on Amazon Bedrock AgentCore Runtime
AWS•How-to••by Evandro Franco, Sayee Kulkarni, Phelipe Fabres and Zihang Huang•AWS Artificial Intelligence Blog
In this post, you will learn how to build stateful MCP servers that request user input during execution, invoke LLM sampling for dynamic content generation, and stream progress updates for long-running tasks. You will see code examples for each capability and deploy a working stateful MCP server to Amazon Bedrock AgentCore Runtime.
AgentCore Runtime now runs stateful MCP servers that can ask users for input, request LLM output from the client, and report progress during long tasks.
Who it is for
Developers building agents on Amazon Bedrock AgentCore Runtime that need multi-turn workflows or long-running tool calls.
Key points
Stateful mode is enabled with stateless_http=False and gives each user session a dedicated microVM.
Sessions last up to 8 hours, or end after 15 minutes of inactivity.
Sampling runs on the client's model, so the server needs no model credentials, and users can approve requests.
AI:Lambda durable functions gain a telemetry exporter that sends execution history to 13 destinations, plus an MCP server so AI agents can query that exported data in natural language.
AI:AgentCore adds a managed agent harness that runs an agent from a config in three API calls, a CLI for the full lifecycle, and pre-built skills for coding assistants.