@soapbucket/mcptest
v1.2.0
Published
mcptest CLI for testing Model Context Protocol servers. Installs the native binary for your platform.
Maintainers
Readme
@soapbucket/mcptest
npm distribution for mcptest, the open-source CLI for testing Model Context Protocol servers.
This package is a thin Node shim. The native binary ships in one of five
platform-specific packages and is selected at install time via npm's
optionalDependencies mechanism (the same pattern esbuild, biome, and
Tailwind use).
Install
npm install -g @soapbucket/mcptestOr run without installing:
npx @soapbucket/mcptest run tests/example.yamlHow the install works
When you run npm install -g @soapbucket/mcptest, npm:
- Resolves the umbrella package above.
- Looks at its
optionalDependencieslist:@soapbucket/mcptest-linux-x64@soapbucket/mcptest-linux-arm64@soapbucket/mcptest-darwin-x64@soapbucket/mcptest-darwin-arm64@soapbucket/mcptest-win32-x64
- Each platform package declares matching
osandcpuconstraints in its ownpackage.json, so npm installs only the one that fits the current machine and silently skips the rest. - The postinstall hook (
scripts/postinstall.js) verifies that exactly one platform package landed. If none did (an unrecognized platform, for example), the wrapper falls back to a one-time binary download under~/.cache/mcptest/bin/on first run.
bin/mcptest.js is the entry point npm wires up via the bin.mcptest
field. It locates the staged binary, sets the executable bit on Unix,
and spawnSyncs it with the caller's argv so signal handling and exit
codes pass through unchanged.
Releasing
The .github/workflows/release-npm.yml workflow handles every release.
On a v* tag push it builds the five platform binaries, packages each
as @soapbucket/mcptest-<platform>, publishes them to npm with
provenance, and finally publishes the umbrella @soapbucket/mcptest
package that references them.
See docs/install/npm.md for the user-facing install guide.
