Skip to main content
Glama

@kr-pro-labs/clonevibe-mcp

English | 한국어 (Korean)

CI License: MIT Node.js MCP

Surgical AST Feature Slicer, Zero-Dependency Chameleon Code Grafter, 1:1 Golden Parity Verifier & Workspace Patch Engine for Vibe Coding.

During Vibe Coding, engineers frequently discover a specific algorithm, table parser, retry scheduler, physics routine, or state machine buried inside a massive external reference (a 50,000-line GitHub repository, an npm:/pypi:/cargo: package, or a minified JS bundle). Cloning the entire repository or installing bloated dependency trees pollutes your project.

clonevibe-mcp extracts only the minimal transitive AST closure of the target feature, replaces third-party dependencies with lightweight zero-dependency inline micro-shims, adapts the code to your host project's language and style conventions, mechanically proves 1:1 behavioral equivalence via Golden I/O vectors, and generates non-destructive unified diff patches for instant workspace integration.


Architecture Pipeline

flowchart LR
    A["Reference Input\n(GitHub / Local / npm: / pypi: / cargo: / JS Bundle)"] --> B["1. ingest_reference\nMultiSourceIngestor"]
    B --> C["2. locate_feature_entrypoints\nSymbol & Centrality Ranker"]
    C --> D["3. slice_engine_graph\nTransitive AST Closure Slicer"]
    E["4. profile_target_vibe\nChameleon Style Scanner"] --> F["5. synthesize_chameleon_graft\nZero-Dep Inliner & Code Synthesizer"]
    D --> F
    F --> G["6. verify_engine_parity\n1:1 Golden I/O Parity Verifier"]
    F --> H["7. preview_graft_patch\nWorkspace Unified Diff & AST Splicer"]

Related MCP server: vitest-migrator-mcp

Key Capabilities

  • All-in-One Multi-Source Ingestion: Ingests local codebases, GitHub URLs, package registry specs (npm:, pypi:, cargo:), inline file maps, and single-line minified JS bundles (with automatic token-aware structural formatting).

  • Polyglot Transitive AST Closure Slicing: Extracts top-level functions, classes, structs, interfaces, and call edges across TypeScript, JavaScript, Python, Rust, and Go, pruning 80%–98% of unrelated repository boilerplate.

  • 10-Package Zero-Dependency Micro-Shim Catalog: Automatically replaces external imports (lodash, uuid, axios, chalk, lru-cache, semver, crc-32, eventemitter3, base64, limiter) with self-contained standard-library inline primitives (externalDepCount === 0).

  • Auto-Polyfill Transpiler & Language Boundary Hardener: Automatically transpiles external library call expressions into inline shims, consolidates Go package import headers into clean single blocks, deduplicates Python standard library fallbacks with from __future__ import annotations, and encapsulates Rust module namespaces (pub mod zero_dep_shims).

  • Chameleon Style & Cross-Language Assimilation: Profiles your workspace (camelCase vs snake_case vs PascalCase, esm vs commonjs, quotes, indentation, error handling) and synthesizes drop-in modules and Clean-Room Algorithmic Blueprints.

  • 1:1 Golden Parity Verification: Executes empty, numeric boundary, Unicode/CJK, malformed, and deterministic seed Golden Vectors and emits a ready-to-run host unit test file (vitest, pytest, cargo test, or go test).

  • Non-Destructive Workspace Patching: Generates clean unified diff previews with automatic shim deduplication and supports append, prepend, and smart-replace-symbol strategies.

  • Full MCP Protocol Compliance: Implements MCP Tools, Resources, and Prompts (surgical_slice_feature, audit_zero_dep_graft, explain_algorithmic_blueprint).

  • Interactive CLI Inspection & Deterministic Benchmark Suite: Subcommands (--catalog, --profile <dir>, --slice <query>, --bench) delivering over 3,000 operations/sec with zero external dependencies.


Interactive CLI Subcommands

# Print zero-dependency micro-shim catalog (TS, JS, Python, Rust, Go)
node ./dist/index.js --catalog

# Profile a target workspace directory conventions
node ./dist/index.js --profile ./src

# Surgically slice candidate entrypoints for a feature query
node ./dist/index.js --slice "rate limiter" --source ./src

# Execute 7-stage deterministic continuous performance benchmark
node ./dist/index.js --bench

# Machine-readable JSON output
node ./dist/index.js --catalog --json

Quick Start & MCP Client Configuration

Install & Build from Source

git clone https://github.com/KR-PRO-Labs/clonevibe-mcp.git
cd clonevibe-mcp
npm install
npm run build
npm test

Claude Desktop / Cursor / Windsurf / Antigravity (mcp_config.json)

{
  "mcpServers": {
    "clonevibe-mcp": {
      "command": "npx",
      "args": ["-y", "@kr-pro-labs/clonevibe-mcp"]
    }
  }
}

MCP Tools Reference

Tool Name

Description

ingest_reference

Hydrates a GitHub URL, local directory, registry spec (npm:, pypi:, cargo:), inline file map, or minified JS bundle into a ReferenceSnapshot.

locate_feature_entrypoints

Scores and ranks symbols in a snapshot against natural-language feature queries and call centrality.

slice_engine_graph

Computes the minimal transitive AST call/type closure from entrypoint symbols and matches zero-dep shims.

profile_target_vibe

Inspects a target workspace or code sample to detect language, module system, casing, quotes, indentation, and error-handling idiom.

synthesize_chameleon_graft

Generates a zero-dependency adapted code module and Clean-Room Algorithmic Blueprint in the target language.

verify_engine_parity

Verifies 1:1 Golden I/O parity, confirms zero external dependencies, and outputs a runnable test suite.

preview_graft_patch

Generates a unified diff preview for integrating the graft into a host workspace file with automatic shim deduplication.

MCP Prompts

  • surgical_slice_feature — Guided 7-stage runbook from reference source to unified diff patch preview.

  • audit_zero_dep_graft — Automated purity audit verifying 0 external runtime package imports.

  • explain_algorithmic_blueprint — Walkthrough of state transitions, pure signatures, complexity bounds, and invariants.

MCP Resources

  • clonevibe://catalog/zero-dep-shims — JSON catalog of 10 zero-dependency inline shims across TypeScript, JavaScript, Python, Rust, and Go (lodash, uuid, axios, chalk, lru-cache, semver, crc-32, eventemitter3, base64, limiter).

  • clonevibe://guide/chameleon-workflow — Markdown guide for executing the 7-stage surgical grafting & patch workflow.


License

MIT © KR-PRO-Labs & Julian Vane (@goooem)

Available Tools

7 tools
ingest_referenceB

Ingests a reference codebase from a GitHub URL, local directory, package spec (npm:/pypi:/cargo:), inline file map, or minified JS bundle into an indexed ReferenceSnapshot.

Inputs: sourceUri (required), subpath, bundleCode, sourceKind, +2 more.

locate_feature_entrypointsC

Ranks symbols inside a ReferenceSnapshot matching a natural-language feature query and call-graph centrality.

Inputs: snapshotId (required), featureQuery (required), maxResults.

preview_graft_patchB

Generates a unified diff patch preview for integrating a synthesized Chameleon graft into a host workspace file with non-destructive deduplication of inlined shims.

Inputs: graftId (required), targetFilePath, targetFileContent, integrationStrategy.

profile_target_vibeC

Profiles the host project conventions (language, module system, camelCase/snake_case/PascalCase, indentation, quotes, semicolons, error-handling idiom).

Inputs: sampleCode, workspacePath, explicitLanguage.

slice_engine_graphC

Computes the minimal transitive AST call/type closure starting from entrypoint symbols, stripping 80-98% of unrelated repo boilerplate and mapping external dependencies to zero-dep inline shims.

Inputs: snapshotId (required), entrypointIds (required), maxDepth, includeTypes.

synthesize_chameleon_graftC

Synthesizes a zero-dependency Chameleon code graft and Clean-Room Algorithmic Blueprint adapted to the target project style and language.

Inputs: sliceId (required), engineName, sampleCode, targetProfile, +1 more.

verify_engine_parityB

Runs 1:1 Golden I/O vector verification over the reference slice and grafted module, confirming zero external dependencies and generating a runnable unit test suite.

Inputs: graftId (required), sliceId (required), customVectors.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool maps to a distinct stage in a clear ingest→locate→slice→profile→synthesize→verify→preview pipeline, so an agent can order them reliably. Minor overlap exists between slice_engine_graph and locate_feature_entrypoints (both operate on the call graph) and between synthesize_chameleon_graft and preview_graft_patch, but descriptions differentiate them adequately.

    Naming Consistency5/5

    All seven tools follow a consistent snake_case verb_noun convention (ingest_reference, locate_feature_entrypoints, profile_target_vibe, etc.). Domain jargon (chameleon, engine_graph) is used uniformly rather than inconsistently mixed with other styles.

    Tool Count5/5

    Seven tools is well-scoped for a linear code-grafting pipeline where each tool earns its place as one pipeline stage. No redundant or trivial tools are present.

    Completeness4/5

    The surface covers the full lifecycle from ingestion through verification and diff preview, which is strong. However, there is no tool to apply/commit the generated patch, to list or inspect existing ReferenceSnapshots, or to clean up state, leaving a minor dead end after preview.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      Not graded
      maintenance
      Enables AI agents to safely upgrade JavaScript and TypeScript projects through dependency analysis, upgrade path detection, breaking change identification, codemod application, and PR summary generation.
      14
      17 npm
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      Enables automated migration of JavaScript/TypeScript packages from legacy test runners like Karma, Webpack, and Mocha to Vitest, including AST codemods, multi-project test scaffolding, and self-learning diagnostics for resolving runtime errors.
      7
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables coding agents to extract a source feature’s static dependency closure and adapt it into a target Git repository’s own data model and design, then carry later upstream fixes into the adapted copy with pinned provenance and frozen verification checks.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP hosts like Claude Code and Cursor to find a JS/TS feature in a source repository, plan a transfer into another app, and inspect the declared behavior contract and dependencies before executing code. It then runs regression and browser checks and exports a reviewable patch while leaving the original repositories unchanged.
      13 npm
      3
      MIT