smart_search
Find meaning.
Keep the exact matches.
Semantic and lexical search over an indexed project, with the likeliest functions identified in each chunk.
Results are split into separate blocks.
Paired with smart_search_result.
Built for Claude Code & Codex
A local MCP server that gives coding agents cheaper, sharper tools than their built-in search.
0.9.22 beta Windows only Release notes
smart_searchSearch your codeweb_searchResearch the webweb_fetchRead for an answerproject_manageKnow your indexINTERFACEMCP
CODE SEARCHSemantic + lexical
WEB SEARCHParallel + bilingual
YOUR GATEWAYYour model choice
The toolkit
Find the relevant code. Search beyond a single source. Read a page for an answer. See what is indexed.
smart_searchFind meaning.
Keep the exact matches.
Semantic and lexical search over an indexed project, with the likeliest functions identified in each chunk.
Results are split into separate blocks.
Paired with smart_search_result.
web_searchMore sources.
Both languages.
Search several sources in parallel, in the query language and in English. Reuse a cache shared across sessions.
depth="research"Run a multi-round research loop.
Paired with web_search_result.
web_fetchGive it a URL.
Get the answer.
Read a known page and return only the answer to your prompt, written by a small model. Browser rendering handles pages that need JavaScript.
Pages are cached for 24 h.
Agents that must click or type get Playwright MCP.
project_managePut your project
on the map.
Register and index projects. Inspect coverage, code maps, duplicated functions, and the storage used by your index. Before an edit, ask what a function touches: its callers, the tests that reach it, and the files that import it.
See what your tools can search.
The optional hook
Route native calls to Smart Tool when its tools are cheaper. Choose whether the hook redirects, advises, or stays out of the way.
GrepGlobReadBashWebSearchWebFetchA fixed rule decides in under a millisecond: content searches over a project folder are denied with the Smart Tool call to make; reading known files runs. A model can propose new patterns for you to accept.
The native tool runs. The agent receives the same advice alongside the result and decides what to do.
No routing. The hook leaves native calls alone.
Mode illustration. Set your actual hook behavior in the setup screen. The same hook can also check documentation on edits: it reminds the agent, or requires it, to write the docstring of a touched function that has none, and flags documented functions whose signature changed.
How it runs
One daemon per machine, listening on 127.0.0.1. Open settings from the tray and connect your agents in the setup screen. How it works, step by step
127.0.0.1:8765Local daemon/setup~/.smart-toolIf port 8765 is taken, the daemon uses and announces another free port.
Configuration in config.json, model adapters in adapters/, and indexes, caches, and logs in data/ — all under ~/.smart-tool.
Indexed code stays on your machine. Code chunks are sent to your model gateway for embeddings, and small excerpts go to its chat models. Web queries go to search sources.
Use a local model gateway to keep model processing local. Logs and metrics stay on your machine.
Bring your own models
Use an OpenAI-compatible API for embeddings and small chat calls. Pick your gateway and models in setup.
Put a Python adapter in ~/.smart-tool/adapters/. It appears beside the built-in adapter in the setup screen.
Web search works without a model gateway. Without embeddings, smart_search falls back to lexical search.
If the mcp-memory embedding sidecar is installed, use its embedder as a fallback or your preferred embedding model.
Install
0.9.22 beta · Windows only
One command installs it for your Windows user. After that it updates itself (checked at logon and every 24 h, and it tells you each time), or on demand from the tray menu; your settings in ~/.smart-tool are kept.
npx @allansantos-dev/smart-tool@latest install
npx. Python is not needed: the installer brings its own.smart_search falls back to lexical search.Downloads uv and a private Python 3.12 into ~/.smart-tool/runtime (nothing on PATH, nothing in the registry), copies Smart Tool to %LOCALAPPDATA%\Programs\SmartTool with its own virtual environment, and installs the web runtime, showing download progress. A download that breaks or stalls is retried and, if it still fails, the installer stops with the error instead of reporting success. An older Smart Tool installation in another folder is stopped and removed, and agent hooks are pointed at the new one. It registers a per-user Scheduled Task to start the tray at logon, then starts the daemon.
Open “Open settings” in the tray or visit http://127.0.0.1:8765/setup at the announced port. Choose your model gateway, register Claude Code or Codex, and choose your hook behavior.