Skip to content
| Marketplace
Sign in
Visual Studio Code>Testing>Unit Test MCPNew to Visual Studio Code? Get it now.
Unit Test MCP

Unit Test MCP

Kenneth Huang

|
591 installs
| (0) | Free
AI-powered test generation for Jest, Pytest & .NET via GitHub Copilot using Model Context Protocol
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Unit Test MCP

A VS Code extension that helps GitHub Copilot write, review, and run tests using your project's test tools. Supports Jest, Vitest, pytest, and .NET through the Model Context Protocol (MCP).

Get started

  1. Install Unit Test MCP from the VS Code Marketplace.

  2. Open a trusted workspace with a configured test project.

  3. Open GitHub Copilot Chat in agent mode and try:

    Generate tests for this file.
    Improve test coverage for src/services.
    Run tests with coverage.
    

The MCP server registers automatically. You can also select the UnitTestEngineer agent for a guided workflow or run Unit Test MCP: Open Tutorial.

Requirements: VS Code 1.101.0+, GitHub Copilot Chat, and the runtimes and dependencies required by your test project.

What it does

  • Test guidance: Framework-specific examples and matching repository instructions help Copilot create or improve tests.
  • Protective review: Flags weak assertions and mocks that bypass the behavior under test, with unit/integration context.
  • Execution and coverage: Runs project tests and checks coverage for a file, folder, or repository against your configured target.
  • Batch discovery: Finds missing tests and coverage gaps across folders.

For generated or changed tests, the workflow includes protective review and fresh, scoped coverage validation. Passing tests and meeting the coverage target are separate checks.

Configuration

Use the Unit Test MCP sidebar to set test commands, coverage targets, and custom framework instructions. Settings can vary by workspace folder and apply to subsequent requests without changing a run already in progress.

Keep team-specific rules separate from the extension's generated instructions. See custom instructions and managed workspace files for setup and Git guidance.

Documentation

  • Tool reference and testing workflows
  • Copilot CLI and other MCP clients (Node.js 20+)
  • Development and contributing
  • Release notes

Troubleshooting

If tools are missing, check MCP: List Servers and the tools enabled for your current agent session. Use Unit Test MCP: Show Server Logs for diagnostics.

See the troubleshooting guide, or report an issue through GitHub or Unit Test MCP: Give Feedback in the sidebar.

Security and privacy

The server runs locally with your operating-system permissions; use it only in trusted workspaces. Content returned to Copilot follows the client and model provider's data-handling policies.

Extension telemetry requires a verified Microsoft identity and VS Code telemetry consent. Local tools do not require corporate sign-in. See security and data handling.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft