version-compat-mcp
v0.2.0Version-Aware Setup & Migration MCP Server for JS/TS & Python ecosystems (Antigravity, Codex, Claude Code, Cursor)
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). 1. Why version-compat-mcp? (And How It Differs from Generic Doc MCPs) 2. Core Architecture 3. Supported Libraries & Versions 4.
Summary extracted from the README.
version-compat-mcp
"Your agent reads the wrong docs.
version-compatmakes it read the right version."
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
- Why
version-compat-mcp? (And How It Differs from Generic Doc MCPs) - Core Architecture
- Supported Libraries & Versions
- Quick Start & Host Agent Configuration
- MCP Tools Reference (5 Tools)
- Real-World Prompt Examples
- Safety & Epistemic Guardrails
- Data Collection, Upstream Licenses & Attribution Policy
- Privacy & Security Policy
- Known Limitations & Roadmap
- Testing with MCP Inspector & Evaluation Suite
- License
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/viteor@tailwindcss/postcss). - ESLint v9 vs. v8: Generating legacy
.eslintrc.jsonor.eslintignorefiles in an ESLint v9 project that requireseslint.config.mjs(Flat Config). - Next.js 15 & React 19: Using synchronous
cookies(),headers(), orparamsin Next.js 15 (where Dynamic Request APIs are asynchronousPromises), or proposing incompatible React 18 / Node.js combinations. - FastAPI & Pydantic v2: Suggesting deprecated
@app.on_event("startup")instead oflifespancontext manager, or Pydantic v1class Config:/@validatorinstead ofConfigDictand@field_validator/@model_validator. - Package Manager Mismatch: Suggesting
npm installin a repository locked withpnpm-lock.yaml,bun.lock,yarn.lock, or proposingpip installin an activeuvorpoetryworkspace.
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
- 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. - Zero-Config & Precomputed Index: Built on Node.js native
node:sqlite(DatabaseSyncwithFTS5andunicode61 tokenchars '@/_-.')—requiring zero API keys and zero C++node-gypcompilation duringnpxexecution. - Strict
stdioProtocol Hygiene:stdoutis strictly reserved for JSON-RPC 2.0 frames. Accidentalconsole.logcalls are intercepted, and internal diagnostics write exclusively toprocess.stderronly whenDEBUG="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.mdandAGENTS.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:
- Environment & Compatibility Audit
"Check the current project's Next.js, React, and Node.js versions using
version-compatand let me know if there are any peerDependency or engine compatibility issues." - 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."
- ESLint v8 → v9 Flat Config Migration
"Migrate our
.eslintrc.jsonand.eslintignoresetup to ESLint v9 Flat Config. Cite the official ESLint v9 migration docs." - Next.js 14 → 15 Breaking Changes
"What breaking changes affect
cookies(),headers(), andparamswhen 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 aproject_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"): Returnsepistemic_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-mcpdoes not claim ownership of third-party documentation.- Every search result and migration guide step includes original
source_urllinks 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.mdandTHIRD_PARTY_NOTICES.mdfor 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.envfiles 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 viaVERSION_COMPAT_OFFLINE=1. - SHA-256 Integrity: Precomputed index databases are verified against
seed/index-js-ts.db.sha256andseed/manifest.jsonbefore loading. - See
SECURITY.mdfor 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-vecusingXenova/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.