Skip to content

chore: remove the vitest-server MCP - #137

Merged
jhnns merged 1 commit into
mainfrom
jhnns/remove-vitest-mcp
Oct 29, 2026
Merged

jhnns merged 1 commit into
mainfrom
jhnns/remove-vitest-mcp

Conversation

@jhnns

@jhnns jhnns commented Oct 29, 2026

Copy link
Copy Markdown
Member

Removes the vitest-server MCP (@djankies/vitest-mcp) and points AGENTS.md at the Vitest CLI for single test files.

Why

  • No speed benefit. The MCP server stays up for the session, but each run_tests call spawns a fresh vitest run --reporter=json (dist/tools/run-tests.js, executeVitest). Every call pays the same config-loading floor as vitest --run <file>.
  • Fragile setup. It needs set_project_root before every session's first run. It starts from node_modules/.bin, so in a fresh worktree without node_modules it fails with ENOENT and stays down for the whole session.
  • Unused in practice. peerigon/leitstand inherited this setup. An analysis of 143 of its agent sessions found the server failing at startup in 86. In the 57 where it did start, 56 never called it. Agents ran Vitest from the shell instead, nearly always scoped to a file or project.
  • Its guardrail belongs in AGENTS.md. Its one real feature, refusing unscoped runs, is now a rule there.

Changes

  • .mcp.json, .claude/settings.json: removed the server, its tool permissions and its enabledMcpjsonServers entry
  • package.json and lockfile: removed @djankies/vitest-mcp
  • AGENTS.md: the "use the vitest-server MCP" line now names the CLI command
  • knip's ignore entry for the package, where there is one

typescript-lsp and eslint MCPs are unchanged.

🤖 Generated with Claude Code

It spawns a fresh Vitest per call, so it is no faster than the CLI, and it
fails for the whole session when node_modules is missing at start. AGENTS.md
now names the CLI command for running a single test file.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@jhnns
jhnns merged commit 19707c0 into main Oct 29, 2026
1 check passed
@jhnns
jhnns deleted the jhnns/remove-vitest-mcp branch October 29, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant