Skip to content

Conversation

a7m-1st
Copy link
Collaborator

@a7m-1st a7m-1st commented Sep 16, 2025

Description

  • Whatsapp mcp wasn't working due to Mcp agent being commented out
  • Mcp_agent was not using whatsapp mcp due to using search tool and a hidden error of "env config empty"
image
  • Added mcp client termination handling & logs

Result & Discussion

Okay first get the contacts "with 6011" information from the mcp tool using mcp toolkit, then send a "Hello world!" message to whome ever you find.

Make sure to understand the mcp parameter requirements first and use mcp agent.
  1. Mcp agent is having a hard time using the WA mcp tools correctly (the above doesn't work), i.e. sometimes it added "sort_by" parameter when not stated at all. It performs better when you specify the jid from whatsapp api itself.
image

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@a7m-1st a7m-1st requested a review from Wendong-Fan September 16, 2025 22:17
@a7m-1st a7m-1st linked an issue Sep 16, 2025 that may be closed by this pull request
@a7m-1st a7m-1st self-assigned this Sep 16, 2025
Comment on lines 440 to 444
workforce.add_single_agent_worker(
"MCP Agent: A Model Context Protocol agent that provides access "
"to external tools and services through MCP integrations.",
mcp,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks @a7m-1st , I think our system now support config the mcp via adding a new worker agent, so there's no need to add this special MCP Agent, could you double check this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh okay, thanks for the review @Wendong-Fan, let me check

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image
  • @Wendong-Fan , I have just reverted that code & adding a separate worker is working fine. I will make a another PR for some enhancements on Add worker along the way.
  • So I guess this pr is only about enhanced mcp logging & mcp client termination handling.

@a7m-1st a7m-1st added enhancement New feature or request backend labels Sep 17, 2025
@a7m-1st a7m-1st changed the title fix: mcp agent not calling expected tools & add logs enhance: mcp tools logs & mcp client stopping handling Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] WhatsApp MCP Integration Issue with Eigent
2 participants