
cheap-eyes
io.github.st412m由 GitHub 帳號 st412m 發布v0.2.1更新於 Oct 26, 2026
Hands bulk reading to cheap OpenRouter models, masks secrets, checks each answer against the source
概覽
把大量日誌、文件與網頁的閱讀工作交給便宜的 OpenRouter 模型,並逐行核對模型引用的內容與原文,再回傳簡短答案。
- 可以做什麼
- 以 extract、draft、edits、schema 或 grep 模式對檔案或網址執行閱讀任務,回傳簡短且經過核對的摘要標頭
- 讀取已儲存的結果:分頁內容、grep 輸出、核對報告、模型看到的原文,或取消正在執行的任務
- 查看今日與累計花費、API 金鑰狀態,並列出候選模型
- 讀取文字、HTML、PDF、Word、RTF、PowerPoint、OpenDocument、EPUB、FB2 與郵件檔案,或由伺服器自行抓取 http(s) 網址
- 在內容送往模型前遮蔽機密,並把讀取範圍限制在設定的資料夾內
- 適用情境
- 適合需要依語意閱讀大量文字的情況,例如日誌封存、長文件、網頁、「關於某主題的所有內容」,以節省上下文。若只是精確查找、看結構或處理約 30 KB 以下的小檔案,用 grep 或分段讀取更便宜也更可靠。
- 執行需求
- 本機需 Node.js 22.17 或更新版本(也可用 Docker 或 Home Assistant 應用程式)。需要 OpenRouter API 金鑰,放在 CHEAP_EYES_OPENROUTER_KEY 中,並為它單獨設定每日上限。需要 JSON 設定檔(路徑由 CHEAP_EYES_CONFIG 指定),其中定義 read_roots 與模型別名。需能連線 openrouter.ai 及任務中指定的網址;HTTP 模式還需至少 32 字元的權杖並在前面加上 TLS。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 cheap-eyes,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
cheap-eyes
Cheap eyes for an expensive agent.
An AI agent's context is expensive. When it reads a big log, a long doc, a web page or a whole code tree, it burns that context on lines it mostly doesn't need. cheap-eyes is an MCP server that hands the reading to a cheap model. It then checks every line of that model's answer against the source, so the agent gets back a short answer it can trust.
What it looks like
A real header from the server (trimmed), with a stubbed model answer. The agent asked for every ERROR line after 08:10 in an app log, plus the traceback that follows it:
The model quoted five lines. In the real log, line 9 says INFO [sync] retry 2/3 ok,
so the model made up an error. The check compared each quote with the source line and
flagged L9 as bad. The agent sees that before it relies on the answer.
Why you can trust the answer
- The model has no tools. It can't open files, browse or call anything. It sees only the numbered lines cheap-eyes chose to send.
- Secrets are masked before anything leaves your machine. Passwords, tokens and
keys become
[token],[key]and so on, in the files and in the task. - Only Zero Data Retention providers. Those are providers that don't store your prompts. cheap-eyes talks only to OpenRouter and asks for them on every call.
- Every quote and line reference is checked mechanically against the lines that were sent. Wrong values and uncited claims are flagged.
- What the check does not prove: that the answer is complete or relevant. It proves what was quoted is real, not that nothing was missed.
Requirements
Installation
Claude Code / Claude Desktop (npx)
-
Write a config file at
~/.config/cheap-eyes/config.json, or%APPDATA%\cheap-eyes\config.jsonon Windows (see Configuration). -
Check it (no network, no secrets printed):
npx -y cheap-eyes check-config -
Add the server to Claude Code:
-
Try it: "Use eyes_run to list every TODO in /home/me/notes/**/*.md, with the line it's on."
Claude Desktop, .mcp.json and a global install:
installation.
Home Assistant app
Home Assistant renamed add-ons to apps in 2026.2; on older versions the same menus say Add-ons and Add-on Store.
-
Add this repository:
Or by hand: Settings → Apps → App Store → ⋮ → Repositories → + Add, paste
https://github.com/st412m/cheap-eyes, select Add. -
Find cheap-eyes in the store and select Install.
-
In Configuration, set
openrouter_key, anhttp_tokenof at least 32 characters (openssl rand -hex 32gives one) and yourread_roots. -
Select Start. The app serves MCP on port 3400.
Options and the connector URL: app documentation.
Docker / HTTP
cheap-eyes serve --http runs the same server over Streamable HTTP with a token; the
repository's Dockerfile and compose.example.yaml wrap it. See
installation.
Configuration
A JSON config file. The fields to set first:
The key goes in the env var CHEAP_EYES_OPENROUTER_KEY, never in the file. Every
field, env var and file location:
configuration.
Connecting to claude.ai
Run the HTTP server (or the Home Assistant app) and publish it through a reverse proxy that terminates TLS. The endpoint is:
Add it in claude.ai → Settings → Connectors → Add custom connector. A wrong path gets a bare 404, and there is no OAuth by design. See security.
Using it
You talk to your agent as usual. It calls cheap-eyes when a job fits. Pick the mode by what you want back:
- extract when you need exact lines: errors in a log, a config value, every mention of something. Invented lines are flagged.
- draft when you want notes or a summary. Every line must cite its source lines. Values that aren't in those lines, and lines with no citation, are flagged.
- edits when you want fixes proposed. You get JSON edits whose old text is checked against the file. cheap-eyes never applies them.
- schema when you want fields filled: a JSON schema in, the same JSON out with a line ref and a verbatim quote for every value. Conflicting values are reported, not resolved.
- grep when you know the exact pattern: matching windows, no model, $0.
Files can be text, HTML, PDF (with a text layer), Word (DOCX, DOC), RTF, PowerPoint
(PPTX, PPT), OpenDocument text and presentations (ODT, ODP), EPUB, FB2 and mail (EML,
MSG, attachments included), or an http(s) URL that the server fetches itself.
Spreadsheets and scans are refused with the reason. Refs name the page, slide, chapter
or attachment of a line: L40 (slide 3), L12 (attachment: offer.pdf, p.2)
(formats).
Prompts you might type (the files must lie inside your read_roots):
- "Use eyes_run to pull every ERROR from /var/log/app/app.log since 08:00 today, with the tracebacks."
- "Have cheap-eyes draft a summary of /home/me/notes/deploy.md: versions, ports, backup times."
- "Use eyes_run in edits mode to fix the dead links in /home/me/notes/*.md."
- "Use eyes_run in schema mode on /home/me/docs/tender.pdf: customer, maximum price, deadline, and the list of items with quantities."
What each check catches and misses: checks.
When to use cheap-eyes and when grep
cheap-eyes pays off for reading by meaning over large text: logs, archives, long documents, web pages, "everything about X", chronologies. For exact lookups — a key, which blocks contain X, a list by a field, a value in a table — and for files under about 30 KB, grep, a ranged read or code is cheaper and more reliable. That is why spreadsheets are not read at all.
On a benchmark of 2026-09-30 with independent ground truth:
- An 887 KB log archive, task "everything about power": recall 96 %, precision 100 %, $0.08, about 12k tokens of the agent's context instead of about 227k for reading it whole.
- A structural task over Home Assistant automations ("who sends to Telegram"): precision 41 % with a green check. The check catches invented lines, not wrongly chosen ones.
A snippet for CLAUDE.md or your Claude settings:
To compare models on your own documents, run
cheap-eyes bench.
Tools
eyes_run— does the job and returns a short, checked header.eyes_result— reads a stored result: pages, grep, the check report, the source text the model was given; cancels a running job.eyes_stats— spend today and all time, your key's status; on request, the model table.
Inputs and outputs: tools.
Models and cost
No model is pinned in code. You name models in your config under aliases (fast,
long, …), and switching means editing the config and restarting. Each alias lists
model ids in priority order; if one can't be used, the next is tried. The example ids
were valid on 2026-09-26 and will age. To pick new ones:
This lists cheap Zero Data Retention models, and shows how well each of your aliases
passed its checks on your own jobs. If your OpenRouter account's Guardrails don't allow
a model, cheap-eyes skips it and marks it blocked by account. Allow it at
openrouter.ai → Guardrails if you want it used.
With cheap models a job costs fractions of a cent. Your key's own daily limit on
OpenRouter is the real ceiling. On top of that, daily_budget_usd (default $1 a day)
stops calls before they would go over. More:
models and spending.
Limitations
- The check proves quotes are real, not that the answer is complete. A relevant line the model skipped is not flagged.
- No OCR. Scanned PDFs are refused with the reason; layout and images are lost in extraction.
- No spreadsheets. Excel and OpenDocument spreadsheets are refused: questions about a table are exact lookups, which grep or code answers and a model reading the table as text gets wrong.
- Size caps. A text file (or the text extracted from a document) over 2 MB is refused, never truncated; a document over 50 MB and a URL over 10 MB likewise; a job is capped at 5 MB after filtering and 200 files.
- No reduce pass for
draft. With several chunks, each chunk's notes come back under their own header. - The hook covers Claude Code's
Readtool only. Shell commands are not intercepted.
Troubleshooting
- OpenRouter answers 403 "Access denied by security policy". OpenRouter refuses some regions; route the calls through a proxy.
- A model is
blocked by account. Allow it at openrouter.ai → Guardrails, or put another id in the alias. - The server won't start and names an alias. A value in
defaultsis not defined inmodels. - The client shows old tools after an update. Refresh the connector's tool list and start a new chat.
More: troubleshooting.
Security
- The model gets no tools; everything it returns is framed as untrusted output.
- Only files inside
read_rootsare read, after resolving symlinks;.env*, keys,secrets.yaml, databases and.gitare always refused. - Secrets are masked before anything leaves the machine; model calls go only to
openrouter.ai, with Zero Data Retention required. - URLs in a job are fetched by the server with private and local addresses refused, also against DNS rebinding.
- The server writes nowhere outside its own state folder unless you opt into export.
- In HTTP mode the token works as a password. It needs at least 32 characters and is never logged; put TLS in front. Request bodies over 1 MiB are refused.
More: security.
Links
- Documentation — installation, configuration, tools, checks, models and spending, results, security, hook, formats, bench, troubleshooting, internals
- Home Assistant app
- Changelog
Prior art
Both MIT-licensed; cheap-eyes is written from scratch (see NOTICE).
- BardyLaw/claude-worker-delegation
— the server reads files by path, short preview, usage log, daily budget, PreToolUse
hook. cheap-eyes adds what it lacked: a
realpathpath guard, refusal instead of silent truncation, masking, line numbers and checking the output. - aashahin/claude-opencode-delegate — async task registry, compact status header.
License
MIT — by st412m.
來源:README.md,提交 e51112c
工具
0版本歷史
2- v0.2.1最新Oct 26, 2026
- v0.2.0Oct 9, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分