Enables AI agents to perform evidence-first local searches across files, documents, notes, and logs using exact, hybrid, or semantic vector search.
Also known as lightsifter/sift-light
- Stars
- 104
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 2, 2026
- License
- AGPL-3.0
What is sift-light MCP?
sift-light enables AI agents to perform evidence-first local searches across files, documents, notes, and logs using exact, hybrid, or semantic vector search.
Summary generated from the project's README
About sift-light MCP server
Locating specific error messages, notes, or code snippets across local directories is what sift-light enables for AI agents. It acts as a digital librarian that can perform exact literal searches, hybrid searches, or semantic vector searches to find relevant text passages without requiring the agent to open every file manually. Users can perform fast keyword lookups by default, or opt into semantic search by installing a local model via npx and enabling vector search in a configuration file.
Developers use this tool to navigate large collections of documents and logs by receiving snippets and file locations directly. The server supports advanced features like hybrid mode, which combines literal matches with concept-based relevance, and an outline mode for inspecting the structure of Python or TypeScript files. It manages large-scale searches by processing files in batches and utilizes a local cache to store embeddings, ensuring that repeated queries remain efficient. Setup requires configuring a sift-light.json file and, for semantic capabilities, setting the SIFT_LIGHT_CONFIG environment variable.
What you can do with it
- 1Find specific error messagesAn agent can search for a known error string or symbol across all local files to find the exact location of a bug.
- 2Perform semantic concept searchesA developer can ask for documents related to a specific business intent even if the exact wording is not remembered.
- 3Navigate code structureAn agent can retrieve a high-level outline of a Python or TypeScript file to understand its classes and functions.
- 4Audit file existenceA developer can run a bounded audit to verify if specific patterns exist or are absent across a defined scope.
Written from the project's README. Every use case is checked against a quote from it.
How to install sift-light MCP
Formats verified 10 Nov 2026Install sift-light MCP in Claude Code
$ claude mcp add sift-light -- npx -y sift-lightInstall sift-light MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"sift-light": {
"command": "npx",
"args": [
"-y",
"sift-light"
]
}
}
}Install sift-light MCP in VS Code
.vscode/mcp.json
{
"servers": {
"sift-light": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"sift-light"
]
}
}
}Install sift-light MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"sift-light": {
"command": "npx",
"args": [
"-y",
"sift-light"
]
}
}
}Install sift-light MCP in Codex
~/.codex/config.toml
[mcp_servers.sift-light] command = "npx" args = ["-y", "sift-light"]
Install sift-light MCP in Gemini CLI
~/.gemini/settings.json
{
"mcpServers": {
"sift-light": {
"command": "npx",
"args": [
"-y",
"sift-light"
]
}
}
}Configuration
SIFT_LIGHT_CONFIG
| Name | Description | |
|---|---|---|
| SIFT_LIGHT_CONFIG | — |
Automated checks
Ran Nov 13, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledNot checked
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesNot checked
README
View on GitHubsift-light
English · 简体中文
sift-light — Evidence-first search for AI agents.
A general-purpose local search plugin that helps agents find files, documents, notes, logs and other text material.
Think of a patient librarian: describe what you need, and it helps locate the shelf, open the relevant page and follow the next lead. A small search brings the passages straight to you. A broad search starts with a map so you can decide where to look first.
How it helps
Find a passage without opening every folder
Looking for an error message, a sentence or a name is like giving a librarian a keyword. When there are only a few matches, the plugin returns their text and locations directly, saving repeated file opening and scrolling.
Start with a map when the collection is large
“Which documents mention refunds?” can produce a lot of material. The plugin first presents matching files and snippets, like marking promising stops on a map. The agent can choose what to open before filling the conversation with entire documents.
Keep your bookmark for the next question
“Continue from where we stopped” can follow the existing result to its next page. The agent can also open the surrounding text of a match, like returning to a bookmarked passage to read what came before and after it.
Recover when the remembered wording is not exact
For routine development work, searches with a known name, symbol, filename or error text use the fast exact path by default; omitting mode does not load the local embedding model. Vector search is disabled by default for Pi, OMP and MCP clients. concept and hybrid fail clearly while it is disabled; neither silently becomes an exact-only search. This behavior is built into the plugin and does not depend on a personal AGENTS.md. An uncached semantic search can take tens of seconds, so it should not be part of every code lookup.
To opt in, set "vectorSearchEnabled": true in the active sift-light.json, install the local model with npx -y --package sift-light@latest sift-light-model --install-model, and restart the host. Pi and OMP use the configuration paths below; MCP needs SIFT_LIGHT_CONFIG set to that file in its server environment. Installing the model alone does not enable vector search. semanticJudge.enabled is a separate option for remote candidate classification: it does not enable vector search and remains inactive while vector search is disabled.
Use mode: "hybrid" with one natural-language query when a sentence may have been remembered with different wording. Hybrid always runs an exact literal search and the installed local Concept model under one owned request. Exact evidence appears first; semantic candidates are clearly labeled as relevance candidates and removed when they overlap an exact match. Semantic candidates retain raw cosine scores and use a bounded short-passage correction for ranking; both scores remain visible in structured details and neither proves runtime behavior. The initial page shares counts, coverage, source references, one inspection cursor and a compact preview instead of concatenating two complete responses. conceptLimit changes only the non-overlapping semantic supplement (default 3, maximum 20); it never displaces literal evidence. The returned matches request opens the same snapshot's complete exact-first pagination without rerunning either search.
Concept ranking covers every UTF-8 passage admitted by the request's documented source budget; it no longer samples a fixed prefix of the scope. Concept and hybrid searches automatically admit up to 2,000 files and process them sequentially in bounded 200-file batches, then merge every batch into one global ranking and one coverage result. Batches share the request's 32 MiB read budget, so raising the file ceiling does not multiply the content budget. Users do not need to plan or continue batches themselves. maxFilesToParse remains an optional advanced hard ceiling when a smaller scope is intentional. Passages that exceed the model token window are ranked through overlapping token-safe windows, so later text is not silently discarded. Offline embeddings are cached by content, model revision and chunking revision in a bounded 512 MiB local cache. Repeated content is reused, changed content misses naturally, and cache write or cleanup failures remain visible in the result.
Slow Concept and hybrid requests return within the default five-second wait window with status: "waiting" or "running", an operationId, progress and an exact nextRequest such as { "mode": "await", "operationId": "..." }. Copy that request unchanged: it resumes the same computation and never restarts the query or downgrades to a literal-only result. A final result remains available for stable re-fetch for 10 minutes, with up to 32 terminal results retained per service session, and mode: "cancel" stops the owned work and waits for cleanup. Each service session admits at most eight pending operations; an operation has one total deadline controlled by SIFT_LIGHT_CONCEPT_TIMEOUT_MS (integer milliseconds from 1000 through 3600000; default 600000) and a 120-second idle continuation lease. A real model, source or resource failure is returned as a failure with its diagnostic. Source generation is re-enumerated and re-verified before publication, so changes refresh the operation and mixed versions are never marked complete. Admission planning counts (filesEnumerated, filesAdmitted, filesSkippedEmpty, filesUnavailable, passagesQueued, batchesPlanned, batchesCompleted) stay visible. Empty files are a normal skip and do not mark the result partial.
The first uncached Concept or hybrid search loads the local model and may take tens of seconds and more than 1 GiB of inference-worker memory, depending on the machine and search scope. Later searches reuse cached passage embeddings even when the query wording changes, and an active service reuses its loaded model. The E5 worker is released after 30 seconds of inactivity; the next query then loads it again. Changed passages are recomputed; cache eviction, deletion or broad source changes can cause another cold run. Exact search modes do not load the model. These are workload-dependent observations, not a latency or memory guarantee. If the result is waiting during model-loading, follow its nextRequest to continue the same operation.
Give several search conditions together
“Find files mentioning both the customer and a refund” works like selecting documents with two labels. “Any of these words will do” works like handing over a shortlist. Multiple conditions can be expressed together to reduce repeated searches.
Choose the drawer you want searched
Ask the agent to restrict a search to one folder when that is the scope you need. If you remember only part of a filename, start by finding the file and then inspect its contents—like narrowing a cabinet down to a shelf and then a document.
Multi-word files queries require each word literally in the path; a single abbreviation still supports fuzzy matching. Use hybrid or concept for business intent. Content searches inside the active project still expand after zero results by default. An explicit path outside the project stays isolated; pass scope: "expand" to retry the server project. Use scope: "strict" to prevent in-project expansion. Expansion is announced before returned evidence.
Know what has been shown
Long results arrive in pages with a way to continue. When the original material changes, the plugin asks for a fresh check. Like a careful research assistant, it distinguishes the passages already shown from the pages still to come.
A complete snapshot describes match retention, not complete source text. Truncated matching-line excerpts show their limit and an executable inspectRequest, which remains usable after the final match page. Follow pagination cursors instead of repeating the query with a different limit.
In Pi and OMP, the passive session status includes the loaded package version, counts returned new queries, distinguishes complete, partial and unfinished results, and reports non-cancelled failed calls. Cursor and operation continuations do not inflate the new-query count.
inspect loads and verifies the source document before selecting a bounded output window. Its request shares a 32 MiB source-read budget; a single file larger than that budget is rejected even when only line 1 is requested. Changing the line, reducing displayed context or retrying does not bypass that limit. For a large log, search for the relevant text first, or use the host's bounded read capability on the known exact file. Source continuation pages apply to documents already admitted within the budget; they do not provide streaming inspection of oversized files.
Ordinary searches keep repository ignore rules, but now report policy-filtered filesystem coverage instead of calling an absence exhaustive when ignored files exist. Filename discovery (mode: "files") does the same: it says how many files were ignored and which of them match the query, and ignorePolicy: "include" lists them. Each file candidate shows its score and whether it is an exact, substring or fuzzy match. Use mode: "audit" with named literal patterns for one bounded receipt covering declared scope, enumerated/searched/skipped files, ignored-file policy, per-pattern present/absent_with_complete_coverage/unknown findings, and start/end source stability. Set ignorePolicy: "include" when an audit must include ignored configuration and generated files; .git internals and protected paths remain excluded.
Discover language capabilities before loading a provider
Use mode: "capabilities" with the project root for a compact, names-only inventory. JavaScript, TypeScript and TSX support AST structure, roles, outline, static imports and related-test candidates. Go supports AST structure and roles. Python supports bounded indentation-based outline and lexical roles (comment, string, code, declaration, import, and call candidates). Swift and other languages remain available to ordinary content search, filename discovery and source inspection. Capability inventory does not start parsers or the Concept model.
Language-service navigation is out of scope. Asking for definitions, references, implementations, callers, callees, dependencies, dependents, trace or impact fails explicitly, because a text search dressed up as precise navigation would be a worse answer than a clear refusal. No language server runs while you work.
Check saved source evidence
Use mode: "validate" with a saved ordinary-search or analysis cursor, optionally selecting a matchIndex. Validation compares retained sources with the current worktree or their pinned Git objects, reports current, stale or unknown, and preserves incomplete search coverage. Structured metadata is under details.validation and details.analysis.validation; the removed graph fields and trace cursors are no longer supported. Validation checks sources on demand and does not run background watchers. It checks saved evidence, not whether new matching files have appeared since the search.
Narrow by file age or inspect code structure
Worktree searches can use modifiedAfter and modifiedBefore as Unix millisecond bounds. The lower bound is inclusive and the upper bound is exclusive, so a time window can be expressed without changing the search pattern. The same filter applies to content and filename searches; unavailable file metadata is reported as incomplete evidence rather than silently treated as a match.
Use mode: "outline" with a concrete JS/TS/TSX or Python file to see bounded symbol ranges. JS/TS/TSX use ast-grep; Python uses indentation-based class, function and method evidence. Inspecting an outline item returns that symbol's version-checked source. These ranges do not prove compiler bindings, runtime calls or test coverage. mode: "tests" provides JS/TS/TSX related-test candidates; unsupported language operations fail explicitly. Use ordinary search and inspect for Swift source.
The readable result keeps the main evidence compact. Per-item ranges, counts, coverage and continuation requests remain in structured details, so a client can use the structured fields without requiring a second search.
Independent text retrieval on Apple Silicon
Optional nativeText configuration makes concept and hybrid return two local retrieval lanes. Each keeps its own ranking; details.analysis.retrievalLanes.current and .native contain executable continuation requests. For hybrid with ranking: "relevance", the default view ranks at most ten distinct files using weighted reciprocal file ranks (native 1, current 0.1). Raw scores across lanes are not comparable. Other dual-lane views interleave candidates. The default view and both lanes support inspect and validate, including source-change reporting.
On Apple Silicon macOS, prepare Xcode, Metal Toolchain, a local SDK checkout and model directory, then run from this project's checkout:
bun run build:native-text -- /absolute/sdk-checkout /absolute/native-text-output
The builder selects a fixed revision and installs the executable and required resource bundles. The model directory must contain model.safetensors, config.json, tokenizer.json and tokenizer_config.json. Keep the complete output directory and add this to the host's active sift-light.json:
{
"vectorSearchEnabled": true,
"nativeText": {
"executable": "/absolute/native-text-output/native-text",
"modelDirectory": "/absolute/model-directory"
}
}
The existing E5 model is still required. The native process reads only private staged text admitted by the existing source policy. The service reuses its incremental index and removes it on shutdown; consecutive requests reuse the same loaded native model. After 60 seconds of inactivity the native worker exits and releases its memory; the next request starts a fresh worker. Cancellation, shutdown and protocol failures reap the owned worker before further work begins. details.analysis.stats reports nativeModelLoads, nativeModelReused and nativeProcessId. Existing admission controls hidden files, globs, exclusions and read budgets. Unknown text suffixes are normalized from verified UTF-8 bytes into plain text copies. Executable, model and protocol failures are explicit errors. Omit nativeText to retain existing behavior. This option enables text only, without image, audio or video retrieval.
Common uses
Tell your agent what you need, for example:
- “Which documents mention the refund deadline?”
- “Find this error in the logs and show the surrounding messages.”
- “Find files containing both the customer name and the order number.”
- “List matches for any of these keywords.”
- “I remember part of the meeting-notes filename. Help me find it.”
- “Search only this folder; do not expand the scope.”
- “Show me which files contain relevant text, then open two of them.”
- “Continue from the previous page and show the remaining passages.”
- “Search files modified since this Unix millisecond timestamp.”
- “I may remember this sentence incorrectly; search exact and semantic evidence together.”
- “Show the Python classes and functions in this file, then inspect the method that matters.”
- “Find this function name in source, inspect the relevant occurrences, then validate the saved evidence after I edit the file.”
The plugin provides file locations and actual text so the agent can answer from the material and you can check the original yourself.
Install
MCP needs Node.js 22.19+. Pi needs Pi 0.86.0+ with Node.js 22.19+ or Bun 1.4+. The search engine ships with the package for each supported platform, so no system search tool, shell function or PATH setup is required, and a search never downloads anything. Install with optional dependencies enabled.
When upgrading from a release published under an earlier package identity, remove that earlier plugin and MCP registration before installing sift-light. This avoids loading two search tools or enforcement hooks in the same host.
To use your own ripgrep, set SIFT_LIGHT_RG_PATH to the absolute path of the executable in the MCP server or Pi process environment, then restart the host. It applies to content, filename and Git-source searches. Paths containing spaces work; aliases, shell functions, relative paths and ~ are not expanded. An unusable value fails explicitly instead of silently choosing another executable. If the bundled engine is missing, sift-light uses an executable rg found on PATH as a compatibility fallback; otherwise reinstall with optional dependencies enabled or point this setting at your own binary.
Pi
Search policy guidance uses a separate prompt section, so models that support tool changes during a conversation can retain cached prefixes when tools are activated.
pi install npm:sift-light
Restart Pi after installing or updating. Pi uses this plugin for conventional searches by default; reads, edits, tests, builds and scripts remain available. enforceSearch accepts "hard" (the default), "prefer" (keep the dedicated tool and guidance without denying alternative searches), or "off". Boolean values and unknown configuration fields are rejected. Configure it in ~/.pi/agent/sift-light.json, then restart. Set "locale": "zh-CN" there for the Chinese interface.
OMP (Oh My Pi)
omp install npm:sift-light@latest
Restart OMP after installing or updating. The package declares its native OMP extension and registers sift-light. In the default hard mode it removes OMP's built-in grep and glob entries from the active tool set and blocks direct search commands while leaving reads, edits, tests, builds and other development tools available. Prefer mode keeps both the dedicated and alternative tools active, adds model guidance, and does not deny shell searches. OMP's active profile is respected; the default configuration file is ~/.omp/agent/sift-light.json, and a named profile uses ~/.omp/profiles/<profile>/agent/sift-light.json. Set enforceSearch to "hard" (default), "prefer", or "off" in the active file, then restart OMP. Only these current string values are accepted; boolean values and unknown configuration fields are rejected. Set "locale": "zh-CN" to use the Chinese interface.
Optional semantic judge
Hybrid search remains local-only by default. An optional semantic judge can classify retained concept candidates and improve ordering, but it never replaces local matching, source inspection, pagination, or verification.
The feature is enabled only when semanticJudge.enabled is explicitly set to true. Merely defining the environment variable does not activate network access. Keep the credential in the process environment; do not put the credential value in this file:
{
"locale": "en",
"enforceSearch": "hard",
"vectorSearchEnabled": false,
"semanticJudge": {
"enabled": false,
"provider": "jev",
"apiKeyEnv": "TYPESAFE_API_KEY",
"model": "jev-latest",
"timeoutMs": 120000,
"maxCandidates": 20,
"maxRetries": 2
}
}
When enabled, the configured endpoint receives only the query and bounded candidate excerpts. Up to eight candidates and 64 KiB are sent per request. Independent batches run under the existing 20-candidate ceiling; an HTTP 413 response splits only that batch. If one batch fails, its candidates keep their local order while successful batches still contribute classifications, and the result reports partial coverage with judged/unjudged candidate and batch counts. A missing key still fails configuration explicitly, local candidates are never removed by a provider failure, and semantic classification is not runtime proof.
Assess one concrete claim against verified source ranges
Use mode: "support" to assess whether a concrete supportClaim is supported by selected source evidence. The request accepts only a retained cursor plus matchIndex or matchIndices, and rechecks every source range against the current revision before sending it to a provider. Changed, unavailable or unversioned evidence produces unknown and is never sent as current proof. This assessment is independent from both retrieval lanes, precise inspection and mode: "validate"; it does not change the original search result. Analysis pages expose evidenceScope: "range-only" so callers can see that the exact range is preserved while answer support is not assumed; inspect the source or continue with mode: "support" when nearby qualifiers may matter.
The feature is disabled by default. Configure either the local-compatible HTTP JSON provider or an explicit Jev endpoint. Keep credentials in the process environment:
{
"answerSupport": {
"enabled": true,
"provider": "jev",
"apiKeyEnv": "TYPESAFE_API_KEY",
"model": "jev-latest",
"timeoutMs": 120000,
"maxRetries": 2,
"maxEvidenceItems": 5
}
}
With provider: "http-json", point endpoint at your local or remote service and omit apiKeyEnv when it does not require a key. The provider returns one of supported, contradicted, insufficient or unknown. Each request sends at most five evidence items, with 4,000 characters per item across all evidence text fields; oversized evidence is rejected without truncation, a 64 KiB request cap and a 4 MiB response cap. When context is added, support keeps the exact selected range as selectedExcerpt and includes two adjacent source lines by default as contextBefore/contextAfter; pass supportContextLines: 0 for exact-range-only or choose 1–20 lines for a wider bounded context. Results retain provider, model, probability, reason and available token usage; failures stay explicit and source validation remains available on its own.
sift-light MCP questions
How do I add sift-light MCP to Claude Code?
Run claude mcp add sift-light -- npx -y sift-light in your terminal. Add --scope user to make it available in every project.
How do I add sift-light MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
Does the server support semantic search by default?
No, vector search is disabled by default for Pi, OMP and MCP clients to avoid the high latency of uncached semantic searches.
Can I search for files modified within a specific time range?
Yes, you can use modifiedAfter and modifiedBefore Unix millisecond bounds to filter worktree searches by file age.
What happens if a search result is very large?
Long results are delivered in pages, allowing the agent to continue reading through pagination cursors.