KEMBAR78
MCP Front-End Implementation by VictorYudin · Pull Request #133 · NVIDIA/NeMo-Agent-Toolkit · GitHub
Skip to content

Conversation

@VictorYudin
Copy link
Contributor

Description

This PR implements a Model Context Protocol (MCP) front-end for AgentIQ that allows exposing workflow functions as MCP-compatible tools. The MCP front-end follows the same pattern as the existing FastAPI and Console front-ends, making it consistent with the codebase's architecture.

The implementation includes:

  • Split MCP code into separate files following the existing pattern
  • Updated CLI documentation to include the MCP front-end
  • Created example documentation for using the MCP front-end

Motivation and Context

MCP is an open protocol developed by Anthropic that standardizes how applications provide context to LLMs. Adding an MCP front-end to AgentIQ allows seamless integration with other MCP-compatible applications, enhancing interoperability and expanding the ways developers can utilize AgentIQ workflows.

How Has This Been Tested?

The MCP front-end has been tested with the following workflow:

aiq mcp --config_file examples/simple_rag/configs/milvus_rag_config.yml --tool_names mcp_retriever_tool

This successfully started an MCP server that exposed the mcp_retriever_tool function as an MCP tool.

MCP Front-end Tests

The MCP front-end implementation is thoroughly tested with a comprehensive test suite covering all essential components. All 9 tests pass successfully when running pytest.exe tests/aiq/front_ends/mcp.

The test suite includes:

  • Configuration validation tests ensuring proper handling of default values, custom settings, and parameter constraints
  • Plugin functionality tests verifying proper initialization and function filtering
  • Registration tests confirming the correct async context manager pattern implementation
  • CLI command registration tests validating proper integration with AgentIQ's command system

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Signed-off-by: Victor Yudin <vyudin@nvidia.com>
Signed-off-by: Victor Yudin <vyudin@nvidia.com>
Signed-off-by: Victor Yudin <vyudin@nvidia.com>
@VictorYudin VictorYudin requested a review from a team as a code owner April 15, 2025 18:31
@copy-pr-bot
Copy link

copy-pr-bot bot commented Apr 15, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@VictorYudin VictorYudin changed the base branch from develop to main April 15, 2025 18:31
@VictorYudin VictorYudin changed the base branch from main to develop April 15, 2025 18:32
@VictorYudin VictorYudin changed the title MCP (Modular Communication Protocol) Front-End Implementation MCP Front-End Implementation Apr 15, 2025
@mdemoret-nv mdemoret-nv added feature request New feature or request non-breaking Non-breaking change labels Apr 15, 2025
@AnuradhaKaruppiah
Copy link
Contributor

/ok to test

@copy-pr-bot
Copy link

copy-pr-bot bot commented Apr 15, 2025

/ok to test

@AnuradhaKaruppiah, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@AnuradhaKaruppiah
Copy link
Contributor

/ok to test 17dd2f0

@copy-pr-bot
Copy link

copy-pr-bot bot commented Apr 15, 2025

/ok to test 17dd2f0

@AnuradhaKaruppiah, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@AnuradhaKaruppiah
Copy link
Contributor

/ok to test

@copy-pr-bot
Copy link

copy-pr-bot bot commented Apr 15, 2025

/ok to test

@AnuradhaKaruppiah, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@AnuradhaKaruppiah
Copy link
Contributor

/ok to test 42fe429

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

tests/aiq/front_ends/mcp/test_mcp_front_end_plugin.py:81

  • [nitpick] The use of the workflow type value ('test_workflow') as a key in the functions dictionary might be unclear. Consider adding a comment or renaming it to clarify its intended role within the function collection.
assert "test_workflow" in functions

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
@AnuradhaKaruppiah
Copy link
Contributor

Thanks for the PR @VictorYudin

Signed-off-by: Victor Yudin <vyudin@nvidia.com>
@VictorYudin VictorYudin force-pushed the mcp_front_end_initial branch from 3bd43ba to 12acacd Compare April 16, 2025 17:42
Signed-off-by: Victor Yudin <vyudin@nvidia.com>
VictorYudin and others added 3 commits April 16, 2025 23:15
Signed-off-by: Victor Yudin <vyudin@nvidia.com>
Signed-off-by: Victor Yudin <vyudin@nvidia.com>
@AnuradhaKaruppiah
Copy link
Contributor

/ok to test

@copy-pr-bot
Copy link

copy-pr-bot bot commented Apr 21, 2025

/ok to test

@AnuradhaKaruppiah, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@AnuradhaKaruppiah
Copy link
Contributor

/ok to test d7fb27d

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
@AnuradhaKaruppiah
Copy link
Contributor

/ok to test f255f1e

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
@AnuradhaKaruppiah
Copy link
Contributor

/ok to test 9f376b7

@AnuradhaKaruppiah
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit 74f5687 into NVIDIA:develop Apr 21, 2025
10 checks passed
ericevans-nv pushed a commit to ericevans-nv/agent-iq that referenced this pull request Apr 23, 2025
This PR implements a Model Context Protocol (MCP) front-end for AgentIQ that allows exposing workflow functions as MCP-compatible tools. The MCP front-end follows the same pattern as the existing FastAPI and Console front-ends, making it consistent with the codebase's architecture.

The implementation includes:
- Split MCP code into separate files following the existing pattern
- Updated CLI documentation to include the MCP front-end
- Created example documentation for using the MCP front-end

## Motivation and Context
MCP is an open protocol developed by Anthropic that standardizes how applications provide context to LLMs. Adding an MCP front-end to AgentIQ allows seamless integration with other MCP-compatible applications, enhancing interoperability and expanding the ways developers can utilize AgentIQ workflows.

## How Has This Been Tested?
The MCP front-end has been tested with the following workflow:
```
aiq mcp --config_file examples/simple_rag/configs/milvus_rag_config.yml --tool_names mcp_retriever_tool
```
This successfully started an MCP server that exposed the `mcp_retriever_tool` function as an MCP tool.

## MCP Front-end Tests

The MCP front-end implementation is thoroughly tested with a comprehensive test suite covering all essential components. All 9 tests pass successfully when running `pytest.exe tests/aiq/front_ends/mcp`.

The test suite includes:
- Configuration validation tests ensuring proper handling of default values, custom settings, and parameter constraints
- Plugin functionality tests verifying proper initialization and function filtering
- Registration tests confirming the correct async context manager pattern implementation
- CLI command registration tests validating proper integration with AgentIQ's command system

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AgentIQ/blob/develop/docs/source/advanced/contributing.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - Victor Yudin (https://github.com/VictorYudin)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

Approvers:
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

URL: NVIDIA#133
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
ericevans-nv pushed a commit to ericevans-nv/agent-iq that referenced this pull request Apr 23, 2025
This PR implements a Model Context Protocol (MCP) front-end for AgentIQ that allows exposing workflow functions as MCP-compatible tools. The MCP front-end follows the same pattern as the existing FastAPI and Console front-ends, making it consistent with the codebase's architecture.

The implementation includes:
- Split MCP code into separate files following the existing pattern
- Updated CLI documentation to include the MCP front-end
- Created example documentation for using the MCP front-end

## Motivation and Context
MCP is an open protocol developed by Anthropic that standardizes how applications provide context to LLMs. Adding an MCP front-end to AgentIQ allows seamless integration with other MCP-compatible applications, enhancing interoperability and expanding the ways developers can utilize AgentIQ workflows.

## How Has This Been Tested?
The MCP front-end has been tested with the following workflow:
```
aiq mcp --config_file examples/simple_rag/configs/milvus_rag_config.yml --tool_names mcp_retriever_tool
```
This successfully started an MCP server that exposed the `mcp_retriever_tool` function as an MCP tool.

## MCP Front-end Tests

The MCP front-end implementation is thoroughly tested with a comprehensive test suite covering all essential components. All 9 tests pass successfully when running `pytest.exe tests/aiq/front_ends/mcp`.

The test suite includes:
- Configuration validation tests ensuring proper handling of default values, custom settings, and parameter constraints
- Plugin functionality tests verifying proper initialization and function filtering
- Registration tests confirming the correct async context manager pattern implementation
- CLI command registration tests validating proper integration with AgentIQ's command system

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AgentIQ/blob/develop/docs/source/advanced/contributing.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - Victor Yudin (https://github.com/VictorYudin)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

Approvers:
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

URL: NVIDIA#133
Signed-off-by: Eric Evans <194135482+ericevans-nv@users.noreply.github.com>
yczhang-nv pushed a commit to yczhang-nv/NeMo-Agent-Toolkit that referenced this pull request May 8, 2025
This PR implements a Model Context Protocol (MCP) front-end for AgentIQ that allows exposing workflow functions as MCP-compatible tools. The MCP front-end follows the same pattern as the existing FastAPI and Console front-ends, making it consistent with the codebase's architecture.

The implementation includes:
- Split MCP code into separate files following the existing pattern
- Updated CLI documentation to include the MCP front-end
- Created example documentation for using the MCP front-end

## Motivation and Context
MCP is an open protocol developed by Anthropic that standardizes how applications provide context to LLMs. Adding an MCP front-end to AgentIQ allows seamless integration with other MCP-compatible applications, enhancing interoperability and expanding the ways developers can utilize AgentIQ workflows.

## How Has This Been Tested?
The MCP front-end has been tested with the following workflow:
```
aiq mcp --config_file examples/simple_rag/configs/milvus_rag_config.yml --tool_names mcp_retriever_tool
```
This successfully started an MCP server that exposed the `mcp_retriever_tool` function as an MCP tool.

## MCP Front-end Tests

The MCP front-end implementation is thoroughly tested with a comprehensive test suite covering all essential components. All 9 tests pass successfully when running `pytest.exe tests/aiq/front_ends/mcp`.

The test suite includes:
- Configuration validation tests ensuring proper handling of default values, custom settings, and parameter constraints
- Plugin functionality tests verifying proper initialization and function filtering
- Registration tests confirming the correct async context manager pattern implementation
- CLI command registration tests validating proper integration with AgentIQ's command system

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AgentIQ/blob/develop/docs/source/advanced/contributing.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - Victor Yudin (https://github.com/VictorYudin)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

Approvers:
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

URL: NVIDIA#133
Signed-off-by: Yuchen Zhang <134643420+yczhang-nv@users.noreply.github.com>
AnuradhaKaruppiah pushed a commit to AnuradhaKaruppiah/oss-agentiq that referenced this pull request Aug 4, 2025
This PR implements a Model Context Protocol (MCP) front-end for AgentIQ that allows exposing workflow functions as MCP-compatible tools. The MCP front-end follows the same pattern as the existing FastAPI and Console front-ends, making it consistent with the codebase's architecture.

The implementation includes:
- Split MCP code into separate files following the existing pattern
- Updated CLI documentation to include the MCP front-end
- Created example documentation for using the MCP front-end

## Motivation and Context
MCP is an open protocol developed by Anthropic that standardizes how applications provide context to LLMs. Adding an MCP front-end to AgentIQ allows seamless integration with other MCP-compatible applications, enhancing interoperability and expanding the ways developers can utilize AgentIQ workflows.

## How Has This Been Tested?
The MCP front-end has been tested with the following workflow:
```
aiq mcp --config_file examples/simple_rag/configs/milvus_rag_config.yml --tool_names mcp_retriever_tool
```
This successfully started an MCP server that exposed the `mcp_retriever_tool` function as an MCP tool.

## MCP Front-end Tests

The MCP front-end implementation is thoroughly tested with a comprehensive test suite covering all essential components. All 9 tests pass successfully when running `pytest.exe tests/aiq/front_ends/mcp`.

The test suite includes:
- Configuration validation tests ensuring proper handling of default values, custom settings, and parameter constraints
- Plugin functionality tests verifying proper initialization and function filtering
- Registration tests confirming the correct async context manager pattern implementation
- CLI command registration tests validating proper integration with AgentIQ's command system

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AgentIQ/blob/develop/docs/source/advanced/contributing.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - Victor Yudin (https://github.com/VictorYudin)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

Approvers:
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

URL: NVIDIA#133
scheckerNV pushed a commit to scheckerNV/aiq-factory-reset that referenced this pull request Aug 22, 2025
This PR implements a Model Context Protocol (MCP) front-end for AgentIQ that allows exposing workflow functions as MCP-compatible tools. The MCP front-end follows the same pattern as the existing FastAPI and Console front-ends, making it consistent with the codebase's architecture.

The implementation includes:
- Split MCP code into separate files following the existing pattern
- Updated CLI documentation to include the MCP front-end
- Created example documentation for using the MCP front-end

## Motivation and Context
MCP is an open protocol developed by Anthropic that standardizes how applications provide context to LLMs. Adding an MCP front-end to AgentIQ allows seamless integration with other MCP-compatible applications, enhancing interoperability and expanding the ways developers can utilize AgentIQ workflows.

## How Has This Been Tested?
The MCP front-end has been tested with the following workflow:
```
aiq mcp --config_file examples/simple_rag/configs/milvus_rag_config.yml --tool_names mcp_retriever_tool
```
This successfully started an MCP server that exposed the `mcp_retriever_tool` function as an MCP tool.

## MCP Front-end Tests

The MCP front-end implementation is thoroughly tested with a comprehensive test suite covering all essential components. All 9 tests pass successfully when running `pytest.exe tests/aiq/front_ends/mcp`.

The test suite includes:
- Configuration validation tests ensuring proper handling of default values, custom settings, and parameter constraints
- Plugin functionality tests verifying proper initialization and function filtering
- Registration tests confirming the correct async context manager pattern implementation
- CLI command registration tests validating proper integration with AgentIQ's command system

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AgentIQ/blob/develop/docs/source/advanced/contributing.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - Victor Yudin (https://github.com/VictorYudin)
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

Approvers:
  - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah)

URL: NVIDIA#133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants