For code, usually not. Claude Code finds its way with file search and grep, and code has exact names to match. For documents, it helps: PDF and Word files can’t be searched with grep, and the words in your question often differ from the words in the text.
What Claude Code does on its own
It searches file names and text, then reads files. PDF support is for reading: files over 10 pages are read in ranges of up to 20 pages, and binary formats such as .xlsx are refused. That works when you know which file to open. It is slow when the answer is somewhere in 500 PDFs.
Three options
| What you do | Good for | |
|---|---|---|
| Convert to Markdown, use grep | Run a converter, keep files in the repository | Dozens of documents that rarely change |
| Build your own RAG | Choose chunking, embeddings, a vector database and an MCP server | Teams with special needs |
| Use a ready-made index over MCP | Install an app, add folders | Many files in mixed formats |
What goes wrong with chunks
A basic RAG pipeline returns a handful of text fragments. The model doesn’t see what comes before or after, and can’t tell whether a fragment is an example or a rule. We wrote about this in why we abandoned RAG.
An agent can do better when it gets tools instead of fragments: search for documents, look at an outline, then read the section it needs. This takes more steps, so it is slower than a single lookup, but the model can check its own result.
Set it up
- Install Linkly AI and add your document folders. Indexing runs on your computer.
- Run:
claude mcp add --transport http linkly-ai "http://127.0.0.1:60606/mcp?client=claude-code"
- Ask something that needs a document: “Find our notes on the retry policy and check whether this code follows them.”
Linkly AI combines keyword and semantic search and reads scans, images, audio and video as well. Local features are free. See Claude Code setup and reading PDFs in Claude Code.
