SkillAgentSearch skills...

testing-mcp

Let LLMs author your integration tests—E2E-style.

Install / Use

claude mcp add mcpland -- npx -y github:mcpland/testing-mcp

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
🔌

MCP Server

Model Context Protocol server

Quality Score

78/100

Supported Platforms

Claude Code
Claude Desktop

Our assessment of testing-mcp

testing-mcp scores 78/100 on our quality scale, 808th of 965 AI & Machine Learning skills we index.

Its MCP Server is 24 KB long, well organised into 64 sections with 23 code examples: a thorough specification that gives an agent plenty to work with.

It has 10 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
30/30
Structure
20/20
Description
8/15
Adoption
4/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated yesterday, so testing-mcp is actively maintained.
  • Our last check on 2026-10-22 found the source still online.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

testing-mcp compared with similar skills

All 4 of these similar skills score higher than testing-mcp; compare them before choosing.

SkillScoreStarsUpdatedFormat
testing-mcp (this skill)by mcpland78101d agoMCP Server
claude-memby thedotmack100113.5ktodayCLAUDE.md
Agent-Reachby Panniantong100109.2ktodayCLAUDE.md
Understand-Anythingby Egonex-AI10090.9k10d agoCLAUDE.md
headroomby headroomlabs-ai10078.9ktodayCLAUDE.md

Frequently asked questions

How do I install testing-mcp?
Run claude mcp add mcpland -- npx -y github:mcpland/testing-mcp. The install tabs above show the steps for each supported agent.
Which AI agents does testing-mcp work with?
It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
Is testing-mcp safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is testing-mcp still maintained?
The repository was last updated yesterday, so testing-mcp is actively maintained.

Testing MCP

Node CI npm license

Write complex integration tests with AI - AI assistants see your live page structure, execute code, and iterate until tests work

Table of Contents

Quick Start

Step 1: Install

npm install -D testing-mcp

Step 2: Configure Model Context Protocol (MCP) server (e.g., in Claude Desktop config):

{
  "testing-mcp": {
    "command": "npx",
    "args": ["-y", "testing-mcp@latest"]
  }
}

Step 3: Connect from your test:

import { render, screen, fireEvent } from "@testing-library/react";
import { connect } from "testing-mcp";

it("your test", async () => {
  render(<YourComponent />);
  await connect({
    context: { screen, fireEvent },
  });
}, 600000); // 10 minute timeout for AI interaction

Step 4: Run with MCP enabled:

Prompt:

Please run the persistent test in the `examples/react-jest` directory:

`TESTING_MCP=true RTL_SKIP_AUTO_CLEANUP=true npm test test/App.test.tsx`

Then, use the `testing-mcp` tool to write the test by following these steps:

1. Click the button displaying "count is 0".
2. Verify that the button text changes to "count is 1".
3. Write the test code to a file.

Now your AI assistant can see the page structure, execute code in the test, and help you write assertions.

Why Testing MCP

Traditional test writing is slow and frustrating:

  • Write → Run → Read errors → Guess → Repeat - endless debugging cycles
  • Add console.log statements manually - slow feedback loop
  • AI assistants can't see your test state - you must describe everything
  • Must manually explain available APIs - AI generates invalid code

Testing MCP solves this by giving AI assistants live access to your test environment:

  • AI sees actual page structure (DOM), console logs, and rendered output
  • AI executes code directly in tests without editing files
  • AI knows exactly which testing APIs are available (screen, fireEvent, etc.)
  • You iterate faster with real-time feedback instead of blind guessing

What Testing MCP Does

🔍 Real-Time Test Inspection

View live page structure snapshots, console logs, and test metadata through MCP tools. No more adding temporary console.log statements or running tests repeatedly.

🎯 Remote Code Execution

Execute JavaScript/TypeScript directly in your running test environment. Test interactions, check page state, or run assertions without modifying test files.

🧠 Smart Context Awareness

Automatically collects and exposes available testing APIs (like screen, fireEvent, waitFor) with type information and descriptions. AI assistants know exactly what's available and generate valid code on the first try.

await connect({
  context: { screen, fireEvent, waitFor },
  contextDescriptions: {
    screen: "React Testing Library screen with query methods",
    fireEvent: "Function to trigger DOM events",
  },
});

🔄 Session Management

Reliable WebSocket connections with session tracking, reconnection support, and automatic cleanup. Multiple tests can connect simultaneously.

🚫 Zero CI Overhead

Automatically disabled in continuous integration (CI) environments. The connect() call becomes a no-op when TESTING_MCP is not set(particularly utilised hooks), so your tests run normally in production.

🤖 AI-First Design

Built specifically for AI assistants and the Model Context Protocol. Provides structured metadata, clear tool descriptions, and predictable responses optimized for AI understanding.

🔀 Multi-Client Support

Run multiple MCP clients simultaneously (Claude Desktop, Cursor, VS Code, etc.) without port conflicts. The daemon architecture automatically manages connections and port allocation.

Installation

Install dependencies and build the project before launching the MCP server or consuming the client helper.

npm install -D testing-mcp
# or
yarn add -D testing-mcp
# or
pnpm add -D testing-mcp

Node 18+ is required because the project uses ES modules and the WebSocket API.

Configure MCP Server

Add the MCP server to your AI assistant's configuration (e.g., Claude Desktop, VSCode, etc.):

{
  "testing-mcp": {
    "command": "npx",
    "args": ["-y", "testing-mcp@latest"]
  }
}

The server automatically discovers and connects to the bridge daemon, which manages WebSocket connections on dynamically assigned ports.

Connect From Tests

Import the client helper in your Jest or Vitest suites hook to expose the page state to the MCP server.

Example Jest setup file(setupFilesAfterEnv)

// jest.setup.ts
import { screen, fireEvent } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { connect } from "testing-mcp";

const timeout = 10 * 60 * 1000;

if (process.env.TESTING_MCP) {
  jest.setTimeout(timeout);
}

afterEach(async () => {
  if (!process.env.TESTING_MCP) return;
  const state = expect.getState();
  await connect({
    filePath: state.testPath,
    context: {
      userEvent,
      screen,
      fireEvent,
    },
  });
}, timeout);

It also supports usage in test files:

// example.test.tsx
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { connect } from "testing-mcp";

it(
  "logs the dashboard state",
  async () => {
    render(<Dashboard />);
    await connect({
      filePath: import.meta.url,
      context: {
        screen,
        fireEvent,
        userEvent,
        waitFor,
      },
      // Optional: provide descriptions to help LLMs understand the APIs
      contextDescriptions: {
        screen: "React Testing Library screen with query methods",
        fireEvent: "Synchronous event triggering function",
        userEvent: "User interaction simulation library",
        waitFor: "Async utility for waiting on conditions",
      },
    });
  },
  1000 * 60 * 10
);

Set TESTING_MCP=true locally to enable the bridge. The helper no-ops when the variable is missing or the tests run in continuous integration.

If the DOM has been automatically cleared after the afterEach hook executes, please set RTL_SKIP_AUTO_CLEANUP=true.

MCP Tools

Once connected, your AI assistant can use these tools:

| Tool | Purpose | When to Use | | ------------------------ | ------------------------------------------------------ | --------------------------------------------------- | | get_current_test_state | Fetch current page structure, console logs, and APIs | Inspect what's rendered and what APIs are available | | execute_test_step | Run JavaScript/TypeScript code in the test environment | Trigger interactions, check state, run assertions | | finalize_test | Remove connect() call and clean up test file | After test is complete and working | | list_active_tests | Show all connected tests with timestamps | See which tests are available | | get_generated_code | Extract code blocks inserted by the helper | Audit what code was added |

get_current_test_state

Returns the current test state including:

  • Page structure snapshot: Current rendered HTML (DOM)
  • Console logs: Captured console output
  • Test metadata: Test file path, test name, session ID
  • Available context: List of all APIs/variables available in execute_test_step, including their types, signatures, and descriptions

Response includes availableContext field:

{
  "availableContext": [
    {
      "name": "screen",
      "type": "object",
      "description": "React Testing Library screen object"
    },
    {
      "name": "fireEvent",
      "type": "function",
      "signature": "(element, event) => ...",
      "description": "Function to trigger DOM events"
    }
  ]
}

execute_test_step

Executes JavaScript/TypeScript code in the connected test client. The code can use any APIs listed in the availableContext field from get_current_test_state.

Best Practice: Always call get_current_test_state first to check which APIs are available before using execute_test_step.

Context and Available APIs

Inject testing utilities so AI knows what's available:

The connect() function accepts a context object that exposes APIs to the test execution environment. This allows AI assistants to know exactly what APIs are available when generating code.

Basic Usage

await connect({
  context: {
    screen, // React Testing Library queries
    fireEvent, // DOM event triggering
    userEvent, // User interaction simulation
    waitFor, // Async waiting utility
  },
});

Adding Descriptions (Recommended)

Provide descriptions for each context key to help AI understand what's available:

await connect({
  context: {
    screen,
    fireEvent,
    waitFor,
    customHelper: async (text: string) => {
      const button = screen.getByText(text);
      fireEvent.click(button);
      await waitFor(() => {});
    },
  },
  contextDescriptions: {
    screen: "Query methods like getByText, findByRole, etc.",
    fireEvent: "Trigger DOM events: click, change, etc.",
    waitFor: "Wait for assertions: waitFor(() => expect(...).toBe(...))",
    customHelper: "async (text: string) => void - Clicks button by text",
  },
});

How it works: The client collects metadata (name, type, function signature) for each context key. When AI calls get_current_test_state, it receives the full list of available APIs with their metadata, enabling accurate code generation.

Multi-Client Architecture

Testing MCP v0.4.0 introduces a Daemon + Adapter architecture that allows multiple MCP clients to work simultaneously without port conflicts.

How It Works

┌─────────────────────────────────────────────────────────────────┐
│  MCP Client A (Claude Desktop)                                  │
│         ↓                                                       │
│  testing-mcp serve (Adapter A) ──┐                              │
└─────────────────────────────────────────────────────────────────┘
                                   │
┌─────────────────────────────────────────────────────────────────┐
│  MCP Client B (Cursor)                                          │
│         ↓                                                       │
│  testing-mcp serve (Adapter B) ──┼── RPC ──→ Bridge Daemon      │
└─────────────────────────────────────────────────────────────────┘
                                   │          (Single Instance)
┌─────────────────────────────────────────────────────────────────┘
│  MCP Client C (VS Code)                                         │
│         ↓                                                       │
│  testing-mcp serve (Adapter C) ──┘               │              │
└─────────────────────────────────────────────────────────────────┘
                                                   ↓
                                      

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars10
CategoryAI
Updated1d ago
Forks1

Languages

TypeScript

Trust signals

92/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 low1 info
testing-mcp — MCP Server: Install & Safety Check | SkillAgent