Step 2 of 7
Check prerequisites and get the project
Set up your tools, get the project and inspect the sample images.
In this step you will set up the local project that the rest of the guide builds on. You will run the MCP server and the MCP client in separate terminals, both from the same project folder.
1. Check the prerequisites
You should already have built an MCP server, registered a tool, and called it from an MCP client. The examples also assume that you are comfortable with asynchronous JavaScript and can read TypeScript. You don't need any previous experience with Tasks.
Have a code editor and two terminals ready. Everything runs locally, so you don't need an API key or an AI application.
| Software | Check | Version needed |
|---|---|---|
| Node.js | node --version | 24.2.0 or newer, below 25 |
| pnpm | pnpm --version | 10 or newer |
This walkthrough targets the 2026-07-28 Tasks extension, whose messages differ from older experimental Tasks examples.
2. Get and install the project
The code for this guide lives in the
all-things-mcp-examples
repository. Copy the start-here folder into a new folder on your machine, then
open it in your editor:
npx degit allthingsmcp/all-things-mcp-examples/build-your-first-mcp-task/start-here build-your-first-mcp-task
cd build-your-first-mcp-taskThen run:
pnpm install --frozen-lockfile
pnpm run fixtures
pnpm run verifyThe first command installs the dependency versions that the project's lockfile specifies: the MCP SDK client and server at 2.4.0, the Tasks extension at 0.2.2, the Node adapter at 2.1.2 and Sharp at 0.35.5. The other two commands generate the input images and then check them. Apart from pnpm's script headers, you should see these lines:
Ready: 6 sample images and 1 deliberate error fixture.
Node 24.21.0; Sharp 0.35.5; 6 images verified.If Sharp fails to load, check your Node version and run the installation again
in this folder. The Sharp installation guide
explains errors that are specific to a platform. If an image is missing, run
pnpm run fixtures again.
The finished project is available if you want to
compare your work, but you only need the start-here folder to build along.
3. Locate the Tasks integration points
Open fixtures/landscape.png to see one of the sample images. The supplied Sharp
function in src/resize-image.ts creates WebP copies of an image at 320, 640 and
1280 pixels wide, and src/thumbnails.ts repeats that for all six images and
records the outputs in manifest.json. These helpers are already written so that
you can concentrate on MCP Tasks.
You will write four files:
| File | What you will implement |
|---|---|
src/app.ts | Tool registration and the Tasks handler hook. |
src/task-handlers.ts | Task creation, status retrieval and cancellation. |
scripts/tasks-client.ts | An MCP client that declares Tasks support and calls the tool. |
src/watch-task.ts | The loop that checks status and returns the result. |
The project also supplies the HTTP wiring, message validation and a file-based
worker and store. These are project helpers whose code you can read, and they are
not extra SDK methods. The files marked TODO are the ones you will complete in
steps 3 and 4.
Checkpoint: the pinned dependencies are installed, and verification finds six
readable input images. broken.png is invalid on purpose. You will use it to
test tool-error handling near the end of the guide.
The commands were checked on macOS arm64 on 31 October 2026. Linux CI is configured but has not been observed running, and Windows is untested. The 53-minute length of this guide is an editorial estimate that still needs a run-through by a developer who is new to Tasks.
Step 2
Ready to continue?
Mark this step complete when you have finished the checks above.
Checking saved progress…

