Repository navigation
Releases: lexandro/codeindex-mcp
Release list
v0.7.0
v0.6.0
v0.6.0 — Exact grep semantics, token-efficient output, hierarchical ignore files
This release replaces the search engine and fixes two silent correctness bugs that could mislead AI agents, while cutting both memory usage and output token cost.
🔍 Search engine rewritten: exact grep semantics
The Bleve token-based engine had silent false negatives:
- substring queries inside identifiers returned nothing (
Mutexmissedsync.RWMutex) /regex/queries matched files but returned zero lines (the line extractor treated the pattern as a literal)- multi-word queries OR-ed tokens while the line matcher required the full string
Search is now a direct in-memory line scan compiled to a single RE2 matcher — results are grep-identical with full recall, and memory drops to roughly the corpus size (the Bleve dependency tree is gone).
Query formats:
| Format | Behavior |
|---|---|
plain text |
literal substring, case-insensitive |
"quoted" |
exact literal, case-sensitive |
/regex/ |
RE2 regular expression per line, case-insensitive by default |
🪙 Token-efficient output
- Overlapping match contexts merge into hunks (
N:= match,N-= context,--separator) — no more duplicated context lines maxMatchesPerFiledisplay cap (default 10) with... +N more matches- New
outputMode:content(default),files(paths only),count(paths + match counts) — usefiles/countwhen locations suffice contextLines: 0now works (was silently reset to 2)- New
caseSensitiveoption - Explicit notice when the file limit truncates results
📂 Hierarchical ignore files
Nested .gitignore / .claudeignore files at every directory level are now respected with git's precedence rule (closest file wins, negations included). Previously only the root files were loaded — monorepo subprojects leaked build output into the index.
.env.* and *.env are now ignored by default so secrets never enter the index (--force-include overrides intentionally).
🔄 Index consistency hardening
- Newly created directory trees (copy, unzip,
git checkout) are watched recursively and files already inside are indexed — closes a race where content written before the watch attached was never indexed - Periodic sync verification is on by default (every 300s,
--sync-interval 0disables) as a self-healing net .gitignore/.claudeignorechanges now re-sync the index (newly-ignored files dropped, newly-unignored indexed)
🛠 MCP improvements
- All read-only tools declare
readOnlyHintso clients can skip permission prompts codeindex_statusreports version, watched directory count, and sync interval- Tool descriptions document the new grep semantics and token-saving guidance
- Logging defaults to off (no log file unless
--log-enabled)
⬆️ Upgrading
Drop-in replacement — rebuild or download the new binary and restart your MCP client session. Tool parameters are backward compatible; the search output format changed (hunks with N:/N- markers).
v0.5.1
v0.5.0
Changelog
- cd4b6f0 Minimize tool output for AI token efficiency, bump to 0.5.0
v0.4.0
Changelog
- cf20300 Add GoReleaser config and release workflow for cross-platform binaries
- de9e427 Add badges to README (CI, Go Report Card, pkg.go.dev, license, MCP, Claude Code)
- 552a056 Add register subcommand for auto-registration in Claude Code, bump to 0.4.0
- 3888b79 Fix flaky Duration assertion in empty directory sync test
- ce91479 Simplify Quick start section in README
v0.3.0
What's New
Toggleable logging
- New
--log-enabledflag (default:true). Set tofalseto disable all log output — no log file is created, no stderr output. - Fixed log file handle leak — the log file is now properly closed on exit.
Periodic index sync verification
- New
--sync-intervalflag (in seconds, default:0= disabled). - When enabled, a background goroutine periodically compares the filesystem with the index and fixes discrepancies:
- Missing files — on disk but not indexed → re-indexed
- Stale files — in index but deleted from disk → removed
- Modified files — ModTime changed → re-indexed
- All discrepancies are logged in detail (path, type, action taken).
Other
- Input validation:
--sync-intervalrejects negative values. - 9 new unit tests for sync verification (happy paths + edge cases).
- Documentation updated with new flags, examples, and project structure.
Full Changelog
v0.2.0
What's New
--force-include CLI flag
Override all exclude rules (default patterns, .gitignore, .claudeignore, --exclude) for specific file patterns.
# Index log files even though *.log is excluded by default
./codeindex-mcp --root /project --force-include "*.log"
# Multiple patterns (additive)
./codeindex-mcp --root /project --force-include "*.log" --force-include "vendor/*.go"Key behaviors:
- Force-include takes highest priority over all exclude rules
- Multiple
--force-includeflags are additive - Binary detection and file size limits still apply (safety)
.gitdirectory is always skipped regardless of force-include- Directory pruning is suppressed for paths that could contain force-included files
Other
- Full test coverage for force-include feature (9 test cases)
- Updated documentation (README, CLAUDE.md)