This is an automated email from the ASF dual-hosted git repository.
wenjin272 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents.git
The following commit(s) were added to refs/heads/main by this push:
new 2c5257a6 [docs] Document MCP server retry configuration (#786)
2c5257a6 is described below
commit 2c5257a6ef88b9b303e8def75445c2db04a6c0eb
Author: Eugene <[email protected]>
AuthorDate: Mon Jun 8 15:01:09 2026 +0800
[docs] Document MCP server retry configuration (#786)
---
docs/content/docs/development/mcp.md | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/docs/content/docs/development/mcp.md
b/docs/content/docs/development/mcp.md
index 929f2e47..02d0cedd 100644
--- a/docs/content/docs/development/mcp.md
+++ b/docs/content/docs/development/mcp.md
@@ -119,6 +119,29 @@ public static ResourceDescriptor authenticatedMcpServer() {
- `BasicAuth` - For username/password authentication
- `ApiKeyAuth` - For API key authentication via custom headers
+### Retries
+
+Remote calls to an MCP server (listing/calling tools and prompts) are retried
with exponential backoff on transient failures. You can tune the retry behavior
per server with the following descriptor arguments. {{< hint info >}}Note:
retry is currently only supported by the [Java SDK](#mcp-sdk).{{< /hint >}}
+
+| Argument | Default | Description
|
+|--------------------|---------|------------------------------------------------------|
+| `maxRetries` | 3 | Maximum number of retries for a failed remote
call. |
+| `initialBackoffMs` | 100 | Initial backoff before the first retry, in
milliseconds. |
+| `maxBackoffMs` | 10000 | Upper bound for the backoff between retries,
in milliseconds. |
+
+```java
+@MCPServer
+public static ResourceDescriptor myMcp() {
+ return ResourceDescriptor.Builder.newBuilder(ResourceName.MCP_SERVER)
+ .addInitialArgument("endpoint", MCP_ENDPOINT)
+ .addInitialArgument("timeout", 30)
+ .addInitialArgument("maxRetries", 5)
+ .addInitialArgument("initialBackoffMs", 200)
+ .addInitialArgument("maxBackoffMs", 10000)
+ .build();
+}
+```
+
## Use MCP prompts and tools in Agent