Setup Guide — Environment for MCP Engineering
MCP Engineering course · M0
This guide gets your computer ready for every lab in the course, with the exact versions the labs were verified with on 2026-11-26. It assumes you already use a terminal, Git and a code editor; it does not teach them. Follow the steps in order. At the end, the lab-l02 checker confirms that everything responds.
Golden rule: install from the official sites named here (docs.astral.sh for uv, nodejs.org for Node.js). Never from a search-engine ad or a look-alike domain: that is where fake installers with malware show up.
What you need, and why
| Tool | Requirement | Why | ||||
|---|---|---|---|---|---|---|
| Python | 3.12.x | Every Python lab pins requires-python = "==3.12.*". The mcp 2.3.0 SDK itself needs Python 3.10 or later. | ||||
| uv | a recent release (labs tested with 0.10.2) | Installs each lab's uv.lock (exact versions with sha256 hashes) into a local .venv. Nothing goes into your global Python. | ||||
| Node.js | `^22.23.4 \ | \ | ^24.22.1 \ | \ | >=26.12.1` | The engines field of @modelcontextprotocol/inspector 2.16.0, the patched Inspector used in L09. |
| npm | ships with Node | Used only with package-lock.json (npm ci). | ||||
| Git | any | To version your copy of the labs. | ||||
| An MCP host | optional (INFO only) | Later lessons connect a server to a host, for example Claude Code. The labs' scripted checks do not need one. |
The labs come as Lab files (ZIP) on lesson L02. Unzip it in a working folder: one folder per lab (lab-l02, lab-l08, lab-l09, lab-l10…), each with a README.md, a run.sh and a VERIFY-OUTPUT.txt holding a real recorded run.
Operating systems: the scripts are Bash. They were built and run on macOS (arm64). On Linux they should behave the same; on Windows, use WSL. Neither Linux nor WSL was tested by the course.
Step 1 — Install uv, then let uv provide Python 3.12
Install uv from its official installation page (https://docs.astral.sh/uv/getting-started/installation/). The standalone installer, Homebrew, pipx install uv and other methods are listed there. Then:
uv --version # labs tested with 0.10.2
uv python install 3.12 # uv downloads and manages Python 3.12 for you
uv python find 3.12 # prints the path of the 3.12 interpreter
You do not create or activate a virtual environment by hand. Each lab's run.sh runs uv sync --locked, which builds .venv inside the lab folder and fails if the lock file no longer matches pyproject.toml. That failure is a feature: you never run versions nobody tested.
Step 2 — Install a qualifying Node.js release
Install a qualifying release from nodejs.org or with a version manager such as nvm or fnm. Distribution packages (apt install nodejs) often lag behind and may be too old.
node --version # must match ^22.23.4 || ^24.22.1 || >=26.12.1
npm --version # ships with Node
How to read the range:
^22.23.4means 22.23.4 or any later 22.x. So 22.14.0 fails.^24.22.1means 24.22.1 or any later 24.x. So 24.22.0 fails.>=26.12.1means 26.12.1 or anything newer, including 27.- Node 20, 23 and 25 do not qualify. (Node 20 is past end-of-life.)
Important: the Inspector 2.16.0 does not enforce this range itself; in the L09 lab build it also started under Node 22.14.0 and 24.22.0. "It starts" is not "it is supported", so the labs check the version before they launch it. Do not lower the requirement to make an old Node work: older Inspector releases have published remote code execution advisories (L09).
Step 3 — Git, and (optionally) an MCP host
git --version # any version
claude --version # optional: only if you use Claude Code as your MCP host
The host row is INFO only. Any MCP host can be used for the host-connection steps in later lessons, and the labs verify servers with scripted clients instead. Installing a host and adding servers to it (for example with claude mcp add) changes that host's configuration: do it on purpose, when a lesson asks for it.
Pinning and supply chain (read this before typing any npx)
npx some-package downloads code from the npm registry and runs it with your user's privileges. The official MCP security best practices use exactly this pattern (npx malicious-package) as an example of local server compromise. The course rules:
- Every dependency has an exact version, and a lock file records hashes:
uv.lockfor Python,package-lock.jsonfor Node. - Node tools are installed locally with
npm ci --ignore-scriptsand run fromnode_modules/.bin, never fetched at launch time. - If you must use
npx, pin the exact version (npx @modelcontextprotocol/inspector@2.16.0), type the package name exactly, and check the publisher.
Version labels used in the course: the current protocol is revision 2026-07-28; the SDKs pinned in the labs are mcp 2.3.0 (Python) and @modelcontextprotocol/server 2.4.0 (TypeScript). Anything else is labelled legacy, deprecated or host-specific where it appears.
Step 4 — Run the lab-l02 checker
lab-l02/check-env.sh is read-only: it runs --version commands, installs nothing, opens no port and makes no network call. From the unzipped labs:
cd lab-l02
./run.sh # self-test of the version logic, then your environment table
./run.sh check # only the table; exit 1 if a required tool is missing or too old
The Node row compares your version with the Inspector range:
if [ "$MA" -eq 22 ] && ge 23 4; then ok=1; fi
if [ "$MA" -eq 24 ] && ge 22 1; then ok=1; fi
if [ "$MA" -eq 26 ] && ge 12 1; then ok=1; fi
if [ "$MA" -gt 26 ]; then ok=1; fi
The recorded run on the build machine failed on purpose, because the default Node was too old:
RESULT TOOL VERSION DETAIL
------ ---------- ---------------------- ------------------------------------------
PASS python 3.12.12 /opt/homebrew/opt/python@3.12/bin/python3.12
PASS uv 0.10.2 /opt/homebrew/bin/uv
FAIL node 22.14.0 need ^22.23.4 || ^24.22.1 || >=26.12.1 (Inspector 2.16.0)
PASS npm 10.9.2 /usr/local/bin/npm
PASS git 2.50.1 /usr/bin/git
INFO claude 2.1.332 MCP host found (optional)
ENVIRONMENT NOT READY: 1 required check(s) failed
With Node 24.22.3 first on PATH, the same check printed PASS node 24.22.3 matches ^22.23.4 || ^24.22.1 || >=26.12.1 and ENVIRONMENT OK: all required checks passed.
Common errors (and how to get out of them)
| Symptom | Likely cause | Solution |
|---|---|---|
FAIL node 24.22.0 | Below the 24.x patched minimum | Upgrade to 24.22.1 or later (or a qualifying 22.x / 26.x) |
FAIL python … need 3.12.x | uv has no 3.12 yet | uv python install 3.12 |
uv sync --locked fails in a lab | pyproject.toml no longer matches uv.lock | Do not delete the lock. Undo your edit, or regenerate the lock on purpose and re-run the lab's verifier |
| A tool "can't be found" right after installing | The terminal was already open and has the old PATH | Close and reopen the terminal |
| An old Node keeps winning | Another Node earlier on PATH | command -v node; fix the order or use your version manager's use command |
Final environment checklist
- [ ] The self-test ends with
self-test: 12/12 cases correct. - [ ] Every required row (python, uv, node, npm, git) shows
PASS. - [ ] The last line is
ENVIRONMENT OK: all required checks passedandecho $?prints0. - [ ] I compared my table with
lab-l02/VERIFY-OUTPUT.txt(paths and patch versions differ; the PASS column must not). - [ ] I know why the course never runs an unpinned
npxdownload.
Glossary
- uv: Python package and project manager; installs a lab's locked dependencies into its own
.venv. uv.lock/package-lock.json: lock files recording the exact, hash-checked versions a lab was verified with.uv sync --locked: installs from the lock and fails if the lock no longer matches the project.npm ci --ignore-scripts: installs exactly whatpackage-lock.jsonsays, without running install scripts.- npx: Node.js command that downloads and runs a package; always pin the version if you use it.
- engines range: the Node versions a package declares it supports (
^22.23.4 || ^24.22.1 || >=26.12.1). - MCP host: the AI application you connect servers to (for example Claude Code). Optional for the labs.
To remember
- Python 3.12 via uv; each lab builds its own
.venvfromuv.lock. - Node must match
^22.23.4 || ^24.22.1 || >=26.12.1(Inspector 2.16.0). Node 20 does not qualify. - Exact pins and lock files everywhere; never an unpinned
npxdownload. - A failing
uv sync --lockedis the lock doing its job: do not delete the lock. lab-l02/run.shmust end with ENVIRONMENT OK and exit code 0.
Turning Point Academy · MCP Engineering course · Module 0 · Lesson 2 (L02) · V2, spec 2026-07-28