awslabs / awslabs/agentcore-samples

Amazon Bedrock AgentCore Samples - mcp client timeout seconds

Open
#176 0 comments 0 reactions 0 assignees View on GitHub
01-AgentCore-runtime 01-tutorials bug
Dominant language
Python
Stars
3.4k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
30

Description

**Describe the bug**

In https://github.com/awslabs/amazon-bedrock-agentcore-samples/blob/main/01-tutorials/01-AgentCore-runtime/02-hosting-MCP-server/hosting_mcp_server.ipynb, the timeout int 120 is not a valid parameter when creating the MCP client.

AttributeError: 'int' object has no attribute 'seconds'

in:
async with streamablehttp_client(mcp_url, headers, timeout=120, terminate_on_close=False) as (

This works when removing the timeout input parameter.

**To Reproduce**
Run jupyter lab agentcore/amazon-bedrock-agentcore-samples/01-tutorials/01-AgentCore-runtime/02-hosting-MCP-server/hosting_mcp_server.ipynb

Running mcp 1.8.0 on Sagemaker.
Linux default 5.10.238-231.953.amzn2.x86_64 #1 SMP Tue Jun 17 10:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Contributor guide

Open the contributing guide

Research direction

Open 01-tutorials/01-AgentCore-runtime/02-hosting-MCP-server/hosting_mcp_server.ipynb and inspect the streamablehttp_client call using timeout=120. Run the notebook in Jupyter Lab on SageMaker with mcp 1.8.0 to reproduce the AttributeError. Done means the MCP client timeout configuration no longer raises this error and the notebook runs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
ai, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.