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/vitestor@mcpjam/widget-react, plan to upgrade them too, to CLI 6,@mcpjam/vitest0.3 and@mcpjam/widget-react0.3, the releases built on SDK 10. - To finish on SDK 12 with CLI 7, Node.js
^22.23.4,^24.22.1or>=26.12.1. CLI 6.1 and later need a narrower range than the SDK.
What changes
Upgrade
Update the packages
@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.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 In CI, store the key as a secret and expose it as Runs go to your default project. To use another one, set
npx:MCPJAM_API_KEY in the job that runs evals. In GitHub Actions: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:- A credential passed in code.
MCPJAM_API_KEY.- The saved CLI login.
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.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.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 Only count
test function calls run() more than once per iteration, set billableSteps to that number: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.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.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.
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.
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 (
agentLooporharness) gets no events even with a saved setting. Also,HOST_STYLE_EVENT_DELIVERY_MODES,hostStyleEventDeliveryModesandclearEventsHostSettingwere removed.resolveHostEventDeliveryModes,subscribableModesandEventsSupportHostchanged too. If your code reads Events delivery modes, including throughsubscribableModes, save an explicit Events setting for each client you use.MCPClientManager.executeToolalso stops and throws when it can’t read the tool’s schema (thetools/listrequest times out, is cancelled or disconnects), instead of sending the call anyway. - SDK 12: the table that maps operations to plan features changed, and
OperationFeatureis now a single key ornull. This affects code that callsisOperationAvailableor usesPLATFORM_FEATURE_KEYSorOperationFeature. 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.
Unchanged
Connecting servers,HostRunner and HostRuntime, EvalTest and EvalSuite assertions, matching options, reporting, and the minimum Node.js version work as in SDK 9.
