Environment:1mcp app Agent TypeScript Protocol Fixture
| Knowledge Sources | |
|---|---|
| Domains | Testing, Protocol_Conformance |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
Node.js >= 20.19 with pnpm and multiple MCP SDK era dependencies — required for the TypeScript peer fixture in the MCP protocol regression suite.
Description
The TypeScript peer fixture lives in `test/conformance/fixtures/typescript/` and has its own independent `package.json` and frozen `pnpm-lock.yaml`. It depends on multiple MCP SDK versions (`@modelcontextprotocol/client` 2.3.1, `@modelcontextprotocol/sdk` 1.30.0, `@modelcontextprotocol/server` 2.3.0) to test cross-era interoperability. The fixture implements MCP server behaviors across SDK "eras" (v1 and v2) via `src/eras/v1.mjs` and `src/eras/v2.mjs`. The `engines` field requires Node >= 20.19.0. Tests use Node's built-in test runner (`node --test`).
Usage
Use this environment when running protocol regression tests that exercise the TypeScript peer fixture. The suite is invoked via `pnpm test:protocol`, which runs `pnpm check` in the fixture directory (syntax check + `node --test`). This environment is not needed for ordinary `pnpm check`.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux, macOS, or Windows | CI runs on Ubuntu 24.04 |
| Node.js | >= 20.19.0 | Pinned in fixture `package.json` `engines`; CI uses `.node-version` (24) |
| pnpm | 12.10.1 | Same as main repo |
| Disk | 200MB | Independent node_modules for fixture |
Dependencies
System Packages
- `node` >= 20.19.0
- `pnpm` = 12.10.1
npm Packages
- `@modelcontextprotocol/client` = 2.3.1
- `@modelcontextprotocol/node` = 2.1.2
- `@modelcontextprotocol/sdk` = 1.30.0 (legacy era)
- `@modelcontextprotocol/server` = 2.3.0
- `@modelcontextprotocol/server-legacy` = 2.3.1
- `zod` = 4.6.6
Credentials
No credentials required. The TypeScript fixture runs locally with isolated temporary configurations and subprocesses.
Quick Install
# Install the TypeScript fixture dependencies (frozen)
pnpm --dir test/conformance/fixtures/typescript install --frozen-lockfile
# Run the TypeScript fixture self-check
pnpm --dir test/conformance/fixtures/typescript self-check
# Run the full protocol regression suite
pnpm test:protocol
Code Evidence
Engine requirement from `test/conformance/fixtures/typescript/package.json:19-21`:
"engines": {
"node": ">=20.19.0"
},
"packageManager": "pnpm@12.10.1"
Protocol suite invocation from `scripts/run-protocol.mjs:11`:
['pnpm', ['check'], path.join(fixtureRoot, 'typescript')],
SDK era fixtures from `test/conformance/fixtures/typescript/src/eras/v1.mjs` and `v2.mjs`:
// v1.mjs — legacy SDK era conformance peer
// v2.mjs — modern SDK era conformance peer
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `ERR_PNPM_PEER_DEP_ISSUES` === Fixture lockfile out of sync === Run `pnpm --dir test/conformance/fixtures/typescript install --frozen-lockfile` | ||
| `SyntaxError: Unexpected token` in fixture === Node.js < 20.19 === Upgrade to Node >= 20.19.0 (CI uses 24) | ||
| `self-check failed: SDK version mismatch` === Installed SDK versions differ from lockfile === Reinstall with `--frozen-lockfile` |
Compatibility Notes
- Independent lockfile: The TypeScript fixture has its own `pnpm-lock.yaml`, fully independent from the main repo lockfile. SDK versions may differ slightly (e.g., `@modelcontextprotocol/server` is 2.3.0 here vs 2.3.1 in the main repo).
- Node built-in test runner: Fixture tests use `node --test` (not vitest), so they can run without the main repo's dev dependencies.
- Era separation: The `v1.mjs` and `v2.mjs` files simulate different MCP SDK generations for cross-era interoperability testing.