Conversation
wzxxing
left a comment
There was a problem hiding this comment.
Previously in our discussion, we were thinking if the mcp client or transport is the level of abstraction. But seems from the PR, in order to make this feature available to both mcp python sdk and fastmcp v2, the two SDKs needs to be handled separately.
Final comment, would you be able to update the README to include a section of using this feature with popular agent SDKs?
| auth = SigV4HTTPXAuth(session.get_credentials(), aws_service, region) | ||
|
|
||
| # Establish connection using MCP SDK's streamable HTTP client | ||
| async with streamablehttp_client( |
There was a problem hiding this comment.
This is using the official streamablehttp_client.
Do you know if this will be compatible for the users using fastmcp 2.0?
There was a problem hiding this comment.
Yes, the client uses the standard MCP SDK's streamablehttp_client, which speaks the core MCP protocol over HTTP. FastMCP 2.0 servers are MCP-compliant, so any standard MCP client, including this one, will work seamlessly.
If users want to use fastmcp.Client, they'd bypass aws_iam_mcp_client() and use SigV4HTTPXAuth directly.
|
@wzxxing re:
Absolutely. I'll update the README and will switch the PR to "ready for review" |
|
There are some issues found by the CI: https://github.com/aws/mcp-proxy-for-aws/actions/runs/19081826894/job/54560828478?pr=65 |
arangatang
left a comment
There was a problem hiding this comment.
Heya thank you for the great examples and the readme in this pass! Codewise I think we are pretty much good to go, but I have concerns about the naming. Due to trademark we shouldn't really have this as a seperate entity in the package. I provided some suggestions of how we could rephrase examples and READMES.
tldr: We can use MCP Proxy for AWS but MCP Client Library and similar would i believe require a new trademark, so to keep it simple lets rephrase.
|
Hi Dennis, I forgot to point you to the contributing guide. https://github.com/aws/mcp-proxy-for-aws/blob/main/CONTRIBUTING.md You need to run I see the CI failed because uv.lock file was deleted. |
Should be fixed |
arangatang
left a comment
There was a problem hiding this comment.
Some more changes:
- Add license header to examples
- Fix mcp-proxy-for-aws reference in examples.
| @@ -0,0 +1,58 @@ | |||
| # MCP Client Example Tests | |||
There was a problem hiding this comment.
We probably don't need README in unit tests.
There was a problem hiding this comment.
Yeah, I guess I can remove it.
|
|
||
|
|
||
| @pytest.mark.unit | ||
| class TestMcpClientExamples: |
There was a problem hiding this comment.
I think these should be covered by pyright, if the example code can be validated by pyright, we don't need to do these unit tests.
There was a problem hiding this comment.
I was the one who asked to add these. Imo lets leave them for now, we can pivot later?
There was a problem hiding this comment.
Yeah, we can. but CI failed: https://github.com/aws/mcp-proxy-for-aws/actions/runs/19107321050/job/54594703458?pr=65
Co-authored-by: wzxxing <169175349+wzxxing@users.noreply.github.com> Signed-off-by: Dennis Traub <dennis.traub@gmail.com>
Co-authored-by: Leonardo Araneda Freccero <arangatang@users.noreply.github.com> Signed-off-by: Dennis Traub <dennis.traub@gmail.com>
Co-authored-by: Leonardo Araneda Freccero <arangatang@users.noreply.github.com> Signed-off-by: Dennis Traub <dennis.traub@gmail.com>
Signed-off-by: Dennis Traub <dennis.traub@gmail.com>
|
Thank you @DennisTraub for the contribution (and handling all our comments)! |
Enables IAM (SigV4) authentication for MCP clients connecting to AWS-hosted MCP servers. This client is a drop-in replacement for existing MCP client usage and works with agent frameworks like Strands Agents, LangChain, LlamaIndex, and the Microsoft Agent Framework.
aws_iam_mcp_client: an async context manager creating a streamable MCP HTTP client signed with SigV4boto3.Sessionwith optional AWS region and profileSigV4HTTPXAuthwith resolved credentials, service, and regionstreamablehttp_clienthttpx_client_factoryfor transport customizationUnit tests cover:
boto3.Session(region/profile)SigV4HTTPXAuthFollow-ups: