Skip to Content
vitus·labs
Tools MCP

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-mcp

Requirements

  • Node.js >= 22 (engines.node)
  • No peer dependencies — the MCP SDK and zod are 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_mcp

Claude 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.

ParameterTypeDescription
namestringPackage name (e.g. @my-org/my-lib) — must be a valid npm package name (max 214 chars)
directorystringAbsolute path to create the project in (created if missing)
preset'library' | 'nextjs' | 'storybook'Project type

Presets:

PresetFiles createdFirst command
librarypackage.json, tsconfig.json, biome.json, vitest.config.ts, vl-tools.config.mjs, src/index.tsbun run build
nextjspackage.json, tsconfig.json, biome.json, next.config.ts, vl-tools.config.mjsbun run dev
storybookpackage.json, biome.json, vl-tools.config.mjs, .storybook/main.ts, .storybook/preview.tsbun run stories
  • library — @vitus-labs/tools-rolldown build (vl_rolldown_build / vl_rolldown_build-watch), Vitest, TypeScript, Biome
  • nextjs — Next.js app wrapped with withVitusLabs, tsconfig extending @vitus-labs/tools-typescript/nextjs
  • storybook — vl_stories / vl_stories-build scripts, .storybook/ files re-exporting @vitus-labs/tools-storybook/storybook/main and /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.

ParameterTypeDescription
directorystringAbsolute path to project root (must contain package.json)
toolsstring[]Tools to add

Available tools:

ToolPackageWhat it adds
typescript@vitus-labs/tools-typescripttypescript 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-vitestvitest, @vitest/coverage-v8, vite dev deps, vitest.config.ts, test / test:watch / test:coverage scripts
rolldown@vitus-labs/tools-rolldownbuild (vl_rolldown_build) / dev (vl_rolldown_build-watch) scripts
rollup@vitus-labs/tools-rollupbuild (vl_build) / dev (vl_build-watch) scripts
nextjs@vitus-labs/tools-nextjsnext.config.ts with withVitusLabs (added to dependencies)
nextjs-images@vitus-labs/tools-nextjs-imagesThe dependency only (added to dependencies)
storybook@vitus-labs/tools-storybookstories / stories:build scripts
favicon@vitus-labs/tools-faviconfavicon script (vl_favicon)
atlas@vitus-labs/tools-atlasatlas 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.

ParameterTypeDescription
directorystringAbsolute path to the project root to diagnose

Checks performed:

CheckSeverityWhat it detects
Missing package.jsonerrorNo package.json found
Invalid JSONerrorpackage.json is not valid JSON
Missing ESMwarningMissing "type": "module"
Missing tsconfigwarningNo tsconfig.json
Non-standard tsconfig presetinfoextends (string or array; JSONC is tolerated) doesn't reference @vitus-labs/tools-typescript
Missing BiomewarningNo biome.json / biome.jsonc
Legacy ESLintinfoNo Biome config but an ESLint config (.eslintrc* or flat eslint.config.*) exists
Missing vl-tools.configinfoNo vl-tools.config.mjs (optional)
Missing exports.typeswarningexports["."].types not set
Missing exports.importwarningexports["."].import not set
Missing import extensionserrorRelative 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 dependencieserrorScripts 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:

URIContent
docs://vitus-labs/overviewPackage 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.

Edit on GitHub

Last updated on

On this page