Skip to main content
Glama

version-compat-mcp

"Your agent reads the wrong docs. version-compat makes it read the right version."

npm version Smithery License: MIT Node.js MCP Zero Config

Version-Aware Setup, Dependency Compatibility & Migration MCP Server for JavaScript/TypeScript & Python Ecosystems.

version-compat-mcp is not a generic documentation search engine. It is a local Model Context Protocol (MCP) server that analyzes your project's actual Node.js & Python runtimes, package managers (npm/pnpm/yarn/bun/uv/poetry/pip), lockfile versions, and configuration files to supply deterministic compatibility checks and tag-pinned migration facts to AI coding agents (Google Antigravity, OpenAI Codex, Cursor, Claude Code).


Table of Contents

  1. Why version-compat-mcp? (And How It Differs from Generic Doc MCPs)

  2. Core Architecture

  3. Supported Libraries & Versions

  4. Quick Start & Host Agent Configuration

  5. MCP Tools Reference (5 Tools)

  6. Real-World Prompt Examples

  7. Safety & Epistemic Guardrails

  8. Data Collection, Upstream Licenses & Attribution Policy

  9. Privacy & Security Policy

  10. Known Limitations & Roadmap

  11. Testing with MCP Inspector & Evaluation Suite

  12. License


Related MCP server: installed-version-mcp

1. Why version-compat-mcp? (And How It Differs from Generic Doc MCPs)

Because LLM pre-training weights are frozen at a cutoff date, coding agents routinely make costly setup and migration errors:

  • Tailwind CSS v4 vs. v3: Proposing npx tailwindcss init -p, tailwind.config.js, and @tailwind base; in a Tailwind CSS v4 project (which uses @import "tailwindcss"; and @tailwindcss/vite or @tailwindcss/postcss).

  • ESLint v9 vs. v8: Generating legacy .eslintrc.json or .eslintignore files in an ESLint v9 project that requires eslint.config.mjs (Flat Config).

  • Next.js 15 & React 19: Using synchronous cookies(), headers(), or params in Next.js 15 (where Dynamic Request APIs are asynchronous Promises), or proposing incompatible React 18 / Node.js combinations.

  • FastAPI & Pydantic v2: Suggesting deprecated @app.on_event("startup") instead of lifespan context manager, or Pydantic v1 class Config: / @validator instead of ConfigDict and @field_validator/@model_validator.

  • Package Manager Mismatch: Suggesting npm install in a repository locked with pnpm-lock.yaml, bun.lock, yarn.lock, or proposing pip install in an active uv or poetry workspace.

How version-compat-mcp Differs from General Documentation MCPs (e.g., Context7)

Dimension

Generic Documentation MCPs

version-compat-mcp

Primary Goal

Retrieve general API docs & tutorials

Ground setup, compatibility & major version migrations in actual project state

Project Awareness

Unaware of local lockfiles, .nvmrc, or config style

Parses package.json, lockfiles (pnpm, bun, uv.lock, poetry.lock), .nvmrc, .python-version, tsconfig.json, pyproject.toml

Compatibility Logic

Probabilistic text search

Deterministic semver & PEP 440 verification against npm registry & PyPI (engines, requires_python, peerDependencies, deprecated)

Corpus Scope

Broad tutorials & full API reference

Strictly tag-pinned migration guides, breaking changes, and deprecations

Failure Mode

Silently defaults to "latest" or hallucinates

Explicit guardrails (ambiguous_version, NO_EVIDENCE_DO_NOT_ASSUME_REMOVED)


2. Core Architecture

flowchart LR
    Agent["Host Agent<br/>(Antigravity / Codex / Cursor / Claude)"] <-->|"JSON-RPC 2.0 (stdio)"| Server["version-compat-mcp"]

    subgraph Deterministic["1. Deterministic Engine (Zero RAG / Zero Hallucination)"]
        Local["Local File & Lockfile Parser<br/>package.json, pnpm-lock.yaml,<br/>bun.lock, yarn.lock, .nvmrc"]
        Registry["npm Registry Abbreviated API<br/>engines.node, peerDependencies,<br/>deprecated (+ ETag Disk Cache)"]
    end

    subgraph Retrieval["2. Tag-Pinned Retrieval Engine (SQLite FTS5 BM25)"]
        SeedDB["Precomputed SQLite FTS5 Index<br/>(seed/index-js-ts.db + SHA-256 Verify)"]
        Corpus["Git-Tag Snapshots Only:<br/>Migration Guides, Breaking Changes,<br/>Deprecations & Setup Templates"]
    end

    Server --> Local
    Server --> Registry
    Server --> SeedDB
    Corpus --> SeedDB
  1. Strict Separation of Structured vs. Unstructured Data: Structured data (package.json, lockfiles, npm registry metadata) is evaluated deterministically without RAG. Unstructured docs (migration guides, breaking changes) are indexed by immutable Git tags in SQLite FTS5.

  2. Zero-Config & Precomputed Index: Built on Node.js native node:sqlite (DatabaseSync with FTS5 and unicode61 tokenchars '@/_-.')—requiring zero API keys and zero C++ node-gyp compilation during npx execution.

  3. Strict stdio Protocol Hygiene: stdout is strictly reserved for JSON-RPC 2.0 frames. Accidental console.log calls are intercepted, and internal diagnostics write exclusively to process.stderr only when DEBUG="true" is set.


3. Supported Libraries & Versions

JavaScript / TypeScript Ecosystem

Library

Canonical ID

Indexed Major Versions

Key Migration & Setup Coverage

Next.js

nextjs

v13, v14, v15

Async cookies()/headers()/params, fetch caching defaults, React 19 peer deps, @next/codemod

React

react

v18, v19

ref as a prop (forwardRef deprecation), ReactDOMTestUtils.act removal, useActionState, TypeScript codemods

Tailwind CSS

tailwindcss

v3, v4

@import "tailwindcss", @theme CSS-first config, @tailwindcss/vite, @tailwindcss/postcss, @tailwindcss/upgrade

ESLint

eslint

v8, v9

eslint.config.mjs Flat Config default, .eslintignore removal, @eslint/migrate-config, typescript-eslint

Vite

vite

v5, v6

Node.js >=18/20/22 requirements, Environment API, Sass modern API default, CJS Node API removal

TypeScript

typescript

v5

moduleResolution: "bundler", verbatimModuleSyntax (importsNotUsedAsValues deprecation)

Node.js

node

v18, v20, v22

engines.node compatibility, require(esm) stabilization, built-in node:sqlite

Supported JS/TS Package Managers: npm, pnpm (v6–v9 + pnpm-workspace.yaml catalogs), yarn (Classic v1 & Berry v2+), bun (bun.lock & bun.lockb).

Python Ecosystem

Library / Tool

Canonical ID

Indexed Major Versions

Key Migration & Setup Coverage

Python

python

3.10, 3.11, 3.12, 3.13

GIL-free free-threaded build, per-interpreter GIL, pattern matching, exception groups, requires_python

FastAPI

fastapi

0.100, 0.115

lifespan context manager vs @app.on_event deprecation, Pydantic v2 integration, Annotated dependencies

Pydantic

pydantic

v1, v2

ConfigDict vs class Config, @field_validator/@model_validator, model_dump() vs dict(), Rust core speedups

SQLAlchemy

sqlalchemy

1.4, 2.0

2.0 select() syntax, session.scalars(), DeclarativeBase subclassing, removal of legacy session.query()

LangChain

langchain

0.1, 0.2, 0.3

Modular packages (langchain-core, langchain-community, partner packages), LCEL pipelines, Pydantic v2 core

uv

uv

0.4, 0.5

Cargo-style virtualenvs, workspace management, uv pip, uv run script metadata, fast lockfiles

Supported Python Package Managers: uv (uv.lock, pyproject.toml), poetry (poetry.lock, pyproject.toml), pip (requirements.txt, Pipfile).


4. Quick Start & Host Agent Configuration

Prerequisites

  • Node.js: >= 22.5.0

A. Google Antigravity (AGY)

Global MCP Config (~/.gemini/config/mcp_config.json):

{
  "mcpServers": {
    "version-compat": {
      "command": "npx",
      "args": ["-y", "version-compat-mcp"]
    }
  }
}

Workspace Rules: This repository also includes workspace rules in GEMINI.md and AGENTS.md.

B. OpenAI Codex (CLI & Desktop App)

codex mcp add version-compat -- npx -y version-compat-mcp

Or in ~/.codex/config.toml:

[mcp_servers.version-compat]
command = "npx"
args = ["-y", "version-compat-mcp"]
startup_timeout_sec = 15
tool_timeout_sec = 30
enabled = true

C. Cursor

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "version-compat": {
      "command": "npx",
      "args": ["-y", "version-compat-mcp"]
    }
  }
}

(For local development from a cloned repository, use "command": "node" and "args": ["/absolute/path/to/version-compat-mcp/dist/index.js"].)

D. Claude Code & Claude Desktop

claude mcp add version-compat -- npx -y version-compat-mcp

E. Smithery CLI

npx -y smithery@latest mcp add eunryong/version-compat-mcp --client cursor
# or for Claude Desktop / Claude Code:
npx -y smithery@latest mcp add eunryong/version-compat-mcp --client claude

5. MCP Tools Reference (5 Tools)

Tool Name

Data Source

Description

detect_project_environment

Local file parser (Offline)

Detects Node.js & Python runtimes (.nvmrc, .python-version, engines, Pipfile), package manager (npm/pnpm/yarn/bun/uv/poetry/pip), locked versions (node_modules, pnpm-lock.yaml, bun.lock, uv.lock, poetry.lock, requirements.txt), and config paradigms (flat_config, v4_css_first, app_router, pep621).

check_dependency_compatibility

npm / PyPI Registry API + Semver/PEP440

Verifies engines.node / requires_python, peerDependencies, and deprecated status deterministically with ETag caching. Reports conflict, warning, yanked, or unverified.

get_versioned_setup_guide

SQLite FTS5 + PM Translator

Returns version-pinned install commands formatted for the project's package manager (pnpm add -D, uv add, poetry add, etc.), config templates, and obsolete patterns to avoid.

get_upgrade_steps

SQLite FTS5 (Tag-Pinned)

Retrieves ordered migration steps, breaking changes, and official codemod commands between from_version and to_version with GitHub tag source_url citations.

search_versioned_docs

SQLite FTS5 BM25

Searches tag-pinned migration guides, release notes, and deprecations for a specific library version (auto-resolving version from project_path if omitted).


6. Real-World Prompt Examples

Once version-compat-mcp is connected to Cursor, Claude Code, Codex, or Antigravity, try asking:

  1. Environment & Compatibility Audit

    "Check the current project's Next.js, React, and Node.js versions using version-compat and let me know if there are any peerDependency or engine compatibility issues."

  2. Tailwind CSS v3 → v4 Upgrade

    "We want to upgrade Tailwind CSS from v3.4 to v4.0 in this repository. Inspect our project environment first, then give me the exact migration steps, config changes, and commands for our package manager with official source URLs."

  3. ESLint v8 → v9 Flat Config Migration

    "Migrate our .eslintrc.json and .eslintignore setup to ESLint v9 Flat Config. Cite the official ESLint v9 migration docs."

  4. Next.js 14 → 15 Breaking Changes

    "What breaking changes affect cookies(), headers(), and params when upgrading from Next.js 14.2 to 15.0, and what is the official codemod command?"


7. Safety & Epistemic Guardrails

  • No Silent "latest" Substitution (status: "ambiguous_version"): When a version is omitted without a project_path, or spans multiple majors (>=13.0.0 <16.0.0), the server refuses to guess "latest" and returns candidate versions.

  • Zero Search Results ≠ Feature Removed (status: "no_results_found"): Returns epistemic_notice: "NO_EVIDENCE_DO_NOT_ASSUME_REMOVED" so the host agent never falsely claims an API was removed simply because no breaking-change chunk matched.

  • Explicit Unsupported Scope (status: "unsupported_library"): Immediately identifies libraries outside the 7 supported targets.

  • Read-Only Execution: Commands and codemods are returned as strings; the server never executes shell commands.


8. Documentation Sources and Data Policy

  • version-compat-mcp does not claim ownership of third-party documentation.

  • Every search result and migration guide step includes original source_url links and version metadata (git_tag, version, collected_at, upstream_license).

  • Indexed documents are strictly limited to migration guides, release notes, deprecation notices, and compatibility-related content. Full documentation websites and general tutorials are excluded.

  • Documentation sources are collected from official repositories or official documentation sites pinned to immutable Git tags (recorded in seed/metadata.json).

  • Third-party documentation remains subject to its original license, terms of service, and copyright policy. See NOTICE.md and THIRD_PARTY_NOTICES.md for complete attribution details.

  • Upstream maintainers can request modification or removal of any indexed snapshot by opening an issue at https://github.com/Eunryong/version-compat-mcp/issues.


9. Privacy & Security Policy

  • 100% Local Execution: Runs locally on your machine over stdio. No source code or .env files are ever read or uploaded.

  • No Telemetry: Zero analytics or tracking. Outbound network calls are limited to npm registry metadata lookups (registry.npmjs.org) and can be disabled completely via VERSION_COMPAT_OFFLINE=1.

  • SHA-256 Integrity: Precomputed index databases are verified against seed/index-js-ts.db.sha256 and seed/manifest.json before loading.

  • See SECURITY.md for full details.


10. Known Limitations & Roadmap

  • Current Scope (Phase 1): Focused on the 7 core JS/TS libraries (node, typescript, react, nextjs, vite, tailwindcss, eslint) using SQLite FTS5 BM25 keyword/symbol retrieval.

  • Phase 2 Roadmap: Hybrid retrieval combining BM25 with local ONNX query embeddings (transformers.js + sqlite-vec using Xenova/bge-small-en-v1.5) and automated GitHub Actions release asset index updates.

  • Phase 3 Roadmap: Modular ecosystem collections (@version-compat/mcp-core + on-demand ecosystem indexes) so large ecosystems can be downloaded selectively into ~/.cache/version-compat-mcp/.


11. Testing with MCP Inspector & Evaluation Suite

# Build TypeScript + SQLite FTS5 seed index (manifest.json, index-js-ts.db.sha256, metadata.json)
npm run build

# Run unit tests, 8 fixture project tests, safety guardrail tests, and stdio integration test
npm test

# Run golden dataset retrieval & guardrail benchmark (Recall@1, Recall@5, MRR@10, Leakage)
npm run eval

# Verify MCP protocol via official MCP Inspector CLI
npm run inspect:cli

# Launch interactive MCP Inspector Web UI
npm run inspect

# Verify npm package tarball before publishing
npm pack --dry-run

12. License

MIT License. See LICENSE for details. For third-party documentation and software/model attribution, see NOTICE.md and THIRD_PARTY_NOTICES.md.

Available Tools

5 tools
check_dependency_compatibilityA

Verifies engines.node, peerDependencies cross-compatibility, and deprecation notices deterministically using npm registry abbreviated metadata.

Inputs: dependencies (required), devDependencies, runtime_version.

detect_project_environmentA

Detects Node.js runtime, package manager (npm/pnpm/yarn/bun), locked dependency versions, and config paradigms (ESLint flat config, Tailwind v4 CSS-first, Next.js App/Pages router, tsconfig) from local project files without network calls.

Inputs: project_path (required).

get_upgrade_stepsA

Retrieves step-by-step migration guides, breaking changes, and official codemod commands between two versions of a library (e.g. Tailwind v3 -> v4, ESLint v8 -> v9, Next.js v14 -> v15) with GitHub tag source URLs.

Inputs: library (required), to_version (required), from_version (required), focus_area, +1 more.

get_versioned_setup_guideB

Returns citation-backed installation commands (formatted for the project's package manager), initial configuration file examples, and obsolete patterns to avoid for a specific library version.

Inputs: library (required), target_version (required), package_manager (required), runtime_version, +1 more.

search_versioned_docsA

Searches tag-pinned migration guides, release notes, and deprecation notices for a specific library version using SQLite FTS5 (BM25). Resolves version from project_path lockfile if version is omitted.

Inputs: query (required), library (required), top_k, version, +2 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 5 tools

    Disambiguation4/5

    Tools target distinct lifecycle stages: environment detection, compatibility verification, setup guide retrieval, upgrade path retrieval, and documentation search. Minor overlap exists between get_versioned_setup_guide and search_versioned_docs, but descriptions clarify scope (specific guide vs general search).

    Naming Consistency5/5

    All tools follow a consistent snake_case verb_noun pattern (detect_, check_, get_, search_). The naming is clear and predictable across the set.

    Tool Count5/5

    Five tools appropriately cover the setup and upgrade assistance domain. Each tool has a unique role and the count is well-scoped without redundancy.

    Completeness4/5

    Core workflow from environment detection through compatibility checks to setup/upgrade guidance is covered. Minor gap: no tool to list available library versions or suggest possible upgrades, though search_versioned_docs partially mitigates this.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      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
      15 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Gives coding agents the exact installed version of each dependency in a project from node_modules and lockfile, preventing deprecated API usage by grounding them in reality.
      3
      7 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding agents to verify, compare, and safely upgrade npm packages by scoring packages from public signals and sandboxed co-installation, detecting breaking API surface changes, and rewriting code that upgrades break.
      51 npm
      8
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding agents to fetch the real latest versions of packages from npm, PyPI, crates.io and the Go module proxy, then check manifests or whole projects for outdated dependencies and rewrite them in place. It also reports the current releases and underlying dependency stacks of AI coding tools like Claude Code, Codex and Gemini CLI.
      1
      MIT