Skip to content

Conversation

@navinpai
Copy link
Contributor

@navinpai navinpai commented Sep 2, 2025

When MCP server returns multiple returns (especially in streamable-http MCP servers), mcpadapt CrewAIAdaper only returns the first response. This minor PR collates all the responses text into a list and returns the entire response to CrewAI so it can use the entire response.

Tested with crewai==0.165.1

Note: This issue was also reported in #55

@navinpai
Copy link
Contributor Author

navinpai commented Sep 6, 2025

@grll can you please take a look at this? 🙏

@grll
Copy link
Owner

grll commented Sep 6, 2025

@grll can you please take a look at this? 🙏

Hey thanks a lot for the contribution. Sorry for the delay I will try to review ASAP

Copy link
Owner

@grll grll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we go for the backward compatible change then, this would mean we can revert the test and just add a new test to check that multiple value get a string representation of the list with all the values.

Also if you feel like it you could add a warning similar to smolagents adapter about the the fact that we only support text.

@navinpai navinpai requested a review from grll September 15, 2025 20:54
Copy link
Owner

@grll grll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good thank you for making the change. I would just remove the single content test as I think it is anyway already tested above that case. Then we should be good to merge. Thanks again!

@navinpai navinpai requested a review from grll September 16, 2025 13:40
@grll grll merged commit 76c3833 into grll:main Sep 17, 2025
@grll
Copy link
Owner

grll commented Sep 17, 2025

@navinpai thank you for the change! Merged and released in v0.1.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants