@testledger/mcp 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +71 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
+ // Test Results MCP Server
5
6
  // Configuration from environment
6
7
  const API_BASE_URL = process.env.TEST_LEDGER_API_URL;
7
8
  const API_KEY = process.env.TEST_LEDGER_API_KEY || "";
@@ -256,6 +257,70 @@ const tools = [
256
257
  required: ["spec_file"],
257
258
  },
258
259
  },
260
+ {
261
+ name: "get_failure_screenshots",
262
+ description: "Get screenshots from recent test failures. Returns presigned S3 URLs that can be viewed with the Read tool to see exactly what the UI looked like when the test failed.",
263
+ inputSchema: {
264
+ type: "object",
265
+ properties: {
266
+ spec_file: {
267
+ type: "string",
268
+ description: "The spec file path (e.g., 'login.spec.js')",
269
+ },
270
+ test_title: {
271
+ type: "string",
272
+ description: "Specific test title to filter by (optional)",
273
+ },
274
+ project_id: {
275
+ type: "number",
276
+ description: "Project ID to filter by (optional)",
277
+ },
278
+ days: {
279
+ type: "number",
280
+ description: "Days to look back (default: 7)",
281
+ default: 7,
282
+ },
283
+ limit: {
284
+ type: "number",
285
+ description: "Maximum screenshots to return (default: 10)",
286
+ default: 10,
287
+ },
288
+ },
289
+ required: ["spec_file"],
290
+ },
291
+ },
292
+ {
293
+ name: "get_consecutive_failures",
294
+ description: "Get tests that are failing consecutively (broken tests, not flaky). Returns tests where the last 2+ runs have failed, with timing info (last_passed_date, first_failed_date) useful for identifying which merge broke them.",
295
+ inputSchema: {
296
+ type: "object",
297
+ properties: {
298
+ project_id: {
299
+ type: "number",
300
+ description: "Project ID to filter by (optional)",
301
+ },
302
+ version: {
303
+ type: "string",
304
+ description: "Version to filter by (e.g., '12.1.0'). If not provided, uses latest version.",
305
+ },
306
+ days: {
307
+ type: "number",
308
+ description: "Days to look back (default: 10)",
309
+ default: 10,
310
+ },
311
+ min_consecutive_failures: {
312
+ type: "number",
313
+ description: "Minimum number of consecutive failures to include (default: 2)",
314
+ default: 2,
315
+ },
316
+ limit: {
317
+ type: "number",
318
+ description: "Maximum results to return (default: 50)",
319
+ default: 50,
320
+ },
321
+ },
322
+ },
323
+ },
259
324
  ];
260
325
  // Create the server
261
326
  const server = new Server({
@@ -297,6 +362,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
297
362
  case "get_test_trend":
298
363
  result = await apiCall("/tests/trend", args);
299
364
  break;
365
+ case "get_failure_screenshots":
366
+ result = await apiCall("/tests/failure-screenshots", args);
367
+ break;
368
+ case "get_consecutive_failures":
369
+ result = await apiCall("/tests/consecutive-failures", args);
370
+ break;
300
371
  default:
301
372
  throw new Error(`Unknown tool: ${name}`);
302
373
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testledger/mcp",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "MCP server for Test Ledger - analyze flaky tests with Claude Code",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",