AI 코딩 어시스턴트에게 로컬 코드 그래프, 의존성 드리프트 분석, 버전별 라이브러리 문서를 제공합니다.
다른 이름 vibgrate/cli, cli, @vibgrate/cli
- 스타
- 6
- Tools
- 23
- 다운로드, 30일
- —
- 최신 버전
- 2026.1112.1
- 마지막 커밋
- 2026년 11월 13일
- 라이선스
- Apache-2.0
ai-context MCP란?
ai-context은(는) MCP server입니다. AI 코딩 어시스턴트에게 로컬 코드 그래프, 의존성 드리프트 분석, 버전별 라이브러리 문서를 제공합니다. 23개 도구를 제공합니다. 예: orient, search_symbols, query_graph.
프로젝트 README에서 생성된 요약
ai-context MCP server 정보
ai-context는 개발자에게 로컬 코드 그래프, 의존성 드리프트 분석, 버전별 라이브러리 문서를 제공합니다. vg serve 명령어를 실행하면 Claude, Cursor, Windsurf와 같은 호환 클라이언트에 연결되는 로컬 우선 MCP server를 생성할 수 있습니다. 이 설정을 통해 데이터를 원격 서버에 업로드하지 않고도 호출 트리, 임포트 경로, 영향 범위 등 코드베이스에 대한 심층적인 지능형 정보를 어시스턴트가 활용할 수 있습니다.
이 server는 기술 부채와 보안 관리를 위한 특화된 도구를 제공합니다. 의존성 인벤토리를 위한 check_drift, CVE 추적을 위한 list_vulnerabilities, 패키지 업데이트 시 발생할 수 있는 문제를 예측하는 upgrade_impact가 포함되어 있습니다. 또한 library_docs 기능을 통해 AI가 프로젝트의 특정 버전에 일치하는 문서를 사용하도록 보장합니다. 모든 작업이 로컬 환경에서 실행되므로 프라이버시를 유지하면서, 오래된 학습 데이터로 인해 발생하는 API 환각 현상을 방지할 수 있습니다. 또한 압축 모드를 사용하여 방대한 도구 출력값을 모델에 전달하기 전에 축소함으로써 토큰 사용량과 비용을 줄일 수 있습니다.
활용 사례
- 1코드베이스 영향 분석어시스턴트에게 의존성 항목과 테스트 범위를 식별하여 변경 사항의 영향 범위를 결정하도록 요청합니다.
- 2정확한 버전의 문서 확보AI가 저장소에 설치된 라이브러리의 특정 버전에 맞는 정확한 API 구문을 사용하도록 합니다.
- 3복잡한 코드 구조 탐색두 심볼 사이의 최단 연결 경로를 찾거나 호출 트리를 추적하여 코드 간의 관계를 이해합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
ai-context MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 ai-context MCP 설치
$ claude mcp add cli -- npx -y @vibgrate/cliCursor에 ai-context MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"cli": {
"command": "npx",
"args": [
"-y",
"@vibgrate/cli"
]
}
}
}VS Code에 ai-context MCP 설치
.vscode/mcp.json
{
"servers": {
"cli": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@vibgrate/cli"
]
}
}
}VS Code CLI에 ai-context MCP 설치
$ code --add-mcp '{"name":"cli","type":"stdio","command":"npx","args":["-y","@vibgrate/cli"]}'Claude Desktop에 ai-context MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"cli": {
"command": "npx",
"args": [
"-y",
"@vibgrate/cli"
]
}
}
}Codex에 ai-context MCP 설치
$ codex mcp add cli -- npx -y @vibgrate/cliCodex config.toml에 ai-context MCP 설치
~/.codex/config.toml
[mcp_servers.cli] command = "npx" args = ["-y", "@vibgrate/cli"]
Gemini CLI에 ai-context MCP 설치
$ gemini mcp add -s user cli npx -- -y @vibgrate/cliGemini settings.json에 ai-context MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"cli": {
"command": "npx",
"args": [
"-y",
"@vibgrate/cli"
]
}
}
}ai-context MCP 도구 23
README에서 감지됨orientsearch_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 | — |
도구 23개 모두 보기도구 수 줄이기
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 | — |
구성
VIBGRATE_DSNVIBGRATE_RELAY_TOKEN
| 이름 | 설명 | 유형 |
|---|---|---|
| VIBGRATE_DSN | — | |
| VIBGRATE_RELAY_TOKEN | — |
자동 검사
2026년 11월 12일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음통과
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 모델에 대한 숨겨진 지침 없음통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음통과
README
GitHub에서 보기Want 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.
ai-context MCP 질문
ai-context MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add cli -- npx -y @vibgrate/cli를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
ai-context MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
ai-context MCP는 어떤 도구를 제공하나요?
23개 도구를 제공합니다. 예: orient, search_symbols, query_graph, get_node, find_path.
AI 컨텍스트 창 제한 문제를 어떻게 해결하나요?
컨텍스트 압축 기술을 사용하여 도구 출력값과 이전 대화 내용을 모델에 전달하기 전에 축소함으로써 토큰을 절약합니다.
서버를 통해 AI 어시스턴트가 어떤 정보에 접근할 수 있나요?
어시스턴트는 코드 맵, 오프라인 드리프트 데이터, 로컬 모델, 그리고 프로젝트 버전에 맞는 라이브러리 문서에 접근할 수 있습니다.