This file documents how to provision a clean development environment for uipath-mcp, run the build, execute the tests, and validate a sample code change end-to-end. It is intended both as a quick reference for human contributors and as a structured guide for automated environment-setup tooling.
- Python 3.11+
- uv 0.5+
uv is shell- and OS-agnostic, so the commands below run unchanged on every supported platform:
- Linux
- Windows
- macOS
None required for environment setup, build, or unit tests.
None. The unit-test suite under the Test section below runs fully offline and requires no external authentication.
All commands below must be run from the repository root. The
uvinvocations resolvepyproject.toml,src/, andtests/relative to the current working directory. The first line of## Setupenforces this bycd-ing to the git root.
cd "$(git rev-parse --show-toplevel)"
python3 -m pip install --upgrade uv
uv sync --all-extrasuv --version
uv run python --version
uv run python -c "import uipath_mcp; print('uipath_mcp ok')"N/A
uv run pytestAdd a new server_count property to McpConfig in src/uipath_mcp/_cli/_utils/_config.py, immediately after the existing get_server_names method:
@property
def server_count(self) -> int:
"""Number of MCP servers currently loaded from configuration."""
return len(self._servers)Then create tests/test_config_server_count.py with two pytest tests:
"""Tests for McpConfig.server_count."""
import json
from pathlib import Path
from uipath_mcp._cli._utils._config import McpConfig
def test_server_count_empty(tmp_path: Path) -> None:
config_path = tmp_path / "mcp.json"
config_path.write_text(json.dumps({"servers": {}}))
cfg = McpConfig(str(config_path))
assert cfg.server_count == 0
def test_server_count_multiple(tmp_path: Path) -> None:
config_path = tmp_path / "mcp.json"
config_path.write_text(
json.dumps(
{
"servers": {
"alpha": {"command": "node", "args": ["alpha.js"]},
"beta": {"command": "node", "args": ["beta.js"]},
}
}
)
)
cfg = McpConfig(str(config_path))
assert cfg.server_count == 2uv run pytest tests/test_config_server_count.py -vThe unit tests above are necessary but not sufficient — they don't exercise the package end-to-end. The flow below validates changes against a live runtime:
-
Apply the code changes locally.
-
Run the unit tests (see the
Sample Code Changesection above). -
Scaffold a coded UiPath MCP that exercises the changed code path.
-
In the downstream project's
pyproject.toml, add this local library as an editable dependency:[tool.uv.sources] uipath-mcp = { path = "../path/to/uipath-mcp-python", editable = true }
-
Exercise the new behavior end-to-end:
uv run uipath run <mcp-name> --input '{...}'
-
(Optional) Open a PR and apply the
build:devlabel — this publishes the development version to Test PyPI. -
The PR description is updated automatically with instructions for pointing the downstream MCP at the Test PyPI dev version.
-
Push the dev version to UiPath with
uipath push, then deploy it to Orchestrator or Studio Web withuipath deploy, and run it in cloud to confirm the changes behave correctly against the real platform.