Skip to content

Support MCP Tools in Agent#1810

Merged
letonghan merged 16 commits intoopea-project:mainfrom
letonghan:agent_mcp
Jun 30, 2025
Merged

Support MCP Tools in Agent#1810
letonghan merged 16 commits intoopea-project:mainfrom
letonghan:agent_mcp

Conversation

@letonghan
Copy link
Copy Markdown
Collaborator

@letonghan letonghan commented Jun 23, 2025

Description

Compatible Agent with MCP tools

Issues

#1574

Type of change

List the type of change like below. Please delete options that are not relevant.

  • New feature (non-breaking change which adds new functionality)

Dependencies

Added mcp and langchain-mcp-adapters in requirements.in, and updated requirements.txt.

Tests

Local tested

Signed-off-by: letonghan <letong.han@intel.com>
Signed-off-by: letonghan <letong.han@intel.com>
@joshuayao joshuayao linked an issue Jun 24, 2025 that may be closed by this pull request
@minmin-intel
Copy link
Copy Markdown
Collaborator

Can you please add UT for testing agent using MCP tool?

Signed-off-by: letonghan <letong.han@intel.com>
letonghan and others added 2 commits June 24, 2025 16:46
Signed-off-by: letonghan <letong.han@intel.com>
@letonghan
Copy link
Copy Markdown
Collaborator Author

Can you please add UT for testing agent using MCP tool?

Yes, UT added in 23f0bb0

@letonghan
Copy link
Copy Markdown
Collaborator Author

@minmin-intel @lkk12014402 all tests passed, please help to review. Thanks in advance!

Copy link
Copy Markdown
Collaborator

@lkk12014402 lkk12014402 left a comment

Choose a reason for hiding this comment

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

LGTM

@joshuayao joshuayao self-requested a review June 30, 2025 02:28
@letonghan letonghan merged commit b45b3fb into opea-project:main Jun 30, 2025
14 checks passed
WenjiaoYue pushed a commit that referenced this pull request Jul 7, 2025
* init agent mcp, add mcp_tool in base agent

Signed-off-by: letonghan <letong.han@intel.com>

* compatible with both yaml tools and mcp tools

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refine async functions, enable singleton for agent instance

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add mcp related arguments

Signed-off-by: letonghan <letong.han@intel.com>

* refine mcp tool initialization, add ut for mcp

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refine mcp service, start in docker container

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* change args order

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: letonghan <letong.han@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

[Feature] Model Context Protocol (MCP) Compatibility for Agent

5 participants