Skip to content

Commit ffcefcc

Browse files
authored
Add note about hibernation support for McpAgent
Add information about hibernation support for McpAgent
1 parent 14fb5e7 commit ffcefcc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/content/docs/agents/model-context-protocol/mcp-agent-api.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ But if you want your MCP server to:
4343
- cache the state of a previous external API call, so that subsequent tool calls can reuse it
4444
- do anything that an Agent can do, but allow MCP clients to communicate with it
4545

46-
You can use the following APIs in order to do so.
46+
You can use the APIs below in order to do so.
47+
48+
#### Hibernation Support
49+
`McpAgent` instances automatically support [WebSockets Hibernation](https://developers.cloudflare.com/durable-objects/best-practices/websockets/#websocket-hibernation-api), allowing stateful MCP servers to sleep during inactive periods while preserving their state. This means your agents only consume compute resources when actively processing requests, optimizing costs while maintaining the full context and conversation history.
4750

4851
### State synchronization APIs
4952

0 commit comments

Comments
 (0)