
officegrep
io.github.AsgoresmilelongPublished by GitHub account Asgoresmilelongv0.1.3Updated Oct 26, 2026
Full-text search inside Word, PPT, Excel and PDF files, with precise locators.
Overview
Local MCP server that indexes Word, PowerPoint, Excel, PDF and text files into SQLite so an assistant can full-text search them with precise locators.
- What you can do
- Search indexed documents by literal full-text query, returning file path, a locator such as page, slide or sheet cell, and a highlighted snippet
- List indexed files with their block counts
- Build or incrementally refresh the index for a folder
- Keep the index current by watching folders for changes, either through the CLI or in the background while the server runs
- When to use it
- Useful when an assistant needs to find passages inside Office documents and PDFs on the local machine, where plain grep cannot read the content, and you want offline, incremental search without an embedding service or vector store.
- Requirements
- Runs as a local process on the desktop, installed via pip or an .mcpb bundle (the bundle needs uv). Runtime dependencies lxml and openpyxl, with optional pypdf for PDFs. No account or API key. Optional environment variables OFFICEGREP_DB, OFFICEGREP_AUTOINDEX, OFFICEGREP_ROOTS and OFFICEGREP_WATCH control the index path, automatic first-run scan, scanned folders and background watching.
Installation
In SourceWeft
- Open officegrep in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
officegrep
[ci] [license: MIT] [python] [MCP]
Full-text search inside Word, PowerPoint, Excel and PDF — for agents.
grep cannot see a single character inside a .docx. officegrep extracts the text, indexes it into one SQLite file, and hands it to any agent over MCP.
中文说明:README.zh-CN.md
Why
grep/ripgreponly read plain text..docxis a zip of XML,.xlsxkeeps strings in a shared table,.pdfis a compressed stream.- Generic RAG needs an embedding service, a vector store, and a network round-trip.
- This needs one SQLite file: offline, incremental, milliseconds.
Install
Runtime deps: lxml, openpyxl; PDF support adds optional pypdf.
Listed in the official MCP Registry as io.github.Asgoresmilelong/officegrep; there is also an .mcpb bundle on the releases page for MCP hosts that install bundles (needs uv).
CLI
The index lives in ~/.officegrep/index.db; override with --db or OFFICEGREP_DB.
First run
Nothing to do. If the index is empty when officegrep mcp starts, it scans ~/Documents, ~/Downloads and ~/Desktop in the background (25 MB per-file cap) while the agent keeps talking; a search_docs call made in the meantime answers with a "still building" note instead of a misleading "no results".
- opt out:
OFFICEGREP_AUTOINDEX=0 - scan other folders:
OFFICEGREP_ROOTS="~/work;~/papers"
Stay in sync
Or let the MCP server watch in the background:
The index runs in WAL mode, so a watch process and an MCP server can share one database file concurrently — something that fails with database is locked on a default rollback journal.
MCP server
Client config (Claude Desktop / Cursor / Codex / any MCP host):
The protocol is a hand-written JSON-RPC over stdio — no MCP SDK dependency.
How it works
- Every block carries a human-readable locator, because the first question an agent asks is "where?".
- The index uses SQLite FTS5 with the
trigramtokenizer: substring matching for both CJK and Latin text, no word segmenter required, ranked bybm25(). - Queries of 1–2 characters cannot match trigrams, so they fall back to a scan ranked by hit count (CJK queries are frequently two characters).
- Incremental: compare
(size, mtime)first, hash with SHA-1 only when they differ.
Benchmark on a real engineering corpus:
Limits
- No OCR: scanned PDFs yield nothing.
- Literal search, not semantic — "tower" will not find "pole" unless both appear.
- 1–2 character queries scan the table; slow past a few hundred thousand blocks.
- Indexes body text only: no comments, tracked changes, headers or footers.
License
MIT
Source: README.md at commit 7c1314a
Tools
0Version history
2- v0.1.3LatestOct 18, 2026
- v0.1.1Oct 18, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts