Skip to main content
SDK 10 changes how an eval run starts. Every eval run now needs an MCPJam login or an organization API key, even when you bring your own model key or turn off result uploads, and MCPJam takes a platform payment for each iteration before it runs. Your test code changes only if a test sends more than one prompt per iteration. This guide upgrades from SDK 9. If you are on an older version, first follow Migrating to SDK 9. SDK 11 and 12 add smaller changes; see After SDK 10.

Before you start

  • Node.js 22 or later (node --version). SDK 10 has the same requirement as SDK 9.
  • An MCPJam account in the organization whose project the runs belong to.
  • For CI, an organization API key (sk_…). Create one in MCPJam under Settings → API keys, or ask an organization admin.
  • If you use @mcpjam/cli, @mcpjam/vitest or @mcpjam/widget-react, plan to upgrade them too, to CLI 6, @mcpjam/vitest 0.3 and @mcpjam/widget-react 0.3, the releases built on SDK 10.
  • To finish on SDK 12 with CLI 7, Node.js ^22.23.4, ^24.22.1 or >=26.12.1. CLI 6.1 and later need a narrower range than the SDK.

What changes

Upgrade

1

Update the packages

If you use them, pin the CLI, the Vitest integration and @mcpjam/widget-react to the releases built on SDK 10, wherever CI installs them. Later releases run on SDK 11 or 12, so a version range would test a newer SDK than the one you’re upgrading to. Commit the updated lockfile.
npm ls @mcpjam/sdk shows only 10.x.
2

Give the SDK a credential

On your own machine, sign in once with the CLI. The SDK reads the saved login. If you didn’t install the CLI in the previous step, run it through npx:
In CI, store the key as a secret and expose it as MCPJAM_API_KEY in the job that runs evals. In GitHub Actions:
Runs go to your default project. To use another one, set MCPJAM_PROJECT_ID in the same job, or pass mcpjam.project in the run options.You can also pass a key in code with the mcpjam.apiKey run option. The SDK uses the first credential it finds, in this order:
  1. A credential passed in code.
  2. MCPJAM_API_KEY.
  3. The saved CLI login.
The top-level apiKey and mcpjamAuth run options also start a run. Pass only one of them. They don’t turn on uploads by themselves, but if MCPJAM_API_KEY is also set, results still upload (see the warning below). A credential that is set but invalid fails the run. The SDK never falls back to the next one, and it never opens a browser to sign in during CI.
When MCPJAM_API_KEY or mcpjam.apiKey is set, the SDK uploads results to MCPJam. If you ran with uploads off on SDK 9, keep them off with mcpjam: { enabled: false } in the run options. The run still uses the key to start.
With the CLI login, the login command finished without an error. With the environment variable, test -n "$MCPJAM_API_KEY" succeeds in the eval job. For every method, including a credential passed in code, Run one test confirms access.
3

Declare tests that send more than one prompt

MCPJam charges each iteration for the number of prompts it declares. The default is one. If a test’s test function calls run() more than once per iteration, set billableSteps to that number:
Only count run() calls in your code. Tool calls and model steps inside one run() don’t add prompts. Suite files and authored cases count their prompt steps for you.
Every test whose test function calls run() more than once declares billableSteps equal to the number of calls.
4

Run one test

Take one test and the executor (HostRunner or HostRuntime) your suite already uses, and run it with one iteration to confirm the run starts and is paid. Pass the run options your suite already uses and change only iterations, so settings such as mcpjam: { enabled: false } still apply:
The run finishes and logs 1 followed by 1 or 0, with no EvalRunStartError or EvalBillingError.
5

Run your suite

Run your suite as you did on SDK 9. Assertions and results behave the same.
The suite passes and fails the same cases as on SDK 9.
6

Move to the current version

SDK 11 and 12 need no code changes for most projects; see After SDK 10. To finish on the current version:
Install only the packages you use. CLI 7 requires Node.js ^22.23.4, ^24.22.1 or >=26.12.1; check node --version first. CLI 7 also removes mcpjam cloud environments: run evals with mcpjam cloud eval run --server instead. Commit the updated lockfile.
npm ls @mcpjam/sdk shows only 12.x, and your suite still passes.

If something goes wrong

What the run start sends

Before a run, the SDK sends MCPJam:
  • Your credential.
  • Any MCPJam API headers you configured.
  • The project, the package version and which one started the run (SDK, CLI or Vitest), a run ID, and the planned number of iterations.
  • Which model providers the run uses, and whether it uses a client profile.
It sends no prompts, model outputs, tool calls or server URLs. If MCPJam hosts the model, prompts still go through MCPJam to the model, as in SDK 9. Turning off analytics (DO_NOT_TRACK, MCPJAM_TELEMETRY_DISABLED) doesn’t turn off this request. Results stay local unless uploads are on. Retries of a failed iteration reuse its payment. If a test sends fewer prompts than it declared, the difference isn’t refunded automatically.

After SDK 10

Most projects need no changes for SDK 11 and 12. Check these if your code uses the APIs they name.
  • SDK 11: a client’s MCP Events delivery modes come from its saved setting. A client with no saved Events setting, or one that can’t be read, now gets no delivery modes, and a vendor harness (agentLoop or harness) gets no events even with a saved setting. Also, HOST_STYLE_EVENT_DELIVERY_MODES, hostStyleEventDeliveryModes and clearEventsHostSetting were removed. resolveHostEventDeliveryModes, subscribableModes and EventsSupportHost changed too. If your code reads Events delivery modes, including through subscribableModes, save an explicit Events setting for each client you use. MCPClientManager.executeTool also stops and throws when it can’t read the tool’s schema (the tools/list request times out, is cancelled or disconnects), instead of sending the call anyway.
  • SDK 12: the table that maps operations to plan features changed, and OperationFeature is now a single key or null. This affects code that calls isOperationAvailable or uses PLATFORM_FEATURE_KEYS or OperationFeature. Also, progressive tool discovery is now on in the ChatGPT, Cursor CLI, Grokbot and Notion client presets, so evals that use them can see a different set of tools. Turn it off in the client to keep the old behavior.
The full list is in the SDK changelog.

Unchanged

Connecting servers, HostRunner and HostRuntime, EvalTest and EvalSuite assertions, matching options, reporting, and the minimum Node.js version work as in SDK 9.