Skip to content

MCP Server and AI Tools

Please note that this feature is available in VS Code (and its forks) only.

Wallaby’s AI tools and MCP (Model Context Protocol) server integrate with various AI agents, providing real-time runtime context from your codebase and test environment. These tools deliver detailed insights that significantly enhance agent capabilities for analyzing, generating, debugging, and improving code.

Wallaby AI tools and MCP server support Copilot Agent, Cursor, Windsurf, Cline, RooCode, and many other AI agents, enabling them to access Wallaby’s rich runtime insights on demand.

Wallaby AI tools in action

Getting Started

Simply use the Wallaby: Open MCP Settings command in your editor to enable Wallaby MCP server. Once enabled, start Wallaby by running the Wallaby.js: Start command from the command palette and try one of our example prompts.

How It Works

Without Wallaby, AI agents operate with limited context. They can only access generic CLI output from test runners or basic IDE problem lists and test panels. This surface-level information lacks depth for understanding code behavior, execution paths, and runtime relationships.

Agent inefficient workflow without Wallaby

This limitation creates a significant gap in the agent’s ability to debug complex issues, or generate high-quality code/tests that require deeper runtime insights.


With Wallaby’s MCP server and AI tools, agents gain access to a comprehensive, live model of your codebase and test execution environment. This enhanced context includes:

  • Real-time runtime values without modifying code
  • Complete execution paths for specific tests or entire projects
  • Branch-level code coverage analytics
  • Detailed code dependency graphs
  • Test snapshot management capabilities
Agent efficient workflow with Wallaby

This wealth of contextual information dramatically improves the agent’s ability to analyze, debug, and create code—similar to how a developer with greater insights can solve problems more effectively.

Tools

Wallaby’s MCP server provides AI agents with these powerful tools to access comprehensive runtime context:

Tests

Access test information including status, errors, logs, and code coverage. The agent can retrieve:

  • Lists of failing or all tests
  • Tests for specific files, lines, or source files
  • Detailed test errors and logs
  • Aggregated code coverage data
  • Global application errors

Example applications:

  • Retrieve failing tests to prioritize debugging efforts
  • Analyze specific tests to understand execution paths and identify issues

Runtime Values

Access any runtime value in your codebase without modifying code by evaluating any valid code expression such as variables, object states, or function return values.

Values can be requested for all tests or filtered to specific test contexts.

Example applications:

  • Debug by examining variable states at specific execution points
  • Verify expected behaviors by comparing actual vs. expected values
  • Understand data transformations through execution flows

Code Coverage

Access detailed branch-level coverage analytics to:

  • Identify execution paths for specific tests
  • Map relationships between tests and source code
  • Pinpoint uncovered code areas needing additional tests

Example applications:

  • Analyze execution paths by examining covered lines for specific tests
  • Find tests affected by code changes by identifying which tests cover specific lines
  • Determine test dependencies when refactoring or enhancing features

Snapshot Management

Update test snapshots to match recent code changes, ensuring:

  • Tests remain current with evolving implementations
  • Snapshots accurately reflect expected outputs

Example applications:

  • Update snapshots for specific tests after intentional implementation changes
  • Batch update snapshots across test files or entire project

Example Use Cases

You can leverage Wallaby’s runtime context to perform a variety of tasks with your AI agent. Here are some example prompts categorized by common use cases:

Fix Failing Tests

  • Fix all failing tests, check runtime values first to see what is wrong
  • Fix test under cursor, check coverage before and after the fix
  • Fix tests covering foo.ts or bar function, update snapshots if needed

Create New Tests

  • Add tests for uncovered lines of the file, verify added test coverage and overall coverage after
  • Find tests for function under cursor using Wallaby coverage tools, suggest new tests for uncovered lines

Analyze, Plan, and Learn the Codebase

  • Analyze coverage of test under cursor
  • What tests are affected by my current code changes?
  • Debug failing test using runtime values
  • List functions of source.ts covered by both "test 1" and "test 2"
  • Identify potential areas for code optimization based on test coverage data

Advanced Workflows

These prompts can be combined to create more comprehensive workflows:

  • Add this new feature to the project, but add tests first and ensure all tests pass and verify coverage is at least 80% afterwards

Customizing Agent Behavior

You can tailor how your AI agent interacts with Wallaby’s context tools by customizing their behavior: