You’ve been there. You’re using Claude Code or Codex to get some work done. You ask the AI to find a file for you: “Pull up that presentation deck for the Q3 payment integration.”
And then you wait. Ten seconds. Twenty seconds. Sometimes it just gives up because there are too many files to scan. You sit there, staring at a blinking cursor, wondering why your $20-a-month superintelligence can’t find a single document.
I have over 90,000 files on my drive. Project materials, product docs, random notes accumulated over years. Every time I ask an AI to find something, it starts from scratch, traversing the directory tree like a blind man in a maze. It’s painfully slow.
Here is the brutal truth: AI’s capabilities are growing exponentially, but your local file organization is still stuck in the DOS era.
The AI isn’t stupid. It just doesn’t have an index. Imagine walking into a library with millions of books, but there’s no catalog system. You just have to walk down every aisle and check every spine. Even the smartest librarian in the world is going to be useless in that scenario.
So, I spent a day building a 3-file index system. Now, my AI finds files in milliseconds. Let’s talk about how I got there, and why you need to stop chasing complex integrations.
When I realized the problem, my first instinct wasn’t to write code. It was to see what the market had. I went down the rabbit hole of knowledge management. Obsidian’s bidirectional links, Zettelkasten, Logseq. Great concepts, but way too heavy. I don’t want to build a knowledge graph; I just want my AI to find a PDF.
I looked at DocGraph, Cortex, Graphify. DocGraph was the closest fit—it supports offline embedding and offers an MCP interface for AI to query directly. But I spent hours fighting with the better-sqlite3 compilation dependency. It just wouldn’t install. Cortex required ongoing API fees, and Graphify was built for code, not documents.
That’s when the realization hit: The best tool isn’t the “most advanced” one. It’s the one that solves your current problem and that you can actually get to run.
I decided to borrow the concept and write the implementation myself. The core logic is so simple it sounds like a joke: use os.walk() to scan the target directory once, and store the file name, path, size, and timestamp into a SQLite database. From then on, all queries hit the database instead of traversing the file system.
That’s it. The first scan took about ten seconds and indexed 790 files across 156 directories. After that? Millisecond response times. The entire solution is exactly three files: a Python query script, a SQLite database file, and an uninstall guide.
Zero external dependencies. The script only uses the Python standard library. It doesn’t touch or modify your original files. It just reads them.
Now, I did try to be fancy in the middle. I attempted to route this through an MCP integration so the AI could call the tool directly without me running a script. But the VS Code extension’s MCP configuration mechanism changed three times during my debugging process. After wasting half a day, I abandoned it and went straight back to the simple Python script.
Here is the lesson everyone building with AI needs to hear right now: Three files can solve a problem that often doesn’t need nine MCP tools.
Stop over-engineering your AI workflow. A working solution you can use today is worth a hundred times more than a perfect architecture sitting on GitHub. If a tool fails to install three times, drop it and write the script yourself.
We are so obsessed with the frontier of artificial intelligence that we forget the foundation. Claude Code and Codex are incredibly powerful, but if they can’t see your data, their power is an illusion.
AI’s capability is the ceiling, but your local data organization dictates the actual efficiency.
If you’re struggling with slow AI file retrieval, don’t wait for a better model. Don’t wait for a better integration. Open your terminal, write a 20-line Python script, and build your own index. Fix your last mile.
FAQ
Q: Doesn't native OS search (like Everything on Windows) already do this?
A: Native OS search is great for humans clicking through UI, but AI agents can't natively interact with it. The script puts the data directly into a SQLite format the AI can query instantly without UI overhead.
Q: Why not just use an MCP integration for a more seamless experience?
A: You can, but MCP configurations are currently unstable and often require fighting with compilation dependencies. A simple Python script has zero dependencies, runs instantly, and gets the job done today instead of next week.
Q: What if I need semantic search (finding files by concept, not just name)?
A: For 90% of developer and professional workflows, metadata search (name, path, date) is exactly what you need. Semantic search requires vector databases and embeddings, which is massive overkill for just finding your project docs.