Fournit aux assistants de codage IA un graphe de code local, une analyse de dérive des dépendances et une documentation de bibliothèque conforme aux versions utilisées.
Aussi connu sous vibgrate/cli, cli, @vibgrate/cli
- Étoiles
- 6
- Outils
- 23
- Téléchargements, 30 jours
- —
- Dernière version
- 2026.1112.1
- Dernier commit
- 13 nov. 2026
- Licence
- Apache-2.0
Qu'est-ce que ai-context MCP ?
ai-context est un serveur MCP. Fournit aux assistants de codage IA un graphe de code local, une analyse de dérive des dépendances et une documentation de bibliothèque conforme aux versions utilisées. Il expose 23 outils, comme orient, search_symbols, query_graph.
Résumé généré à partir du README du projet
À propos du MCP server ai-context
Fournir aux assistants de codage IA un graphe de code local, une analyse de dérive des dépendances et une documentation de bibliothèque conforme aux versions utilisées est ce que permet ai-context aux développeurs. En exécutant la commande vg serve, vous créez un MCP server local-first qui se connecte à des clients compatibles comme Claude, Cursor ou Windsurf. Cette configuration permet à votre assistant d'accéder à une intelligence approfondie de votre base de code, incluant les arbres d'appels, les chemins d'importation et les surfaces d'impact, sans envoyer vos données sur un serveur distant.
Le serveur propose des outils spécialisés pour gérer la dette technique et la sécurité. Il inclut check_drift pour l'inventaire des dépendances, list_vulnerabilities pour le suivi des CVE, et upgrade_impact pour prédire les régressions lors des mises à jour de packages. Il dispose également de library_docs pour garantir que l'IA utilise une documentation correspondant aux versions spécifiques de votre projet. Comme tout s'exécute sur votre machine, la confidentialité est préservée tout en évitant les hallucinations d'API souvent causées par des données d'entraînement obsolètes. Vous pouvez également utiliser le mode compression pour réduire la consommation de tokens et les coûts en réduisant la taille des sorties d'outils volumineuses avant qu'elles n'atteignent le modèle.
Ce que vous pouvez faire avec
- 1Analyser l'impact sur la base de codeDemandez à l'assistant de déterminer le périmètre d'impact d'un changement en identifiant les dépendances et les tests concernés.
- 2Obtenir une documentation précise selon la versionGarantissez que l'IA utilise la syntaxe API correcte pour la version spécifique d'une bibliothèque installée dans votre dépôt.
- 3Naviguer dans des structures de code complexesTrouvez le chemin le plus court entre deux symboles ou tracez des arbres d'appels pour comprendre les relations au sein du code.
Extrait du README du projet. Chaque cas d'utilisation est vérifié par rapport à une citation du document.
Comment installer ai-context MCP
Formats vérifiés le 10 nov. 2026Ajouter à CursorAjouter à GooseInstaller ai-context MCP dans Claude Code
$ claude mcp add cli -- npx -y @vibgrate/cliInstaller ai-context MCP dans Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"cli": {
"command": "npx",
"args": [
"-y",
"@vibgrate/cli"
]
}
}
}Installer ai-context MCP dans VS Code
.vscode/mcp.json
{
"servers": {
"cli": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@vibgrate/cli"
]
}
}
}Installer ai-context MCP dans VS Code CLI
$ code --add-mcp '{"name":"cli","type":"stdio","command":"npx","args":["-y","@vibgrate/cli"]}'Installer ai-context MCP dans Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"cli": {
"command": "npx",
"args": [
"-y",
"@vibgrate/cli"
]
}
}
}Installer ai-context MCP dans Codex
$ codex mcp add cli -- npx -y @vibgrate/cliInstaller ai-context MCP dans Codex config.toml
~/.codex/config.toml
[mcp_servers.cli] command = "npx" args = ["-y", "@vibgrate/cli"]
Installer ai-context MCP dans Gemini CLI
$ gemini mcp add -s user cli npx -- -y @vibgrate/cliInstaller ai-context MCP dans Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"cli": {
"command": "npx",
"args": [
"-y",
"@vibgrate/cli"
]
}
}
}Outils MCP ai-context 23
Détectés depuis le READMEorientsearch_symbolsquery_graphget_nodefind_pathimpact_oftests_forget_graph_summarylist_areaslist_hubsget_factsguide_node
| orient | — | |
| search_symbols | — | |
| query_graph | — | |
| get_node | — | |
| find_path | — | |
| impact_of | — | |
| tests_for | — | |
| get_graph_summary | — | |
| list_areas | — | |
| list_hubs | — | |
| get_facts | — | |
| guide_node | — |
Afficher les 23 outilsAfficher moins d'outils
check_driftvuln_attributionlist_vulnerabilitiesupgrade_impactlist_modelsresolve_librarylibrary_docsreview_docsearch_codegraph_impactrun_command
| check_drift | — | |
| vuln_attribution | — | |
| list_vulnerabilities | — | |
| upgrade_impact | — | |
| list_models | — | |
| resolve_library | — | |
| library_docs | — | |
| review_doc | — | |
| search_code | — | |
| graph_impact | — | |
| run_command | — |
Configuration
VIBGRATE_DSNVIBGRATE_RELAY_TOKEN
| Nom | Description | Type |
|---|---|---|
| VIBGRATE_DSN | — | |
| VIBGRATE_RELAY_TOKEN | — |
Vérifications automatisées
Exécuté le 12 nov. 2026Rapport complet →A passé nos vérifications automatisées. Il ne s'agit pas d'un audit de sécurité : lisez le code et donnez au serveur l'accès le plus restreint dont il a besoin. Fonctionnement des vérifications
- Dépôt source lié et accessibleRéussi
- Licence open source (OSI)Réussi
- Commit ou version publiée au cours de l'année écouléeRéussi
- Nom du package non proche d'un package populaireRéussi
- L'endpoint distant utilise HTTPSNon vérifié
- Les outils destructifs sont étiquetésNon vérifié
- Aucune instruction cachée destinée au modèleRéussi
- Aucun avis critique dans le package ou ses dépendancesRéussi
README
Voir sur GitHubWant to help? See CONTRIBUTING.md and good first issues.
npx @vibgrate/cli scan # drift score + upgrade priorities
npm install -D @vibgrate/cli # install for repeat runs
vg answers three questions for any repo:
- What is this codebase? — A deterministic code graph: call trees, import paths, impact surfaces, dependency facts.
- How far behind is it? — A ranked DriftScore (0–100) with runtime/framework lag, dependency age and EOL proximity, and a prioritized fix list. Exposure is scored separately as a RiskScore; the two together are the DriftRisk Index. The full methodology — formulas, sources, and limitations — is published as a whitepaper under CC BY 4.0 (DOI 10.5281/zenodo.21336304).
- Can we fix it here? — VG Code, a coding agent whose search tool is the code graph, not a grep — in your terminal as
vg codeand as the VG Code panel in Vibgrate for VS Code — plusvg fix, ranked upgrade plans it can apply.
Everything runs on your machine. No API key, no network call, no data leaving your repo unless you explicitly push. The vibgrate command is an alias for vg — they are interchangeable.
See it run
Try it in 10 seconds
No install, no signup:
npx @vibgrate/cli scan # drift score + upgrade priorities
npx @vibgrate/cli build # build the code graph
npx @vibgrate/cli ask "what does AuthService do?"
npx @vibgrate/cli code # a coding agent — it asks before every edit
Install for repeat runs:
npm install -D @vibgrate/cli
npx vg scan # vg is the primary command; vibgrate is an alias
Local binaries live in
node_modules/.bin— usenpx vg(or an npm script) unless you install globally.
Windows installation
Windows is supported with Node.js 24 or newer. PowerShell is the preferred shell for the Windows installer:
irm https://vibgrate.com/install.ps1 | iex
If you prefer npm, install the CLI globally:
npm install -g @vibgrate/cli
For a one-off run without changing PATH, use:
npx @vibgrate/cli scan
A global npm install places the vg.cmd and vibgrate.cmd shims in npm's global prefix. Check the exact location with npm config get prefix; if vg is not found, add that directory to your user PATH, then open a new PowerShell window. Verify the installation with:
vg --help
vg doctor
vg doctor is a read-only diagnostic command. If vg conflicts with another command on your system, use the identical vibgrate command instead. Command examples elsewhere in this README use POSIX path syntax; adapt paths to PowerShell on Windows.
Use it with your AI assistant
vg serve starts Vibgrate AI Context — a local-first MCP server that
gives any MCP-compatible assistant (Claude, Cursor, Windsurf, Copilot, Gemini
CLI, …) your code map, offline drift, local models, and version-correct
library docs, all from your machine (no account, nothing uploaded; thin
local docs fall through to the hosted catalog unless you pass --local). No
context-window stuffing, no hallucinated APIs. The map keeps itself fresh:
when files change — including edits the assistant itself just made — the next
tool call rebuilds it incrementally before answering, with no watcher or
daemon involved.
Wire it up in one command:
vg install # interactive: pick your assistant(s) and done
vg install --all # install for every detected assistant at once
This writes the MCP config for your chosen tool(s) and installs a skill that teaches the assistant how to query the graph. After reloading your assistant you get graph-aware answers: call trees, impact analysis, drift findings, version-correct library docs — all from local data. The token savings are measured and published, methodology included, at vibgrate.com/cli/benchmarks/token-savings.
Browse all 21+ supported assistants and their skill descriptions at vibgrate.com/skills.
Cut what your assistant re-reads: context compression
Every turn, your AI assistant re-sends the whole conversation — including the 20,000-line test log, the 400-row JSON payload, and the grep output it has already acted on. You pay for that context again on every step. Vibgrate CLI compresses tool output and older turns before they reach the model, keeps the originals retrievable on your machine, and reports what it saved.
vg install claude --compress # point Claude Code at the listener and start it (undo with `vg uninstall claude`)
vg savings # tokens and estimated dollars saved, today / 7 days / 30 days
There is no separate command to learn: compression is a mode of the server you
already run and a flag on the installer you already use. vg install <agent> --compress writes the agent's own base-URL config, starts the listener in the
background (or reuses one already running) and, for Claude Code, adds a
SessionStart hook that brings it back after a reboot. vg serve --compress
serves the code map and compresses in one foreground process; vg serve --compress --background starts only the listener and returns. For a single
session without writing any config, vg serve --compress claude runs one
agent through it and restores your environment when it exits. Inside vg code
it is already on — bulky tool results are compressed before they re-enter the
loop, and the model can pull any original back with vg_retrieve.
What it does, in the order it runs:
- Routes each block by what it is — JSON arrays, logs and build output, grep results, diffs, HTML, tables, config files, source code, prose — and applies the compressor built for that shape. Errors, ids, stack traces and the lines that match what you asked are always kept.
- Lossless first. Repeated lines, grep headings and diff index lines fold into byte-reversible markers. Lossy compression runs only when it saves clearly more, and never on file reads or edits, so read-then-edit stays exact.
- Nothing is lost. Compressed blocks carry a marker; the model (or you, with
vg serve retrieve <hash>) can pull back the original or just the slice it needs. Originals live in a short-lived local store — nothing is uploaded. - Prefix-cache aware. The default
cachemode compresses only the newest turn so your provider's prompt cache keeps hitting;tokenmode compresses everything eligible for the largest saving. - Works with any agent.
vg install <agent> --compresssupports Claude Code, Codex, Cursor, Aider, Copilot, OpenCode, Cline, Continue, Goose, OpenHands, Gemini CLI, Kimi, Grok and more;vg uninstall <agent>restores their config byte-for-byte. Or use the SDK wrappers for the Anthropic, OpenAI and Vercel AI SDK shapes.
Everything runs locally and offline. The listener binds to loopback, forwards
your provider credentials untouched, redacts secret shapes before anything is
written to disk, and never phones home. vg serve config lists every knob and
vg serve config set KEY VALUE changes one.
Tools
vg serve exposes 24 MCP tools (plus two memory tools with --memory):
- orient — start here: project overview, entry points, where to look first.
- search_symbols — find a symbol by name or literal string.
- query_graph — find code by meaning: symptoms, relationships, what-breaks-if.
- get_node — inspect one symbol: signature, callers, callees, area.
- find_path — shortest connection between two symbols, with each hop's edge kind;
calls_onlyfollows calls and gives each call-site line. - impact_of — blast radius of a change: dependents, files, covering tests, risk.
- tests_for — which tests cover a symbol.
- get_graph_summary — code map overview: counts, languages, top areas and hubs.
- list_areas — code areas (communities) by size.
- list_hubs — most-depended-on symbols.
- get_facts — deterministic facts for a node (contract / invariant / characterization).
- guide_node — cited standards and practices for a node (OWASP/CWE).
- check_drift — offline dependency inventory with optional git who-added attribution.
- vuln_attribution — who introduced each open vulnerability, exposure windows, CRA remediation metrics.
- list_vulnerabilities — known vulnerabilities from the last
vg scan --vulns: CVE, severity, CVSS, fixed version, and EPSS or known-exploited fields when that scan recorded them. - upgrade_impact — what breaks if you upgrade a package: major distance, import blast radius, vulns fixed.
- list_models — local models on disk (Ollama / LM Studio / gguf).
- resolve_library — resolve a library to its canonical id and the version your project uses.
- library_docs — version-correct usage docs for a library, sliced to a token budget.
- compress_content / retrieve_original / compression_stats (with
--compress) — shrink a tool output before it enters the context, expand a marker back to the original or just the slice you need, and report what compression saved. - memory_search / memory_save (with
--memory) — project-scoped memory shared across your AI agents. - review_doc (with
--review) — write the review document for a change: open it, patch a block by id, check every pin, read the history, restore a version, and read and answer the comments people left on the pushed document in Vibgrate Cloud. Saved under.vibgrate/review-docs/, never in the repository.
The last three groups are listed only when you ask for them. Every advertised tool schema is re-sent on every agent step, so a capability nobody enabled is a standing cost.
Prefer the hosted server over your team's scan data? Vibgrate Cloud MCP connects your assistant to Vibgrate Cloud (OAuth 2.1, 14 read-only tools).
Understand any codebase
Build the graph once, query it continuously. These are recorded replays of the real CLI on sample repos — run them live.
vg build # index the repo (incremental; re-run after changes)
vg show src/auth/service.ts # what this file does, calls, and is called by
vg ask "where is rate limiting enforced?"
vg impact src/db/connection.ts # what breaks if this changes + tests to run
vg path src/api/handler.ts src/db/query.ts # shortest call path between two files
vg tree src/server.ts # call tree rooted at a node
vg insights # overview: hubs, hotspots, untested paths
The graph is byte-deterministic and reproducible — the same repo always produces the same graph on every machine.
vg share # make the graph committable + auto-updating for the team
vg serve # start Vibgrate AI Context (local-first MCP: code map + drift + version-correct docs)
VG Code — write the change, not just the report
VG Code is the coding agent inside Vibgrate CLI. Its search tool is the deterministic code graph — not a grep, not embeddings over chunks — and it runs on a local model or a hosted one, your choice.
vg code # guided: pick a model, then describe tasks
vg code "add a --timeout flag to the scan command"
Does it write to your disk? Yes — through steps you approve, and only those. Read-only steps (search, read, list, impact) run without prompting; every edit and every command asks first. --auto runs the same loop with no prompts for CI. Without a terminal and without --auto, vg code refuses to start rather than writing unattended.
Two surfaces, one agent. vg code is the terminal surface. The VG Code panel in Vibgrate for VS Code is the graphical one, and for most people it will be the one they live in: warm sessions between tasks, chat history, inline Approve / Reject cards with diffs, checkpoints, and @-mentions. The extension does not re-implement the agent — it runs the one shipped with this CLI over --stream-json and relays your decisions to it, so terminal, editor, and CI behave the same way.
Why an agent here, and not another chat window?
- Search is the graph.
search_coderesolves symbols, callers, and callees from the mapvg buildproduced — so the model gets the three functions that matter, not forty files that mention the word. - Blast radius before the edit.
graph_impacttells the model what depends on a symbol before it changes it, andvg testsknows which tests to run after. - Version-correct library docs.
library_docspins to the version in your lockfile, so the model writes against the API you actually have. - Invented identifiers are blocked, not flagged. Before an edit is written, its replacement body is scanned against the graph's identifier trie. A symbol the graph does not know — and that is not already local to the target file — stops the write.
- Local models are first-class, hosted models are one flag away. With a pulled model there is no account and no key, and Code Modes fit the model to the machine. When a task needs more, Vibgrate Relay supplies hosted models on your Vibgrate account — no per-provider API keys — and falls back to your local model if it is unreachable.
- It adopts the MCP servers you already have.
.mcp.json(Claude Code),.cursor/mcp.json, and.vscode/mcp.jsonare read and merged with.vibgrate/code.json, which wins on a name clash. - Cost is visible. A token/$ meter after each task and on
/cost;vg savingsreports graph-backed calls per model.
Trade-off: no model ships with the CLI, and VG Code is only as good as the model you point it at. A 7B local model is not a frontier model — it buys you privacy, offline inference, and no per-token cost. Relay buys you capacity at a per-token price. Pick the tier that matches the task; the graph grounding is the same either way.
A session, end to end
VG Code · graph-grounded coding · v2026.x
✔ Code map built
✔ Model catalog loaded
◆ Ready — ollama/qwen2.5-coder:7b · graph 48213. Describe a task, or /help.
code › add a --timeout flag to the scan command and use it
→ search_code(query: --timeout flag scan command)
scanCommand (function) src/commands/scan.ts:12
→ graph_impact(symbol: runScan)
3 symbol(s) depend on runScan: …
→ edit_file(path: src/commands/scan.ts, …)
? Apply edit to src/commands/scan.ts? [Y/n] y
✔ edited src/commands/scan.ts
→ run_command(command: npm test -- scan)
? Run `npm test -- scan`? [y/N] y
✔ exit 0 … 12 passing
✔ added a --timeout flag to scan and covered it with tests
+6 -1 across 1 file(s) · via ollama/qwen2.5-coder:7b
What happened, step by step:
- The code map is built or refreshed incrementally — only changed files re-parse.
- The model catalog loads and you pick a local model or a hosted provider. Before pulling a local model, a memory pre-flight compares its estimated footprint against available RAM/VRAM and refuses a model this machine cannot run.
- Vibgrate Graph (
vg serve) starts as a child process for the life of the session and stops when you exit. Every graph call is attributed to VG Code and the model in use. - The agent loops: search → read → assess impact → edit → run.
- You approve each mutating step, or it runs unattended under
--auto. - Edits land through a deterministic merge, so the change goes exactly where it was meant to.
Approval modes
| Mode | Behavior |
|---|---|
| Interactive (default) | Read-only steps run freely. Every edit and every command asks first. |
--auto |
No prompts. A denylist blocks catastrophic commands — filesystem wipes, curl … | sh, force-push, sudo. For CI and scripted runs. |
--single |
One-shot: propose a diff and stop. No tool loop, no commands. Dry-run unless you pass --apply --yes. |
--max-steps <n> caps the loop (default 24). --worktree runs the whole session in an isolated git worktree so nothing touches your main tree until you apply it.
Which model — local, or hosted through Relay
Code Modes pick a local model that actually fits this machine, checked against your real RAM, VRAM, and disk before anything downloads:
| Mode | Intent |
|---|---|
| Spark | Fast, small footprint — quick edits and tight memory |
| Flow | Balanced default for day-to-day coding |
| Forge | Heavier pack when you have headroom and want more capacity |
vg models # what's set, and what fits this machine
vg models install flow # install the pack (--dry-run to preview)
vg models pull qwen2.5-coder:7b
Vibgrate Relay is the hosted tier that supplements those local models when a task needs more capacity than the machine has. One Vibgrate account and endpoint, a curated catalog of hosted models, per-token metering against prepaid credit — and no per-provider API keys to manage:
export VIBGRATE_RELAY_TOKEN=… # Relay is then preferred, with local fallback
vg code --provider vibgrate-relay --model <slug>
You are not locked to it. --provider also takes ollama, lmstudio, foundry-local, llama-cpp, openrouter, litellm, openai, and together; those API keys are read from the environment only (OPENROUTER_API_KEY and friends), never passed as flags. With no --provider, vg code uses what you have already configured — Relay first if its token is set, then another hosted key, then a local model — and never dials an endpoint you did not set up. --local keeps it on-device.
Tools the agent has
| Tool | What it does | Approval |
|---|---|---|
search_code |
Search the code graph — symbols and relations, plus a literal sweep for exact phrases | free |
read_file / list_files |
Read a file or line range; list files in the map | free |
graph_impact |
Blast radius of changing a symbol | free |
library_docs |
Version-correct docs for a dependency you actually have installed | free |
edit_file / create_file / delete_file / apply_patch |
Change the working tree | approved |
run_command |
Run tests, builds, anything else | approved |
web_fetch / web_search |
Fetch or search the public web — untrusted, secret-redacted, size-capped | approved |
browser_* / read_notebook / spawn_subagent |
Drive a browser, work in Jupyter notebooks, delegate a sub-task | approved |
mcp__<server>__<tool> |
Tools from your configured MCP servers | free if read-only, else approved |
In-session commands
| Command | What it does |
|---|---|
/undo |
Revert the files changed by the last task |
/diff |
Show the last change |
/model |
Switch model without leaving the session |
/cost |
Running token and dollar cost (local models are free) |
/compact |
Condense the session so far into one checkpoint recap |
/help / /exit |
List commands / quit |
Where state lives
| On disk | In the session |
|---|---|
The code map (.vibgrate/), gitignored |
Conversation and step history |
Your config (.vibgrate/code.json) |
The /undo stack |
| The edits themselves — local and git-reversible | The token/$ meter |
Session store, so --continue can resume |
The vg serve child process |
--continue resumes your most recent session: it recaps what was already done for the model and restores /undo.
Questions sur ai-context MCP
Comment ajouter ai-context MCP à Claude Code ?
Exécutez claude mcp add cli -- npx -y @vibgrate/cli dans votre terminal. Ajoutez --scope user pour le rendre disponible dans tous les projets.
Comment ajouter ai-context MCP à Cursor ?
Ouvrez ~/.cursor/mcp.json et ajoutez le serveur sous mcpServers, avec la configuration Cursor indiquée dans la section d'installation ci-dessus.
Quels outils ai-context MCP fournit-il ?
Il expose 23 outils, dont orient, search_symbols, query_graph, get_node, find_path.
Comment cela aide-t-il à gérer les limites de la fenêtre de contexte de l'IA ?
Il utilise la compression de contexte pour réduire la taille des sorties d'outils et des anciens tours de conversation avant qu'ils n'atteignent le modèle, ce qui permet d'économiser des tokens.
À quel type d'informations l'assistant IA peut-il accéder via le serveur ?
L'assistant peut accéder à une carte du code, à des données de dérive hors ligne, à des modèles locaux et à une documentation de bibliothèque correspondant aux versions utilisées.