DV

djankies/vitest-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

18 stars 7 forks 品質 90 トレンド 42MIT

AI-optimized Vitest runner with clean, structured output, log capturing, and coverage analysis.

概要

with LLM-optimized test output, log capturing, and line-by-line coverage analysis. - - Raw Vitest output can be extremely verbose eating up tokens/context with useless information. - - LLMs sometimes forget to limit the scope of the test run, causing full test suite runs to be executed. - - Console logs can be hidden in test output, making it inefficient for LLMs to debug test failures. - - Raw coverage files are too large for AI to parse. - - LLMs get stuck when vitest runs in watch mode. - with adaptive, structured output to limit noise. - to prevent logs from getting lost in test output. - with line-by-line gap insights. - in a single session with context switching. - prevent full project runs, watch mode, invalid vitest commands, and context hogging. The Vitest MCP server can be used with any MCP-compatible IDE or tool and works with all Javascript or Typescript Vitests. The basic configuration is: ⚠️ : The above example may not be valid for all MCP clients.

README

以下は原文 README の抜粋です。原文を見る。

🧪 Vitest MCP Server

MCP Vitest runner with LLM-optimized test output, log capturing, and line-by-line coverage analysis.

Table of Contents

😢 The Problem with LLMs and Testing 😢

  • Noisy test output - Raw Vitest output can be extremely verbose eating up tokens/context with useless information.
  • Full test suite runs - LLMs sometimes forget to limit the scope of the test run, causing full test suite runs to be executed.
  • Buried console logs - Console logs can be hidden in test output, making it inefficient for LLMs to debug test failures.
  • Raw coverage files - Raw coverage files are too large for AI to parse.
  • Watch mode - LLMs get stuck when vitest runs in watch mode.

✨ Key Features ✨

  • Smart Test Results with adaptive, structured output to limit noise.
  • Console Log Capture to prevent logs from getting lost in test output.
  • Coverage Analysis with line-by-line gap insights.
  • Multi-Repository Support in a single session with context switching.
  • Safety Guards prevent full project runs, watch mode, invalid vitest commands, and context hogging.

🚀 Quick Start 🚀

The Vitest MCP server can be used with any MCP-compatible IDE or tool and works with all Javascript or Typescript Vitests. The basic configuration is:

{
  "mcpServers": {
    "vitest": {
      "command": "npx",
      "args": ["-y", "@djankies/vitest-mcp"]
    }
  }
}

⚠️ Note: The above example may not be valid for all MCP clients. Verify your client’s specific setup instructions.

🛠️ Client-Specific Setup

Select your preferred IDE or tool from the setup guides below:

Configuration Methods

Claude Code supports multiple configuration approaches:

Method 1: CLI Wizard (Interactive)

# Add server with interactive prompts
claude mcp add vitest -- npx -y @djankies/vitest-mcp

# Add to project scope (shareable with team)
GitHub で README 全文を見る

インストール

npx -y @djankies/vitest-mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "vitest": { "command": "npx", "args": ["-y", "@djankies/vitest-mcp"] } } }