> This page is for NeMo Fabric, version Latest (v0.7.0) (default).
> For other versions, use one of these documentation indexes:
> - Latest (v0.7.0) (default): https://docs.nvidia.com/nemo/fabric/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/fabric/dev/llms.txt
> - v0.7.0: https://docs.nvidia.com/nemo/fabric/v0.7.0/llms.txt
> - v0.6.1: https://docs.nvidia.com/nemo/fabric/v0.6.1/llms.txt
> - v0.6.0: https://docs.nvidia.com/nemo/fabric/v0.6.0/llms.txt
> - v0.5.0: https://docs.nvidia.com/nemo/fabric/v0.5.0/llms.txt
> - v0.4.0: https://docs.nvidia.com/nemo/fabric/v0.4.0/llms.txt
> - v0.3.0: https://docs.nvidia.com/nemo/fabric/v0.3.0/llms.txt
> - v0.2.0: https://docs.nvidia.com/nemo/fabric/v0.2.0/llms.txt
> - v0.1.1: https://docs.nvidia.com/nemo/fabric/v0.1.1/llms.txt
> - v0.1.0: https://docs.nvidia.com/nemo/fabric/v0.1.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/fabric/llms.txt.

# 3. Add Skills and MCP

> Extend the Hermes variant with a review skill and a working local MCP tool.

Extend the Hermes variant from [2. Switch Harnesses](/nemo/fabric/getting-started/quickstart/switch-harnesses) with a code-review skill and a local Model Context Protocol (MCP) tool. This third quickstart reuses the model and configuration in `first_agent.py`, the Hermes environment with MCP support, and `HERMES_ADAPTER_PYTHON`. Keep your application's `.venv` active.

#### Add a Review Skill

Create `skills/review/SKILL.md` beside `first_agent.py` with the following content:

```markdown
---
name: review
description: Use when reviewing a Python function for correctness.
---

Report findings under the heading "Review checks". Include the triggering
input, what fails, and a suggested correction. When the check_average MCP
tool is available, use it with an empty list and with [2, 4, 6] to check the
example's edge case and ordinary case. Distinguish tool results from your
own reasoning.
```

The skill supplies review instructions. The MCP server in the next step supplies an executable tool; these are separate capabilities.

#### Create a Local MCP Tool

The Hermes environment created in step two includes MCP 2.3 through its `mcp` extra. This example uses that version's `MCPServer` API. Save this complete server as `review_tools.py` beside `first_agent.py`. It computes the example's average without network access and records each tool call in a local JSON Lines file:

```python
import json
from pathlib import Path

from mcp.server.mcpserver import MCPServer

server = MCPServer("review-tools", log_level="ERROR")
call_log = Path(__file__).with_name("mcp-tool-calls.jsonl")


@server.tool()
def check_average(values: list[float]) -> dict:
    """Check the average calculation, including the empty-list edge case."""
    if values:
        result = {"average": sum(values) / len(values), "error": None}
    else:
        result = {"average": None, "error": "division_by_zero"}
    with call_log.open("a", encoding="utf-8") as handle:
        handle.write(json.dumps({"values": values, **result}) + "\n")
    return result


if __name__ == "__main__":
    server.run(transport="stdio")
```

Do not start the server manually. The harness launches it through stdio when the agent starts. Keep protocol output on stdout; the example writes call evidence to the file instead.

#### Run the Extended Agent

Save this complete example as `extended_agent.py` beside the other files. It selects the already-installed Hermes adapter and uses the same Hermes interpreter for the adapter and MCP server:

```python
import asyncio
import os
from pathlib import Path

from first_agent import config
from nemo_fabric import Fabric, HarnessConfig

app_dir = Path(__file__).resolve().parent
hermes_python = os.environ["HERMES_ADAPTER_PYTHON"]
variant = config.model_copy(deep=True)
variant.harness = HarnessConfig(adapter_id="nvidia.fabric.hermes")
variant.tools = None
variant.add_skill_path(app_dir / "skills" / "review")
variant.add_mcp_server(
    "review-tools",
    transport="stdio",
    url=hermes_python,
    args=[str(app_dir / "review_tools.py")],
    exposure="harness_native",
)


async def main():
    original_python = os.environ.get("ADAPTER_PYTHON")
    os.environ["ADAPTER_PYTHON"] = hermes_python
    try:
        result = await Fabric().run(
            variant,
            input=(
                "Use the review skill to review this Python function. "
                "Call the check_average MCP tool with [] and [2, 4, 6], "
                "then explain the bug and a correction.\n\n"
                "def average(values):\n"
                "    return sum(values) / len(values)\n"
            ),
        )
        print("Status:", result.status)
        if result.status == "succeeded":
            print(result.output.response)
        else:
            print("Error:", result.error)
    finally:
        if original_python is None:
            os.environ.pop("ADAPTER_PYTHON", None)
        else:
            os.environ["ADAPTER_PYTHON"] = original_python


if __name__ == "__main__":
    asyncio.run(main())
```

From the application directory, run:

```bash
python extended_agent.py
```

The environment-variable selection is sequential, as in step two. Production launchers should establish consistent execution environments instead of changing process-wide variables around concurrent starts.

#### Check the Review and Tool Calls

Look for status `succeeded` and a review that identifies the empty-list division error under the skill's requested heading. Inspect `mcp-tool-calls.jsonl` for these records; ordering and repeat calls can vary:

```jsonl
{"values": [], "average": null, "error": "division_by_zero"}
{"values": [2.0, 4.0, 6.0], "average": 4.0, "error": null}
```

The log proves the local tool ran. A successful agent response alone does not prove tool use or skill loading; the requested heading is an observable sign that the skill's instructions influenced the review. For a repeat run, distinguish newly appended records from earlier calls. If startup or invocation fails, follow [Troubleshooting](/nemo/fabric/sdk/results-and-errors#errors). If the run succeeds without the required checks, inspect the response and tool log before treating the task as complete.

## Next Steps

Continue to [4. Run in OpenShell (Optional)](/nemo/fabric/getting-started/quickstart/openshell) for the source-checkout sandbox example. Refer to [Tools, Skills, and MCP](/nemo/fabric/sdk/configure-agents#configure-agents-in-code) for authentication, tool policy, and adapter differences, or [Plan and Diagnose](/nemo/fabric/sdk/python-sdk#start-with-one-run) to inspect configuration before execution.