Guard your dependency bumps: an MCP server that tells your AI agent exactly which parts of YOUR code break when you upgrade a dependency, and verifies AI-written code against the API that's actually installed — by static analysis, never by running third-party code.
Project description
BumpGuard 🛡️
Guard your dependency bumps. BumpGuard is a Model Context Protocol (MCP) server that tells your AI coding agent exactly which lines of your code break when you upgrade a dependency — and verifies AI‑written code against the API that is actually installed, so it stops calling functions that don't exist.
It does this by static analysis only. BumpGuard never imports or executes third‑party code; it reads a package's real public API straight from its source.
Docs tell your agent what should exist. BumpGuard tells it what actually exists here.
Why this exists
The #1 frustration developers report with AI coding tools is code that's "almost right, but not quite." A huge slice of that is API drift and hallucination:
- The model writes
pydantic.BaseSettingsoropenai.ChatCompletion.create(...)— perfectly valid two versions ago, gone in the version you have installed. - You bump
pandasfrom 1.5 to 2.2 and discover the breakage one stack trace at a time. - A changelog lists 1,800 breaking changes; you only care about the three your code actually touches.
BumpGuard closes that gap with ground truth from your environment instead of the model's memory.
What it does
A real example — upgrading pydantic 1 → 2 in code that uses BaseSettings:
// check_upgrade(package="pydantic", to_version="2.0.3", from_version="1.10.13", code="...")
{
"safe_to_upgrade": false,
"summary": { "breaking": 1, "total_api_changes": 4919, "breaking_api_changes": 2015 },
"findings": [
{
"symbol": "pydantic.BaseSettings",
"line": 2,
"severity": "breaking",
"message": "You use 'pydantic.BaseSettings', which no longer exists in the target version...",
"suggestion": "Consider 'pydantic.v1.env_settings.BaseSettings'"
}
]
}
Out of 2,015 breaking API changes, BumpGuard surfaced the one that affects this code — with the line number and a fix hint.
Tools
| Tool | What it answers |
|---|---|
check_upgrade ⭐ |
"If I upgrade package to to_version, what in this code breaks?" Diffs the installed (or from_version) API against the target and reports only the changes your code actually hits, with severity and fix hints. |
diff_versions |
"What changed between two versions of this library?" The raw breaking‑change list, no code scan — good for planning a migration. |
verify_snippet |
"Do the imports and API calls in this code really exist here?" Catches hallucinated/typo'd package names (slopsquatting) and attributes that aren't on the installed package. |
check_import |
"Is this package installed? If not, what's the closest real name?" |
list_symbols |
"What's the real public API of this package?" Discover functions/classes/methods + signatures instead of guessing — for the installed version or any fetched version. |
list_languages |
Which ecosystem providers are available. |
Every answer is grounded in evidence (installed version, source location). Because analysis is static, "no findings" means "nothing proven to break," not a guarantee — BumpGuard is explicit about that in its output.
Install
pip install bumpguard-mcp
Requires Python 3.10+. The server speaks MCP over stdio.
Install BumpGuard into the same environment as the project you're working on, so it sees the packages you actually have installed.
Configure your MCP client
Claude Desktop / Claude Code (claude_desktop_config.json):
{
"mcpServers": {
"bumpguard": {
"command": "bumpguard-mcp"
}
}
}
Cursor / Windsurf / VS Code (Copilot) — point your MCP config at the bumpguard-mcp command (or python -m bumpguard.server). Any MCP‑compatible client works.
Then ask your agent things like:
- "Before upgrading pandas to 2.2, check whether my data pipeline breaks."
- "Verify this snippet actually uses the installed OpenAI SDK."
- "List the real methods on
httpx.Client."
How it works
┌──────────────── language‑neutral core ────────────────┐
MCP tools → │ diff engine · breaking‑change classifier · analyzer │
│ (matches API changes against YOUR usage) │
└───────────────────────┬──────────────────────────────┘
│ Provider interface
┌───────────────────────┴──────────────────────────────┐
│ Python provider │ .NET (NuGet) │ Java (planned) │
│ • AST surface │ • DLL metadata │ • jar bytecode │
│ • usage scanner │ • Roslyn scan │ │
│ • wheel fetch │ • nupkg fetch │ │
└──────────────────────────────────────────────────────┘
- Extract a package's public API surface by parsing its source with Python's
ast— for the installed version, and for the target version (downloaded as a wheel and unpacked, never installed or executed). - Diff the two surfaces into removed / signature‑changed / added symbols, and classify each as breaking, potentially breaking, or info.
- Scan your code (also via
ast) for usages — resolving import aliases, re‑exports, instance‑method calls, and the keyword/positional arguments each call passes. - Match usages against changes and report a precise, per‑line verdict.
Safety: BumpGuard never imports third‑party code, so there are no import side effects, no hangs from heavy packages, and no arbitrary code execution. Wheel downloads are sandboxed to a temp dir, time‑bounded, and guarded against path traversal / zip bombs.
Multi‑language by design
BumpGuard is built around a pluggable provider interface. The diff engine, breaking‑change classifier, analyzer, reporting, and MCP tools are all language‑neutral; only the surface extraction and usage scanning are ecosystem‑specific.
- ✅ Python (PyPI) — available now.
- ✅ .NET (NuGet) — available now. Reads public API from assembly metadata via reflection-only loading (no code executed); needs the .NET SDK (
dotnet) on PATH. A small helper is built once on first use. - 🔜 Java (Maven) — extract from
.jarbytecode. - 🔜 JS/TS (npm) — parse
.d.tsdeclarations.
Adding an ecosystem means implementing one Provider — see docs/ADD_A_PROVIDER.md.
.NET specifics (v1)
- Pass
language: "dotnet". Example: "Before upgrading Azure.AI.OpenAI to 2.1.0, check whether my client code breaks (from_version 1.0.0-beta.17)." - Supported:
check_upgrade,diff_versions,list_symbols,check_import. - Prefer passing
from_version— the "installed" baseline is taken from the NuGet global cache, which isn't your project's pinned version. - Reliable signal: type / method / property removals and additions (e.g. the
OpenAIClient→AzureOpenAIClientrename is caught as a breaking removal with a suggestion). Parameter-level diffs run only for unambiguous single-overload members; overloaded members are tracked by presence (a documented v1 limit). - Fully-qualified references are reported confidently; short names resolved via
usingare reported as lower-confidence "potentially breaking" to avoid false hard-breaks from namespace collisions. verify_snippetis not supported for .NET in v1 (accurate C# hallucination detection needs semantic binding).
Known limitations (v1, Python)
BumpGuard is honest about static analysis. It may miss (false negatives) or, rarely, over‑flag (false positives):
- Dynamically generated APIs (
__getattr__modules, plugin registries,boto3‑style clients). BumpGuard detects__getattr__modules and suppresses confident "missing symbol" findings under them. - Members created at runtime that aren't visible in source.
- Compiled (C/Rust) extension internals — the Python‑level surface is still read.
- Deep instance‑flow tracking is limited to direct
x = Class(...)patterns. - Star re‑exports (
from .x import *) are not expanded.
Treat findings as high‑signal guidance, and absence of findings as "not proven unsafe," not a guarantee.
Development
git clone https://github.com/appcreationsca/bumpguard-mcp
cd bumpguard-mcp
python -m venv .venv && . .venv/Scripts/activate # Windows
pip install -e ".[dev]"
pytest
The test suite (42 tests) runs offline using fixture packages — no network required.
Releasing
Releases are automated via GitHub Actions. To cut a release:
- Bump the version in
pyproject.tomlandsrc/bumpguard/__init__.py. - Move the
CHANGELOG.md"Unreleased" notes under a new version heading. - Commit, then tag and push:
git tag v0.1.0
git push origin v0.1.0
The Release workflow runs the tests, builds the wheel + sdist, and publishes to PyPI via Trusted Publishing (OIDC — no stored tokens). The CI workflow runs the test matrix (Linux + Windows, Python 3.10/3.13) on every push and PR.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bumpguard_mcp-0.1.0.tar.gz.
File metadata
- Download URL: bumpguard_mcp-0.1.0.tar.gz
- Upload date:
- Size: 40.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82d1b879043d09d5944217388ec57c19b3f8d56cdb148f5b7f2d3c5048a33b53
|
|
| MD5 |
672af558922627a525b4de9b84268f2c
|
|
| BLAKE2b-256 |
528e71c9d2d760b440309eb8a8d746fae9291e958833c3c14d764fcadbb89e09
|
Provenance
The following attestation bundles were made for bumpguard_mcp-0.1.0.tar.gz:
Publisher:
release.yml on appcreationsca/bumpguard-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bumpguard_mcp-0.1.0.tar.gz -
Subject digest:
82d1b879043d09d5944217388ec57c19b3f8d56cdb148f5b7f2d3c5048a33b53 - Sigstore transparency entry: 1830377827
- Sigstore integration time:
-
Permalink:
appcreationsca/bumpguard-mcp@d3c07c6965a84bdde8370cf721014a6601cf4034 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/appcreationsca
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d3c07c6965a84bdde8370cf721014a6601cf4034 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bumpguard_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bumpguard_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 42.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70c80d10193b210d733a8689ed88ecff160b9803bcae1e96c884a5aa58dc8abf
|
|
| MD5 |
7e3aade57003700f35858864aa91cda8
|
|
| BLAKE2b-256 |
2c439474e069c74a766a65baf37057395526930d6043d79c84577039668a8ce8
|
Provenance
The following attestation bundles were made for bumpguard_mcp-0.1.0-py3-none-any.whl:
Publisher:
release.yml on appcreationsca/bumpguard-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bumpguard_mcp-0.1.0-py3-none-any.whl -
Subject digest:
70c80d10193b210d733a8689ed88ecff160b9803bcae1e96c884a5aa58dc8abf - Sigstore transparency entry: 1830378097
- Sigstore integration time:
-
Permalink:
appcreationsca/bumpguard-mcp@d3c07c6965a84bdde8370cf721014a6601cf4034 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/appcreationsca
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d3c07c6965a84bdde8370cf721014a6601cf4034 -
Trigger Event:
push
-
Statement type: