needle
Find any file on your machine instantly — a whole-machine, sub-millisecond file-search MCP for AI agents (NTFS MFT + USN, Windows)
Install / Use
claude mcp add Dedsec-Xu -- npx -y github:Dedsec-Xu/needleIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of needle
needle scores 78/100 on our quality scale, 3654th of 4,608 Development & Engineering skills we index.
Its MCP Server is 15 KB long, well organised into 23 sections with 9 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 90/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
needle compared with similar skills
All 4 of these similar skills score higher than needle; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| needle (this skill)by Dedsec-Xu | 78 | 3 | 4mo ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 100.1k | today | CLAUDE.md |
| taste-skillby Leonxlnx | 100 | 99.7k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 76.5k | today | CLAUDE.md |
| ai-job-searchby MadsLorentzen | 100 | 59.2k | today | CLAUDE.md |
Frequently asked questions
- How do I install needle?
- Run
claude mcp add Dedsec-Xu -- npx -y github:Dedsec-Xu/needle. The install tabs above show the steps for each supported agent. - Which AI agents does needle work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is needle safe to use?
- It is MIT-licensed and scores 90/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is needle still maintained?
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubNeedle
Helps you find the needle in the haystack.
Find any file on your machine, instantly — a whole-machine file-search MCP for AI agents. Windows / NTFS.

needle reads the NTFS MFT (Master File Table) directly and keeps a warm
in-memory index that is refreshed incrementally from the USN Journal. It
exposes a single fast_glob MCP tool so a coding agent (Claude Code, etc.) can
locate any file on the entire machine — every NTFS drive, millions of
files — in well under a millisecond, instead of walking the filesystem.
Filenames and paths only — not file contents. Use Grep/ripgrep for content.
Why Needle exists
Most file-search tools optimize search inside one project: directory traversal, fuzzy matching, ranking — tuned for a human in an editor who already knows roughly where they are.
An agent has a different need: it often has to find things across the whole
machine with no prior knowledge of where they live — a config under
C:\Users, an SDK in Program Files, a sibling repo on another drive. Walking
the tree for that is slow and burns context. needle indexes every NTFS
volume at once by reading the MFT, so a whole-disk lookup is as cheap as an
in-memory hash scan — sub-millisecond, even across millions of files.
Needle is the one you want when the agent's search space is "the computer," not "the repo."
Example agent workflows
Things an agent can do in milliseconds with fast_glob that are slow or
impossible with a project-scoped, traversal-based Glob:
-
"Find every MP3 scattered across my drives and move them into
D:\Music."fast_glob("**/*.mp3")returns every match on every NTFS volume instantly; the agent then organizes them. A built-in Glob can't even see outside the project. -
"Open that tax PDF from last year — it has
2024in the name."fast_glob("**/*2024*.pdf")across the whole machine finds it in <1 ms, no "which folder did I save it in?" hunting. -
"Security sweep: list every private key and
.envon this box."fast_glob("**/*.pem"),fast_glob("**/*.key"),fast_glob("**/.env")— whole-machine, in milliseconds, instead of crawling every directory. -
"Inventory every project on this machine."
fast_glob("**/Cargo.toml"),fast_glob("**/package.json"),fast_glob("**/*.sln")to map all repos/solutions across drives at once. -
"I have my résumé saved in five places — find them all."
fast_glob("**/*resume*")/fast_glob("**/*résumé*")surfaces every copy machine-wide so the agent can dedupe. -
"Reclaim space: where are all the
node_modules/targetbuild dirs?"fast_glob("**/node_modules"),fast_glob("**/target")finds build junk across every repo on every drive in one shot.
Because Needle returns absolute paths from a warm whole-machine index, the agent spends its turn acting on the files rather than walking the tree to find them.
Architecture
Reading the MFT requires administrator rights, but an MCP client launches its servers non-elevated. So Needle splits into two roles across that boundary:
needle serve (ADMIN, long-running daemon)
├─ builds the MFT index per drive on first query
├─ one watcher thread per drive BLOCKS on FSCTL_READ_USN_JOURNAL and applies
│ each change the instant NTFS records it (Everything-style; 0 idle CPU)
└─ answers queries over loopback TCP 127.0.0.1:48923
needle mcp (non-elevated, launched by the agent / MCP client)
└─ exposes the `fast_glob` MCP tool, forwards queries to the daemon
The daemon exists purely to cross the privilege boundary — it is the only part
that needs admin. The MCP frontend is a thin, stateless forwarder. Installed as a
Windows service (needle service install), the daemon runs as LocalSystem and
auto-starts at boot, so the privilege boundary is crossed once at install time
and never again — the agent's non-elevated MCP process just connects to it.
Install
Prebuilt binary — grab the latest needle-vX.Y.Z-x86_64-pc-windows-msvc.zip
from Releases, unzip, done. Each
release ships a .sha256 to verify the download.
Scoop
scoop bucket add dedsec https://github.com/Dedsec-Xu/scoop-bucket
scoop install needle
Cargo (builds from source; needs the MSVC toolchain)
cargo install --git https://github.com/Dedsec-Xu/needle
After installing, register the daemon as a service once — it prompts for elevation (UAC) automatically, so any shell works:
needle service install
Build (from source)
cargo build --release
Run
-
Install the daemon as a service (once). It runs as LocalSystem and auto-starts at every boot — no manual launch, no recurring UAC prompt:
needle service install # prompts for elevation (UAC) onceRemove it later with
<details><summary>Prefer not to install a service?</summary>needle service uninstall.Run the daemon manually instead (must stay open, re-run after each reboot) from an elevated shell:
</details>needle serve -
Register the MCP server with your agent. Needle speaks plain MCP over stdio, so any MCP-capable agent can use it — the command is always
<details open><summary><b>Claude Code</b></summary>needle.exe mcp. A project-scoped.mcp.jsonis included; pick your agent below.claude mcp add needle -- "D:\\path\\to\\needle\\target\\release\\needle.exe" mcpOr drop it into
.mcp.json(project) /~/.claude.json(global):
</details> <details><summary><b>Codex</b> (OpenAI Codex CLI)</summary>{ "mcpServers": { "needle": { "command": "D:\\path\\to\\needle\\target\\release\\needle.exe", "args": ["mcp"] } } }Add to
~/.codex/config.toml:
</details> <details><summary><b>Hermes</b> (NousResearch Hermes Agent)</summary>[mcp_servers.needle] command = "D:\\path\\to\\needle\\target\\release\\needle.exe" args = ["mcp"]Add to the
mcp_serverssection of Hermes'config.yaml:
</details> <details><summary><b>OpenClaw</b></summary>mcp_servers: needle: command: "D:\\path\\to\\needle\\target\\release\\needle.exe" args: ["mcp"]Add to
~/.openclaw/openclaw.jsonundermcp.servers(or useopenclaw mcp add):
</details> <details><summary><b>Any other MCP client</b></summary>{ "mcp": { "servers": { "needle": { "command": "D:\\path\\to\\needle\\target\\release\\needle.exe", "args": ["mcp"] } } } }Point your client at the stdio command below — that's the whole contract:
</details>command: D:\path\to\needle\target\release\needle.exe args: ["mcp"] -
The
fast_globtool becomes available. To make the agent prefer it over the built-in Glob, add to yourCLAUDE.md:To find files by name or path anywhere on this machine, use the
fast_globMCP tool instead of the built-in Glob — it is far faster and sees every drive. Use Grep for file-content search.
CLI
Once the service (or daemon) is running, query it with needle find — it just
forwards to the daemon over loopback, so it is fast and needs no admin:
# query the running daemon (no admin; the service answers from its warm index)
needle find "**/*.rs" --root "D:\path\to\project" --max-results 50
# query the whole machine (no root scope)
needle find "**/appsettings.json"
# directories only
needle find "**/node_modules" --kind dir
# the 20 most recently modified PDFs on the machine
needle find "**/*.pdf" --sort mtime --order desc --max-results 20
# the largest log files in a project
needle find "**/*.log" --root "D:\proj" --sort size --order desc
# case-sensitive match
needle find "**/README.md" --case-sensitive
Flags (--kind, --case-sensitive, --sort, --order) work on both
needle find and needle query.
If the daemon isn't running, needle query does a one-shot in-process build
instead — handy for ad-hoc use, but it must itself be elevated and pays the
full index-build cost each time:
# one-shot query (builds the index in-process; requires admin)
needle query "**/*.rs" --root "D:\path\to\project" --max-results 50
# benchmark a full index build for a drive
needle index C
Benchmark
Run the built-in benchmark (elevated) to time the index build and a set of whole-volume queries on your own machine:
./bench.ps1 # benchmark drive C (self-elevates)
./bench.ps1 D # benchmark drive D
It prints a ready-to-paste Markdown table: the one-time index-build time plus the per-query latency for several whole-volume globs. Queries run against the warm in-memory index, which a per-drive watcher thread keeps live by blocking on the USN Journal — any file created, deleted, renamed, or moved shows up in the very next query, with no rescan and no polling delay.
Measured results
On a drive with 2,265,224 indexed entries (full index built once in ~4.3 s):
| query (whole volume) | matches | time |
|----------------------|---------|-----------|
| **/*.rs | 601 | 0.85 ms |
| **/Cargo.toml | 25 | 0.20 ms |
| **/*.exe | 928 | 0.89 ms |
| **/*.dll | 13,932 | 12.8 ms |
| **/package.json | 10,104 | 26.6 ms |
Extension-pinned globs hit the inverted index and are answered in well under a
millisecond. Latency for the last two scales only because the benchmark returns
every match (max_results = 1,000,000); the fast_glob MCP tool defaults to
max_results = 200, so even very broad globs return sub-millisecond in practice.
For comparison, before the inverted index every query was a full ~2.3M-entry scan at ~360 ms — the extension index is a ~400x speedup on the common cases.
vs what your agent searches with today
Coding agents find files with their built-in Glob/Grep tools — ripgrep-style directory traversal. Two things make that a poor fit for an autonomous agent:
- It walks the tree on every call. No persistent index; each search re-crawls the filesystem and the cost grows with the tree.
- It can't see past the working directory. The agent is blind to anything
outside the project root — other repos, SDKs in
Program Files, configs underC:\Users. For those, traversal isn't slow, it simply returns nothing.
Needle replaces both: a warm MFT index over the whole machine, answered from
memory. Same whole-drive search — every *.rs on a 2.27M-file drive, 601 matches,
identical results for every tool — measured end-to-end with demo/compare.ps1:

| tool | how it works | time | vs Needle |
|----------------------------------------|------------------|-----------:|--------------|
| Needle | NTFS MFT index | 8.4 ms | baseline |
| ripgrep (what Glob/Grep run on) | directory walk | 8811 ms | 1049x slower |
| PowerShell Get-ChildItem |
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
100.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
taste-skill
99.7kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
headroom
76.5kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
59.2kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
