
Vue Harvest
io.github.virgilvoxPublished by GitHub account virgilvoxv0.0.3Updated Oct 24, 2026
Extract reusable component libraries and design tokens from Vue applications
Overview
Analyzes a Vue project to find reusable components and design tokens, and gives an assistant tools to reason about hard-to-extract components.
- What you can do
- Run the full analysis pipeline on a Vue project path and list components filtered by tier or confidence
- Inspect a single component with its props, emits, slots, dependencies and coupling issues
- Extract components into standalone bundles, including a rewrite-and-extract option
- Deep-analyze coupling and generate before/after refactor suggestions or composable wrappers for store-bound components
- Triage reviewable components in batch and produce a project-wide coupling report
- Extract design tokens (colors, typography, spacing, radii, shadows) and return them filtered by type
- When to use it
- Useful when you want to lift a component library or design system out of an existing Vue application, or when a component sits in the 30-70% confidence band and needs judgment about decoupling from stores, routers or i18n before extraction.
- Requirements
- Runs as a local stdio process on the desktop, installed from the npm package vue-harvest-mcp (Node.js). It reads a Vue project directory on the local machine, including .vue files and tsconfig.json for path aliases. No accounts, API keys or environment variables are declared.
Installation
In SourceWeft
- Open Vue Harvest in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
vue-harvest
Point it at a Vue project. It finds every component, figures out which ones are reusable, and extracts them. It also pulls out your design tokens (colors, spacing, typography) and gives you a visual report.
The hard cases that need judgment (store-coupled components, ambiguous dependencies) get handled by an MCP server that feeds structured analysis to an LLM.
What it does
Component extraction. Parses every .vue file in a project using @vue/compiler-sfc. For each component it extracts the full interface (props, emits, slots), maps out the dependency graph, detects coupling issues, and scores a confidence level for safe extraction. Components above the threshold get auto-extracted into standalone bundles with rewritten imports and a manifest of peer dependencies.
Design token extraction. Scans all CSS (scoped styles, standalone stylesheets) and pulls out colors, font families, font sizes, font weights, spacing values, border radii, and shadows. Outputs a CSS custom properties file, a JSON dump, and a visual HTML explorer showing swatches and scales.
MCP server. Twelve tools that give an LLM the structured data it needs to reason about the harder cases: components in the 30-70% confidence range that could be extracted with some refactoring. The LLM can deep-analyze coupling, generate decoupling suggestions with before/after code, create composable wrappers for store-bound components, and do full rewrite-and-extract in one shot.
Install
For the MCP server:
CLI
vue-harvest analyze [path]
Full analysis pipeline. Discovers .vue files, parses interfaces, builds the dependency graph, classifies every component, auto-extracts the safe ones, and generates a registry + catalog.
Output goes to .vue-harvest/ by default:
vue-harvest list [path]
Lists all components sorted by extraction confidence.
vue-harvest inspect <name>
Full breakdown of a single component: props, events, slots, dependencies, coupling issues, style analysis.
vue-harvest extract <name>
Extracts a specific component and all its local dependencies into a standalone bundle.
vue-harvest tokens [path]
Extracts design system tokens from the project.
Outputs:
tokens.csswith CSS custom propertiestokens.jsonwith the full token datasetdesign-system.htmlwith a visual explorer (color swatches, font scales, spacing visualization)
vue-harvest init
Creates a harvest.config.json with detected project settings.
Configuration
Optional. Place a harvest.config.json in the project root:
Path aliases are auto-detected from tsconfig.json. If your project has @ mapped to ./src, vue-harvest picks that up.
Component classification
Every component gets classified into a reusability tier based on its interface, dependencies, and coupling:
Components at or above the extraction threshold (default 70%) are auto-extracted. The 30-70% band is where the MCP server comes in.
Coupling issues
The analyzer detects these coupling patterns:
MCP server
Setup with Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Setup with Claude Code
Available tools
Resources
The server exposes these as MCP resources after analysis:
harvest://registry: full registry JSONharvest://graph: dependency graphharvest://summary: analysis summaryharvest://component/{name}: individual component analysisharvest://design-system: extracted design tokens
Prompts
analyze-new-project: guided first analysisextraction-sprint: batch refactor and extract sessionrefactor-component: single component deep refactorextract-design-system: design token extraction and analysis
Example conversations
"Analyze my Vue project at /Users/me/projects/my-app"
"Show me all the components that need review"
"Deep analyze the UserProfileCard component and suggest how to decouple it from the auth store"
"Do an extraction sprint, go through all reviewable components and extract what you can"
"Extract the design system tokens and recommend a naming convention"
Programmatic API
vue-harvest exports its analysis engine for use in other tools:
Architecture
The split between CLI and MCP is deliberate. The CLI handles everything deterministic: parsing, graph building, classification, extraction. The MCP handles the 20% that needs reasoning: decoupling suggestions, refactoring code generation, ambiguity resolution.
Development
Watch mode for the CLI:
Run a specific test file:
How it works internally
- Discovery. Globs for
.vuefiles, readstsconfig.jsonfor path aliases. - SFC parsing.
@vue/compiler-sfcsplits each file into template, script, and style blocks. - Interface extraction. Regex-based extraction of
defineProps,defineEmits,<slot>tags. Handles generic type syntax,withDefaults, and object syntax with nested options. - Dependency analysis.
es-module-lexerparses imports. Each import gets classified by kind (internal component, composable, store, util, external package, etc). - Coupling detection. Pattern matching on the script and template AST for store access, hardcoded APIs, router usage, i18n, inject, env vars, unscoped CSS.
- Classification. Confidence scoring starts at 1.0 and gets penalized for coupling issues, store access, and page-path patterns. Boosted for props/slots interfaces and UI-path patterns.
- Graph building. Resolves import paths, builds adjacency lists, runs Tarjan's strongly connected components algorithm for cycle detection, computes transitive dependency closures.
- Extraction. For components above threshold: collects the component plus all its local deps (composables, utils, types, styles), rewrites import paths to be relative within the extracted bundle, generates a manifest listing peer dependencies and required globals.
- Token extraction. PostCSS value parser identifies colors (hex, rgb, hsl), font properties, spacing values, radii, and shadows from CSS declarations. Deduplicates, normalizes hex values, and groups by type.
License
MIT
Source: README.md at commit 47c29cf
Tools
0Version history
1- v0.0.3LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts