Tools MCP
MCP server for AI assistants to scaffold, configure, and diagnose @vitus-labs/tools projects.
@vitus-labs/tools-mcp is a Model Context Protocol server that exposes 3 tools and 12 documentation resources over stdio transport. It enables AI assistants (Claude, Cursor, Copilot) to scaffold new projects, add tooling to existing ones, and diagnose configuration issues — all using the @vitus-labs/tools ecosystem.
Installation
npm install @vitus-labs/tools-mcpRequirements
- Node.js
>= 22(engines.node) - No peer dependencies — the MCP SDK and
zodare regular dependencies of the package.
Quick Start
CLI (stdio transport)
The package ships a vl_mcp binary that starts the server on stdio. It logs a single status line to stderr and speaks MCP on stdin/stdout:
npx vl_mcpClaude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"vitus-labs-tools": {
"command": "npx",
"args": ["vl_mcp"]
}
}
}Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"vitus-labs-tools": {
"command": "npx",
"args": ["vl_mcp"]
}
}
}Programmatic
import { createServer } from '@vitus-labs/tools-mcp'
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
const server = createServer()
const transport = new StdioServerTransport()
await server.connect(transport)Tools
scaffold_package
Scaffold a new project pre-configured with @vitus-labs/tools. Creates the config files for the selected preset. Existing files are never overwritten — they are listed as skipped in the result.
| Parameter | Type | Description |
|---|---|---|
name | string | Package name (e.g. @my-org/my-lib) — must be a valid npm package name (max 214 chars) |
directory | string | Absolute path to create the project in (created if missing) |
preset | 'library' | 'nextjs' | 'storybook' | Project type |
Presets:
| Preset | Files created | First command |
|---|---|---|
library | package.json, tsconfig.json, biome.json, vitest.config.ts, vl-tools.config.mjs, src/index.ts | bun run build |
nextjs | package.json, tsconfig.json, biome.json, next.config.ts, vl-tools.config.mjs | bun run dev |
storybook | package.json, biome.json, vl-tools.config.mjs, .storybook/main.ts, .storybook/preview.ts | bun run stories |
library—@vitus-labs/tools-rolldownbuild (vl_rolldown_build/vl_rolldown_build-watch), Vitest, TypeScript, Biomenextjs— Next.js app wrapped withwithVitusLabs, tsconfig extending@vitus-labs/tools-typescript/nextjsstorybook—vl_stories/vl_stories-buildscripts,.storybook/files re-exporting@vitus-labs/tools-storybook/storybook/mainand/preview
Scaffolded dependency ranges: @vitus-labs/tools-* ^2.0.0, typescript ^7.0.2, vitest / @vitest/coverage-v8 ^5.0.3, vite ^8.3.3, @biomejs/biome ^2.5.15, react / react-dom ^19.3.0, next ^16.3.8.
If directory already contains a package.json, the tool returns an error and suggests add_tooling instead.
add_tooling
Add @vitus-labs/tools packages to an existing project. Merges dependencies and scripts into the existing package.json and creates config files as needed. Nothing is overwritten: a dependency already declared in any section (dependencies, devDependencies, peerDependencies, optionalDependencies), an existing script, or an existing file is left untouched and reported as skipped.
| Parameter | Type | Description |
|---|---|---|
directory | string | Absolute path to project root (must contain package.json) |
tools | string[] | Tools to add |
Available tools:
| Tool | Package | What it adds |
|---|---|---|
typescript | @vitus-labs/tools-typescript | typescript dev dep + tsconfig.json extending @vitus-labs/tools-typescript/lib |
lint | @vitus-labs/tools-lint | @biomejs/biome dev dep, biome.json, lint / format scripts |
vitest | @vitus-labs/tools-vitest | vitest, @vitest/coverage-v8, vite dev deps, vitest.config.ts, test / test:watch / test:coverage scripts |
rolldown | @vitus-labs/tools-rolldown | build (vl_rolldown_build) / dev (vl_rolldown_build-watch) scripts |
rollup | @vitus-labs/tools-rollup | build (vl_build) / dev (vl_build-watch) scripts |
nextjs | @vitus-labs/tools-nextjs | next.config.ts with withVitusLabs (added to dependencies) |
nextjs-images | @vitus-labs/tools-nextjs-images | The dependency only (added to dependencies) |
storybook | @vitus-labs/tools-storybook | stories / stories:build scripts |
favicon | @vitus-labs/tools-favicon | favicon script (vl_favicon) |
atlas | @vitus-labs/tools-atlas | atlas script (vl_atlas) |
diagnose_config
Analyze a project for @vitus-labs/tools configuration issues. Returns a report with errors, warnings, info messages and suggested fixes, followed by a summary line. Findings are a normal result; the result is flagged isError only when there is no readable package.json.
| Parameter | Type | Description |
|---|---|---|
directory | string | Absolute path to the project root to diagnose |
Checks performed:
| Check | Severity | What it detects |
|---|---|---|
| Missing package.json | error | No package.json found |
| Invalid JSON | error | package.json is not valid JSON |
| Missing ESM | warning | Missing "type": "module" |
| Missing tsconfig | warning | No tsconfig.json |
| Non-standard tsconfig preset | info | extends (string or array; JSONC is tolerated) doesn't reference @vitus-labs/tools-typescript |
| Missing Biome | warning | No biome.json / biome.jsonc |
| Legacy ESLint | info | No Biome config but an ESLint config (.eslintrc* or flat eslint.config.*) exists |
| Missing vl-tools.config | info | No vl-tools.config.mjs (optional) |
| Missing exports.types | warning | exports["."].types not set |
| Missing exports.import | warning | exports["."].import not set |
| Missing import extensions | error | Relative imports under src/ without an explicit file extension (.js, .ts, .tsx, .json, .css, …); test and .d.ts files are skipped, at most 20 are listed individually |
| Missing dependencies | error | Scripts reference vl_build, vl_rolldown*, vl_stories*, vl_favicon, vl_atlas or vl_mcp but the matching package isn't in dependencies / devDependencies |
Documentation Resources
The server also exposes 12 read-only documentation resources via the MCP resource protocol:
| URI | Content |
|---|---|
docs://vitus-labs/overview | Package table with quick start guide |
docs://vitus-labs/packages/{name} | Per-package documentation |
Available package docs: core, rolldown, rollup, typescript, lint, vitest, nextjs, nextjs-images, storybook, favicon, atlas.
These resources give AI assistants instant context about the @vitus-labs/tools ecosystem without needing web access.
All tools validate that directory is an absolute path and return an MCP isError result (rather than throwing) when an operation fails. The server reports its real package version to the client.
Last updated on