@mcpjam/sdk weekly downloads statistics
By mcpjam (2 listings) · npm · MCP servers
MCP server unit testing, end to end (e2e) testing, and server evals
@mcpjam/sdk has 33,333 recorded weekly downloads on npm, an increase of 81.9% over the past 30 days, ranking #664 of 2,322 tracked listings.
About @mcpjam/sdk
@mcpjam/sdk
Use the MCPJam SDK to write unit tests and evals for your MCP server.
Installation
npm install @mcpjam/sdk
Compatible with your favorite testing framework like Jest and Vitest
Quick Start
Unit Test
Test the individual parts, request response flow of your MCP server. MCP unit tests are deterministic.
import { MCPClientManager, assertCallToolResult } from "@mcpjam/sdk";
describe("Everything MCP example", () => {
let manager: MCPClientManager;
beforeAll(async () => {
manager = new MCPClientManager();
await manager.connectToServer("everything", {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-everything"],
});
});
afterAll(async () => {
await manager.disconnectServer("everything");
});
test("server has expected tools", async () => {
const tools = await manager.listTools("everything");
expect(tools.tools.map((t) => t.name)).toContain("get-sum");
});
test("get-sum tool returns correct result", async () => {
// `executeTool` can also resolve to a task envelope, and a content block
// can be an image or a resource, so narrow both before reading the text.
const result = assertCallToolResult(
await manager.executeTool("everything", "get-sum", { a: 2, b: 3 }),
);
const [block] = result.content;
if (block.type !== "text") throw new Error("Expected a text block");
expect(block.text).toBe("The sum of 2 and 3 is 5.");
});
});
MCP evals
Test that an LLM correctly understands how to use your MCP server. Evals are non-deterministic and multiple runs are needed.
Heads up: renames in 1.11.
TestAgent→HostRunner,EvalAgent→HostExecutor,.prompt()→.run(),Host.addServer()→Host.requireServer(). No deprecation aliases. See the changelog for the codemod.
import { MCPClientManager, HostRunner, EvalTest } from "@mcpjam/sdk";
describe("Asana MCP Evals", () => {
let manager: MCPClientManager;
let runner: HostRunner;
beforeAll(async () => {
manager = new MCPClientManager();
await manager.connectToServer("asana", {
url: "https://mcp.asana.com/sse",
requestInit: {
headers: { Authorization: `Bearer ${process.env.ASANA_TOKEN}` },
},
});
runner = new HostRunner({
tools: await manager.getToolsForAiSdk(["asana"]),
model: "openai/gpt-4o",
apiKey: process.env.OPENAI_API_KEY!,
});
});
afterAll(async () => {
await manager.disconnectServer("asana");
});
// Single-turn eval
test("list workspaces > 80% accuracy", async () => {
const evalTest = new EvalTest({
id: "c_list_workspaces",
name: "list-workspaces",
test: async (runner) => {
const result = await runner.run("Show me all my Asana workspaces");
return result.hasToolCall("asana_list_workspaces");
},
});
await evalTest.run(runner, {
iterations: 10,
onFailure: (report) => console.error(report), // Print the report when a test iteration fails.
});
expect(evalTest.accuracy()).toBeGreaterThan(0.8); // Pass threshold
});
// Multi-turn eval
test("get user then list projects > 80% accuracy", async () => {
const evalTest = new EvalTest({
id: "c_user_then_projects",
name: "user-then-projects",
test: async (runner) => {
const r1 = await runner.run("Who am I in Asana?");
if (!r1.hasToolCall("asana_get_user")) return false;
const r2 = await runner.run("Now list my projects", {
context: [r1],
}); // Continue the conversation from the previous prompt
return r2.hasToolCall("asana_get_projects");
},
});
await evalTest.run(runner, {
iterations: 5,
onFailure: (report) => console.error(report),
});
expect(evalTest.accuracy()).toBeGreaterThan(0.8);
});
// Validating tool arguments
test("search tasks passes correct workspace_gid", async () => {
const evalTest = new EvalTest({
id: "c_search_args",
name: "search-args",
test: async (runner) => {
const result = await runner.run(
"Search for tasks containing 'bug' in my workspace"
);
const args = result.getToolArguments("asana_search_tasks");
return (
result.hasToolCall("asana_search_tasks") &&
typeof args?.workspace_gid === "string"
);
},
});
await evalTest.run(runner, {
iterations: 5,
onFailure: (report) => console.error(report),
});
expect(evalTest.accuracy()).toBeGreaterThan(0.8);
});
});
Host + HostRuntime: bring your own runtime
Host is the portable host-configuration spec — the same object the MCPJam Inspector uses to drive its Playground and eval suites. You can build one in your own code and run evals against it, so the inspector and your CI exercise the same host behavior (style, model, MCP profile, sandbox/permission policy, OpenAI-Apps compat, tool-visibility policy, etc.).
import { MCPClientManager, Host, EvalTest } from "@mcpjam/sdk";
const manager = new MCPClientManager();
await manager.connectToServer("everything", {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-everything"],
});
// Build the spec — Host is just an editable wrapper around the canonical JSON.
const host = new Host({
style: "mcpjam",
model: "openai/gpt-4o",
systemPrompt: "You are a helpful assistant.",
}).requireServer("everything");
// Bind the spec to a live MCP manager. `apiKey` lives on the runtime, not per-call.
const runtime = host.withManager(manager, {
apiKey: process.env.OPENAI_API_KEY!,
});
const evalTest = new EvalTest({
id: "c_add",
name: "add",
test: async (runner) => (await runner.run("Add 2 and 3")).hasToolCall("add"),
});
await evalTest.run(runtime, { iterations: 10 });
```…
Description from the npm listing.
- mcp
- model-context-protocol
- testing
- evals
- unit-testing
- e2e
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (122)Similar npm MCP servers plugins
All 20 @mcpjam/sdk alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@mcpjam/sdk. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.