Skip to content

Simplify simple-calculator MCP example#874

Merged
rapids-bot[bot] merged 6 commits intoNVIDIA:developfrom
AnuradhaKaruppiah:ak-mcp-simple-calc-eg-fixup
Sep 29, 2025
Merged

Simplify simple-calculator MCP example#874
rapids-bot[bot] merged 6 commits intoNVIDIA:developfrom
AnuradhaKaruppiah:ak-mcp-simple-calc-eg-fixup

Conversation

@AnuradhaKaruppiah
Copy link
Contributor

@AnuradhaKaruppiah AnuradhaKaruppiah commented Sep 29, 2025

Description

This PR:

  1. Removes stale information from the simple-calculator MCP example README
  2. It drops sample config and docker files that are no longer needed (with function-group and native stdio support). Example config files that have been retained have been renamed to make their purpose apparent -
  • config-mcp-client.yml
  • config-mcp-tool-wrapper.yml

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.

Summary by CodeRabbit

  • Documentation

    • Streamlined example README to introduce a new MCP client configuration and focused "Running the example" on the client-based workflow; updated docs and examples to reference the client-centric configuration and adjusted command examples.
  • Chores

    • Removed legacy example configurations, deprecated workflow variants, and example server Docker setups and guides to reduce duplication and maintenance.

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

coderabbitai bot commented Sep 29, 2025

Warning

Rate limit exceeded

@AnuradhaKaruppiah has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 18 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 6815e7d and 9af0748.

📒 Files selected for processing (1)
  • examples/MCP/simple_calculator_mcp/README.md (1 hunks)

Walkthrough

Rewrote the example README to introduce an MCP Client Configuration and streamlined run steps; removed multiple example MCP configuration files, deployment Dockerfiles, and a server README; updated MCP docs to reference the client config (config-mcp-client.yml).

Changes

Cohort / File(s) Summary
Example README update
examples/MCP/simple_calculator_mcp/README.md
Replaced TOC, old configuration examples, and run workflows with a new "MCP Client Configuration" section and updated run instructions referencing config-mcp-client.yml and config-mcp-tool-wrapper.yml.
Example configs removed
examples/MCP/simple_calculator_mcp/configs/config-combined.yml, examples/MCP/simple_calculator_mcp/configs/config-mcp-auth-math.yml, examples/MCP/simple_calculator_mcp/configs/config-mcp-date.yml
Deleted example YAML configs that defined MCP tools/function mappings, auth providers, LLM entries, and workflow definitions for the simple calculator/date-time examples.
Deployment artifacts removed
examples/MCP/simple_calculator_mcp/deploy_example_as/Dockerfile, examples/MCP/simple_calculator_mcp/deploy_external_mcp/Dockerfile, examples/MCP/simple_calculator_mcp/deploy_external_mcp/README.md
Removed Dockerfiles and accompanying server README that described building/running sample MCP servers/proxies and related deployment instructions.
Docs updated to use client config
docs/source/workflows/mcp/mcp-client.md, docs/source/workflows/mcp/mcp-server.md
Changed documentation examples and command snippets to reference config-mcp-client.yml (replacing prior config file examples) and simplified example command usage; removed extended YAML/tool examples from server docs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

improvement, cleanup, documentation

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title uses imperative mood, concisely and accurately describes the main change of simplifying the simple-calculator MCP example, and remains well under the 72-character limit.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
@AnuradhaKaruppiah AnuradhaKaruppiah marked this pull request as ready for review September 29, 2025 22:14
@AnuradhaKaruppiah AnuradhaKaruppiah requested a review from a team as a code owner September 29, 2025 22:14
@coderabbitai coderabbitai bot added improvement Improvement to existing functionality non-breaking Non-breaking change labels Sep 29, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
examples/MCP/simple_calculator_mcp/README.md (1)

20-30: Consider consistent capitalization of "Toolkit".

The documentation uses inconsistent capitalization: "NeMo Agent toolkit" (lowercase 't') appears in lines 20, 24, and 29, while the coding guidelines recommend "NeMo Agent Toolkit" (capital T). Although the guideline specifically mentions headings, consistent capitalization throughout the document improves readability and professionalism.

Apply this diff to ensure consistent capitalization:

-This example demonstrates how to integrate the NVIDIA NeMo Agent toolkit with Model Context Protocol (MCP) servers. You'll learn to use remote tools through MCP and publish Agent toolkit functions as MCP services.
+This example demonstrates how to integrate the NVIDIA NeMo Agent Toolkit with Model Context Protocol (MCP) servers. You'll learn to use remote tools through MCP and publish Agent Toolkit functions as MCP services.

-1. **Agent toolkit**: Ensure you have the Agent toolkit installed. If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent Toolkit.
+1. **Agent Toolkit**: Ensure you have the Agent Toolkit installed. If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent Toolkit.

-If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent toolkit.
+If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent Toolkit.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0804b9 and b8ad67f.

📒 Files selected for processing (7)
  • examples/MCP/simple_calculator_mcp/README.md (1 hunks)
  • examples/MCP/simple_calculator_mcp/configs/config-combined.yml (0 hunks)
  • examples/MCP/simple_calculator_mcp/configs/config-mcp-auth-math.yml (0 hunks)
  • examples/MCP/simple_calculator_mcp/configs/config-mcp-date.yml (0 hunks)
  • examples/MCP/simple_calculator_mcp/deploy_example_as/Dockerfile (0 hunks)
  • examples/MCP/simple_calculator_mcp/deploy_external_mcp/Dockerfile (0 hunks)
  • examples/MCP/simple_calculator_mcp/deploy_external_mcp/README.md (0 hunks)
💤 Files with no reviewable changes (6)
  • examples/MCP/simple_calculator_mcp/deploy_external_mcp/README.md
  • examples/MCP/simple_calculator_mcp/deploy_external_mcp/Dockerfile
  • examples/MCP/simple_calculator_mcp/configs/config-combined.yml
  • examples/MCP/simple_calculator_mcp/configs/config-mcp-auth-math.yml
  • examples/MCP/simple_calculator_mcp/deploy_example_as/Dockerfile
  • examples/MCP/simple_calculator_mcp/configs/config-mcp-date.yml
🧰 Additional context used
📓 Path-based instructions (3)
**/README.@(md|ipynb)

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Ensure READMEs follow the naming convention; avoid deprecated names; use “NeMo Agent Toolkit” (capital T) in headings

Files:

  • examples/MCP/simple_calculator_mcp/README.md
**/*

⚙️ CodeRabbit configuration file

**/*: # Code Review Instructions

  • Ensure the code follows best practices and coding standards. - For Python code, follow
    PEP 20 and
    PEP 8 for style guidelines.
  • Check for security vulnerabilities and potential issues. - Python methods should use type hints for all parameters and return values.
    Example:
    def my_function(param1: int, param2: str) -> bool:
        pass
  • For Python exception handling, ensure proper stack trace preservation:
    • When re-raising exceptions: use bare raise statements to maintain the original stack trace,
      and use logger.error() (not logger.exception()) to avoid duplicate stack trace output.
    • When catching and logging exceptions without re-raising: always use logger.exception()
      to capture the full stack trace information.

Documentation Review Instructions - Verify that documentation and comments are clear and comprehensive. - Verify that the documentation doesn't contain any TODOs, FIXMEs or placeholder text like "lorem ipsum". - Verify that the documentation doesn't contain any offensive or outdated terms. - Verify that documentation and comments are free of spelling mistakes, ensure the documentation doesn't contain any

words listed in the ci/vale/styles/config/vocabularies/nat/reject.txt file, words that might appear to be
spelling mistakes but are listed in the ci/vale/styles/config/vocabularies/nat/accept.txt file are OK.

Misc. - All code (except .mdc files that contain Cursor rules) should be licensed under the Apache License 2.0,

and should contain an Apache License 2.0 header comment at the top of each file.

  • Confirm that copyright years are up-to date whenever a file is changed.

Files:

  • examples/MCP/simple_calculator_mcp/README.md
examples/**/*

⚙️ CodeRabbit configuration file

examples/**/*: - This directory contains example code and usage scenarios for the toolkit, at a minimum an example should
contain a README.md or file README.ipynb.

  • If an example contains Python code, it should be placed in a subdirectory named src/ and should
    contain a pyproject.toml file. Optionally, it might also contain scripts in a scripts/ directory.
  • If an example contains YAML files, they should be placed in a subdirectory named configs/. - If an example contains sample data files, they should be placed in a subdirectory named data/, and should
    be checked into git-lfs.

Files:

  • examples/MCP/simple_calculator_mcp/README.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: CI Pipeline / Test (arm64, 3.11)
  • GitHub Check: CI Pipeline / Test (arm64, 3.13)
🔇 Additional comments (4)
examples/MCP/simple_calculator_mcp/README.md (4)

1-16: LGTM!

The Apache License 2.0 header is correctly formatted with the current copyright year (2025).


48-54: No update needed – config-mcp-math.yml exists
The documentation correctly references the existing examples/MCP/simple_calculator_mcp/configs/config-mcp-math.yml file.


55-83: Verified config file exists and content matches documentation.


84-95: Referenced base config file exists and is correct. Verified that examples/getting_started/simple_calculator/configs/config.yml is present and contains the expected function and workflow definitions.

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

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
examples/MCP/simple_calculator_mcp/README.md (4)

20-20: Inconsistent terminology: Use "NeMo Agent Toolkit" with capital T.

The text uses "NVIDIA NeMo Agent toolkit" with lowercase 't', but the coding guidelines specify using "NeMo Agent Toolkit" (capital T) consistently.

Apply this diff:

-This example demonstrates how to integrate the NVIDIA NeMo Agent toolkit with Model Context Protocol (MCP) servers. You'll learn to use remote tools through MCP and publish Agent toolkit functions as MCP services.
+This example demonstrates how to integrate the NVIDIA NeMo Agent Toolkit with Model Context Protocol (MCP) servers. You'll learn to use remote tools through MCP and publish Agent Toolkit functions as MCP services.

24-24: Inconsistent terminology: Use "NeMo Agent Toolkit" with capital T.

Mixed usage of "Agent toolkit" and "NeMo Agent Toolkit" in the same sentence.

Apply this diff:

-1. **Agent toolkit**: Ensure you have the Agent toolkit installed. If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent Toolkit.
+1. **Agent Toolkit**: Ensure you have the Agent Toolkit installed. If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent Toolkit.

29-29: Inconsistent terminology: Use "NeMo Agent Toolkit" with capital T.

Uses "NeMo Agent toolkit" with lowercase 't'.

Apply this diff:

-If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent toolkit.
+If you have not already done so, follow the instructions in the [Install Guide](../../../docs/source/quick-start/installing.md#install-from-source) to create the development environment and install NeMo Agent Toolkit.

41-45: Inconsistent terminology in section headings.

Section headings use "NeMo Agent toolkit" with lowercase 't', but coding guidelines specify using "NeMo Agent Toolkit" (capital T) in headings.

Apply this diff:

-### NeMo Agent toolkit as an MCP Client
+### NeMo Agent Toolkit as an MCP Client
 You can run the simple calculator workflow using Remote MCP tools. In this case, the workflow acts as a MCP client and connects to the MCP server running on the specified URL. Details are provided in the [MCP Client Guide](../../../docs/source/workflows/mcp/mcp-client.md).
 
-### NeMo Agent toolkit as an MCP Server
+### NeMo Agent Toolkit as an MCP Server
 You can publish the simple calculator tools via MCP using the `nat mcp serve` command. Details are provided in the [MCP Server Guide](../../../docs/source/workflows/mcp/mcp-server.md).
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b23ca79 and 6815e7d.

📒 Files selected for processing (2)
  • docs/source/workflows/mcp/mcp-client.md (4 hunks)
  • examples/MCP/simple_calculator_mcp/README.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs/source/workflows/mcp/mcp-client.md
🧰 Additional context used
📓 Path-based instructions (3)
**/README.@(md|ipynb)

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Ensure READMEs follow the naming convention; avoid deprecated names; use “NeMo Agent Toolkit” (capital T) in headings

Files:

  • examples/MCP/simple_calculator_mcp/README.md
**/*

⚙️ CodeRabbit configuration file

**/*: # Code Review Instructions

  • Ensure the code follows best practices and coding standards. - For Python code, follow
    PEP 20 and
    PEP 8 for style guidelines.
  • Check for security vulnerabilities and potential issues. - Python methods should use type hints for all parameters and return values.
    Example:
    def my_function(param1: int, param2: str) -> bool:
        pass
  • For Python exception handling, ensure proper stack trace preservation:
    • When re-raising exceptions: use bare raise statements to maintain the original stack trace,
      and use logger.error() (not logger.exception()) to avoid duplicate stack trace output.
    • When catching and logging exceptions without re-raising: always use logger.exception()
      to capture the full stack trace information.

Documentation Review Instructions - Verify that documentation and comments are clear and comprehensive. - Verify that the documentation doesn't contain any TODOs, FIXMEs or placeholder text like "lorem ipsum". - Verify that the documentation doesn't contain any offensive or outdated terms. - Verify that documentation and comments are free of spelling mistakes, ensure the documentation doesn't contain any

words listed in the ci/vale/styles/config/vocabularies/nat/reject.txt file, words that might appear to be
spelling mistakes but are listed in the ci/vale/styles/config/vocabularies/nat/accept.txt file are OK.

Misc. - All code (except .mdc files that contain Cursor rules) should be licensed under the Apache License 2.0,

and should contain an Apache License 2.0 header comment at the top of each file.

  • Confirm that copyright years are up-to date whenever a file is changed.

Files:

  • examples/MCP/simple_calculator_mcp/README.md
examples/**/*

⚙️ CodeRabbit configuration file

examples/**/*: - This directory contains example code and usage scenarios for the toolkit, at a minimum an example should
contain a README.md or file README.ipynb.

  • If an example contains Python code, it should be placed in a subdirectory named src/ and should
    contain a pyproject.toml file. Optionally, it might also contain scripts in a scripts/ directory.
  • If an example contains YAML files, they should be placed in a subdirectory named configs/. - If an example contains sample data files, they should be placed in a subdirectory named data/, and should
    be checked into git-lfs.

Files:

  • examples/MCP/simple_calculator_mcp/README.md
🔇 Additional comments (3)
examples/MCP/simple_calculator_mcp/README.md (3)

1-16: LGTM: License header is correct.

The Apache License 2.0 header is properly formatted and the copyright year 2025 is up to date.


55-83: LGTM: Configuration example is clear and well-documented.

The example configuration clearly demonstrates how to use both stdio and streamable-http transports with different MCP servers. The explanatory text effectively describes the purpose of each function group.


84-95: LGTM: Running instructions are clear and complete.

The step-by-step instructions for starting the MCP server and running the workflow are clear and actionable. The file paths and commands are correct.

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

/merge

@rapids-bot rapids-bot bot merged commit c3107c5 into NVIDIA:develop Sep 29, 2025
17 checks passed
@AnuradhaKaruppiah AnuradhaKaruppiah deleted the ak-mcp-simple-calc-eg-fixup branch October 1, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement to existing functionality non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants