ivygrep
OfficialThis server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
What it does
Answers questions about code. Ask in plain words and get ranked files, line numbers, and previews. Exact text, symbols, references, and callers use the same index.
Feeds coding agents.
ig contextbuilds one evidence pack for a task: the code, its definitions, callers, dependencies, and tests, within a token budget. Claude Code, Codex, Cursor, Gemini CLI, OpenCode, and other MCP clients can call it.Stays on your machine. Files, queries, embeddings, and indexes are local. There is no account and no telemetry. The default model downloads 33.5 MB of pinned assets on first use and runs on CPU.
Keeps up. A daemon watches your files and updates what changed. Git worktrees share one base index.
ivygrep runs on macOS, Linux, and Windows. It supports 45 language and file types.
Related MCP server: Delphi Code
Install
Platform | Command |
macOS, Linux |
|
macOS, Linux |
|
Windows |
|
Windows |
|
Every method installs one binary, ig. The installers select a compatible build and verify its SHA-256 checksum. WinGet can lag GitHub releases. The guide covers builds, source installation, upgrades, and removal.
Start in one minute
Open a repository and ask a question. The first query builds the index.
cd your-project
ig "where is refresh token rotated?"Build context for a task. On a branch, --since main adds your changes.
ig context "fix refresh-token races" --since main --budget 8000Connect your coding agent.
ig agent install claude # or: codex, cursorSearch
You want | Command |
Code by intent |
|
An exact string |
|
A definition |
|
Every use of a symbol |
|
Functions that call it |
|
One directory or file |
|
One language |
|
A match without a term |
|
All indexed projects |
|
A terminal UI |
|
A Web UI |
|
Use -n to limit result files, -C for context lines, --include and --exclude for path globs, and --json for scripts. Use --hash to search without a model download. ig --help lists every option, and the user guide explains the rules.
Build context for a task
ig context "fix refresh-token races" --since main --budget 8000
pytest 2>&1 | ig context -A context pack starts from your task, from paths in pasted text, and from your Git changes. It adds definitions, callers, references, dependencies, dependents, tests, configuration, and docs. It stops at the token budget.
Each item names its file and lines, its role, and the reason for its selection. This one is from a pack for ripgrep:
### 1. crates/ignore/src/gitignore.rs:986-1014 [primary, test]
Why: rank 1 for primary retrieval; rank 2 for anchor test retrieval.
Signals: lexical, neural, semantic.A pack is evidence to read. It does not generate an answer or change files. See how --since selects changes.
Connect a coding agent
The setup command keeps your existing configuration, verifies the MCP handshake, and runs a search. Restart an open client afterward.
ig agent install claude
ig agent install codex
ig agent install cursor
ig agent doctorPlugins for Claude Code and Codex also install a task-context skill:
claude plugin marketplace add bvolpato/ivygrep
claude plugin install ivygrep@ivygrep
codex plugin marketplace add bvolpato/ivygrep
codex plugin add ivygrep@ivygrepclaude mcp add -s user ig -- ig --mcp
codex mcp add ig -- ig --mcp
gemini mcp add --scope user --transport stdio ig ig --mcpCursor, in .cursor/mcp.json:
{"mcpServers":{"ig":{"type": "stdio", "command": "ig", "args": ["--mcp"]}}}OpenCode, in opencode.json:
{"mcp":{"ig":{"type": "local", "command": ["ig", "--mcp"], "enabled": true}}}Add this to your agent instructions:
Use ivygrep before broad filesystem scans. Pass the absolute active worktree path.
Use natural-language queries for concepts and literal=true for identifiers.
For implementation, request output=context_pack with budget_tokens=8000.Guides: Claude Code, Codex, Cursor, Gemini CLI, OpenCode, MCP.
Search notes
Index a notes directory once. The watcher keeps it current.
ig --add ~/notes --wait-for-enhancement
ig "what did we decide about cache invalidation?" ~/notesPrivacy
Data | Leaves your machine |
Source, notes, queries, and results | No |
Embeddings and indexes | No |
Telemetry | None exists |
The default model | One download of pinned assets. |
The Web UI | Binds to loopback by default and requires a session token |
Read Web UI security before you bind the Web UI to another address. Report vulnerabilities through a private security advisory.
How it works
A Git-aware walker finds changed and indexable files.
Tree-sitter splits 24 languages into functions and classes. Other files use heuristic or text chunks.
SQLite stores metadata and relationships, Tantivy stores keywords, and USearch stores vectors.
Keyword and exact search work first. Background workers then add hash vectors and neural vectors.
A query runs bounded exact, keyword, symbol, hash, and neural passes, then ranks the files.
Read the architecture for storage, retrieval, worktrees, protocols, and security boundaries.
Measured results
What | Result | Scope |
Issue text to a fixed file | Top 1: 47%, top 5: 70% | 30 issues from 10 open source projects, v1.3.5 (method and losses) |
Context pack contains a fixed file | 77% | Same issues, 4,172 tokens on average, v1.3.5 |
Notes retrieval | 74.9% recall@20 | MemoryQuest, v1.2.7 (report) |
One million chunks | 6.19 ms warm CLI p95 |
The million-chunk result measures scale and footprint, not retrieval quality or coding-task accuracy. See the dashboard and the cost of the current model under concurrent load.
Get help
ig --status # workspaces, index health, vector coverage, disk usage
ig --doctor # diagnose index, daemon, watcher, and model
ig --doctor --fix # repair a broken or stale index
ig hardware # installed build and the best build for this machineThe guide has a troubleshooting section. Ask questions in Discussions.
Contribute
Start with a good first issue. Read CONTRIBUTING.md and run ./test.sh --quick.
MIT licensed. Maintained by Bruno Volpato.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
Shared memory for coding agents. Stop re-explaining your codebase every session.
The context platform for AI agents: code search, team decisions, and grounded project context.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables semantic and keyword search over a local codebase by chunking source files along function and class boundaries, embedding them offline, and fusing vector and BM25 results. Runs entirely on your machine in a single SQLite file, so AI coding agents can find relevant code with no API keys, telemetry, or cloud calls.714 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to find code by what it does rather than what it's called, searching local projects and remote GitHub or Bitbucket repositories all at once. Indexing and semantic search run fully offline with a locally loaded model, so code never leaves the machine.136 PyPIApache 2.0
- AlicenseNot gradedqualityAmaintenanceServes AI coding agents focused context from a project-local SQLite graph of source entities and Git relationships, so they can retrieve relevant code, trace callers/callees and impact, and carry recorded mistakes into later sessions without reading whole files. Queries render bounded, token-estimated packets while all indexing stays on the local machine.24 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents and developers to search code by meaning and exact text, map symbols, dependencies, blast radius and context, inspect git-change impacts, and trace live Python or JavaScript execution from a local air-gapped SQLite index.Apache 2.0