Skip to content

Commit 37cc8b6

Browse files
feat(mcp): add aws_iam_streamablehttp_client (#339)
1 parent 94814b0 commit 37cc8b6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/user-guide/concepts/tools/mcp-tools.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,30 @@ For HTTP-based MCP servers that use Streamable HTTP transport:
154154
lambda: streamablehttp_client("http://localhost:8000/mcp")
155155
)
156156

157+
#### AWS IAM
158+
159+
For MCP servers on AWS that use SigV4 authentication with IAM credentials, you can conveniently use the [`mcp-proxy-for-aws`](https://pypi.org/project/mcp-proxy-for-aws/) package to handle AWS credential management and request signing automatically. See the [detailed guide](https://dev.to/aws/no-oauth-required-an-mcp-client-for-aws-iam-k1o) for more information.
160+
161+
First, install the package:
162+
163+
```bash
164+
pip install mcp-proxy-for-aws
165+
```
166+
167+
Then you use it like any other transport:
168+
169+
```python
170+
from mcp_proxy_for_aws.client import aws_iam_streamablehttp_client
171+
from strands.tools.mcp import MCPClient
172+
173+
mcp_client = MCPClient(lambda: aws_iam_streamablehttp_client(
174+
endpoint="https://your-service.us-east-1.amazonaws.com/mcp",
175+
aws_region="us-east-1",
176+
aws_service="bedrock-agentcore"
177+
))
178+
```
179+
180+
### 3. Server-Sent Events (SSE)
157181
with streamable_http_mcp_client:
158182
tools = streamable_http_mcp_client.list_tools_sync()
159183
agent = Agent(tools=tools)

0 commit comments

Comments
 (0)