{"_id":"@drak-marketing/mcp-test-harness","_rev":"10-09ea95f1d9c510b6b5a9985509e132cc","name":"@drak-marketing/mcp-test-harness","dist-tags":{"latest":"0.2.3"},"versions":{"0.2.2":{"name":"@drak-marketing/mcp-test-harness","version":"0.2.2","keywords":["mcp","model-context-protocol","test-harness","vitest","testing"],"author":{"name":"drak-marketing"},"license":"MIT","_id":"@drak-marketing/mcp-test-harness@0.2.2","maintainers":[{"name":"drak-marketing","email":"mark@drakmarketing.com"}],"homepage":"https://github.com/mharnett/mcp-test-harness#readme","bugs":{"url":"https://github.com/mharnett/mcp-test-harness/issues"},"dist":{"shasum":"ec2d923836be63cf9bb4089bb12b1b979edf52ab","tarball":"https://registry.npmjs.org/@drak-marketing/mcp-test-harness/-/mcp-test-harness-0.2.2.tgz","fileCount":53,"integrity":"sha512-ZvbwoN6diXlUf7jya1nF48gqfXivWRCvPB6F08OIM4s4yj37McWhTroO7mTqopWXlMGIuZ9qOAEjew4bbdDIYg==","signatures":[{"sig":"MEYCIQCebaa84CyN947AqdsROXiDVttgEmMxuAEmWptRr14xRQIhAKz7qgC/fGRYOSlc+fV96ocJu7/FmXZh6r1FW71cFK8H","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89143},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"da3b4069a1623ccbcbd6d6bff59dd08686e7d31c","scripts":{"test":"vitest run","build":"tsc","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"drak-marketing","email":"mark@drakmarketing.com"},"repository":{"url":"git+https://github.com/mharnett/mcp-test-harness.git","type":"git"},"_npmVersion":"10.9.8","description":"Shared test harness for MCP server repos. Parameterized test suites for build integrity, smoke tests, protocol conformance, security, and more.","directories":{},"_nodeVersion":"22.22.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.3.0","@types/node":"^20.10.0"},"peerDependencies":{"vitest":">=3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-test-harness_0.2.2_1788923696287_0.848325375267436","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@drak-marketing/mcp-test-harness","version":"0.2.3","description":"Shared test harness for MCP server repos. Parameterized test suites for build integrity, smoke tests, protocol conformance, security, and more.","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc","test":"vitest run","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"keywords":["mcp","model-context-protocol","test-harness","vitest","testing"],"author":{"name":"drak-marketing"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/mharnett/mcp-test-harness.git"},"publishConfig":{"access":"public"},"peerDependencies":{"vitest":">=3.0.0"},"devDependencies":{"@types/node":"^20.10.0","typescript":"^5.3.0","vitest":"^4.0.18"},"gitHead":"5259b8d9e4e63bc7cbe8e3a8a9c9cd1028d1c5fa","_id":"@drak-marketing/mcp-test-harness@0.2.3","bugs":{"url":"https://github.com/mharnett/mcp-test-harness/issues"},"homepage":"https://github.com/mharnett/mcp-test-harness#readme","_nodeVersion":"20.20.2","_npmVersion":"11.19.1","dist":{"integrity":"sha512-cfZHAtW7JMvclpGYlR2Ut9voViKL6+EMrTCeyoCnCGmjjDspQmLIyLvD+hmd/Wa5XPz3aHwlrkzH+qVgbYB7Vw==","shasum":"b0f0df59ecda0b008136bf966d53dad3d453e0d9","tarball":"https://registry.npmjs.org/@drak-marketing/mcp-test-harness/-/mcp-test-harness-0.2.3.tgz","fileCount":53,"unpackedSize":89143,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD9gsw4+tC8Km7wM/JGsHTZPLuNUg9tCzQEmM0MD+4bzAIhANoer9IiNYGM0a3si4dCl8hhji/i51c/S2mjdT0zOPBL"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d9481e64-ea52-4c44-8a38-d25abbce0979"}},"directories":{},"maintainers":[{"name":"drak-marketing","email":"mark@drakmarketing.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-test-harness_0.2.3_1788924059738_0.8818099620270907"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-09T03:14:56.132Z","modified":"2026-09-09T03:20:59.989Z","0.1.0":"2026-04-17T01:26:54.477Z","0.1.1":"2026-04-17T01:31:33.516Z","0.1.2":"2026-04-17T01:34:32.075Z","0.2.0":"2026-04-17T21:37:37.838Z","0.1.3":"2026-09-04T02:03:37.980Z","0.2.1":"2026-09-04T04:09:30.399Z","0.2.2":"2026-09-09T03:14:56.438Z","0.2.3":"2026-09-09T03:20:59.870Z"},"bugs":{"url":"https://github.com/mharnett/mcp-test-harness/issues"},"author":{"name":"drak-marketing"},"license":"MIT","homepage":"https://github.com/mharnett/mcp-test-harness#readme","keywords":["mcp","model-context-protocol","test-harness","vitest","testing"],"repository":{"type":"git","url":"git+https://github.com/mharnett/mcp-test-harness.git"},"description":"Shared test harness for MCP server repos. Parameterized test suites for build integrity, smoke tests, protocol conformance, security, and more.","maintainers":[{"name":"drak-marketing","email":"mark@drakmarketing.com"}],"readme":"# @drak-marketing/mcp-test-harness\n\nShared test harness for MCP server repos. One call registers 40+ parameterized\ntests covering build integrity, smoke, protocol conformance, credential\nsecurity, resilience, and adversarial inputs.\n\n## Install\n\n```bash\nnpm install --save-dev @drak-marketing/mcp-test-harness vitest\n```\n\n`vitest` is a peer dependency — your repo supplies its own version.\n\n## Usage\n\nAdd a single test file (e.g. `src/harness.test.ts`) to your MCP server repo:\n\n```ts\nimport { registerMcpTests } from \"@drak-marketing/mcp-test-harness\";\nimport { fileURLToPath } from \"url\";\nimport path from \"path\";\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nregisterMcpTests({\n  name: \"mcp-example\",\n  repoRoot: path.resolve(__dirname, \"..\"),\n  toolPrefix: \"example_\",\n  minTools: 10,\n  requiredTools: [\"example_get_context\", \"example_list_items\"],\n  binEntries: { \"mcp-example\": \"dist/index.js\" },\n  hasAuthCli: false,\n  hasCredentials: true,\n  hasResilience: true,\n  hasPlatform: true,\n  requiredEnvVars: [\"EXAMPLE_API_KEY\"],\n  envPrefix: \"EXAMPLE_\",\n  startupEnv: { EXAMPLE_API_KEY: \"fake-key\" },\n});\n```\n\nRun with your normal vitest command:\n\n```bash\nnpm test\n```\n\n## What you get\n\nSuites are selected based on the capabilities you declare in the config:\n\n- **Always on:** build integrity, smoke, cross-platform, MCP protocol,\n  dependency health, version/publish checks, observability, input\n  sanitization, output contract, concurrency, adversarial (Ralph/Ender/Mayhem)\n- **`hasCredentials: true`** → credential security, token lifecycle,\n  backward-compat\n- **`hasResilience: true`** → network failure scenarios\n- **`requiredEnvVars.length > 0`** → config loading\n- **`startupEnv` provided** → graceful shutdown\n\nSee [`src/types.ts`](src/types.ts) for the full config shape.\n\n## Publishing\n\nPublishing happens in CI via npm **Trusted Publishing** (OIDC). **There is no npm\ntoken to create, store, or rotate** — `.github/workflows/publish.yml` authenticates\nwith a short-lived credential npm issues in exchange for the workflow's OIDC token,\nmatched against the Trusted Publisher registered for this package on npmjs.com\n(GitHub Actions; owner `mharnett`, repo `mcp-test-harness`, workflow `publish.yml`).\n\nTo publish a new version:\n\n1. Bump `version` in `package.json` and merge that to `main`.\n2. Cut a GitHub Release on the matching tag — that fires `publish.yml`:\n\n   ```\n   gh release create v0.2.2 --repo mharnett/mcp-test-harness --generate-notes\n   ```\n\n3. Watch the run: `gh run list --repo mharnett/mcp-test-harness --workflow publish.yml`\n\nIf a Release is created by automation rather than by hand, GitHub suppresses the\ndownstream `release` trigger and the publish silently never runs. Use the manual\nfallback in that case:\n\n```\ngh workflow run publish.yml --repo mharnett/mcp-test-harness -f ref=v0.2.2\n```\n\nTwo pins in `publish.yml` are load-bearing and documented inline — `npm@11`\n(Trusted Publishing needs npm ≥ 11.5, but npm@12 drops Node 20), and the\ndeliberate absence of `--provenance` (attestation requires a public source repo;\nthis one is private). Read the comments before changing either.\n\nDo not add `NPM_TOKEN` or `NODE_AUTH_TOKEN` to this repo. If publishing fails,\nthe OIDC trust is what needs fixing.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}