
agentgrasp
io.github.damejerasv0.1.0更新於 Oct 1, 2026
Yes/no questions about local files, and relevant-file search, with TypeSafe Jev
概覽
將冗長的 Bash 輸出存成檔案而不佔用編碼代理的上下文,並支援對這些檔案進行是/否提問與相關檔案搜尋。
- 功能
- agentgrasp 會包裝每個 Bash 指令,把冗長的輸出寫入檔案,代理只會看到簡短摘要與檔案路徑。ask 工具可對檔案回答是/否問題,search 工具會傳回相關檔案與行範圍,而不傳回原始碼文字。兩個工具都使用 TypeSafe 的 Jev 是/否模型。
- 適用情境
- 當編碼代理執行的指令產生非常長的輸出,而你希望保持上下文精簡、同時仍能查詢這些輸出時適用。適合 Claude Code 工作流程中需要提出針對性是/否問題或找出相關檔案,而不是閱讀整份日誌的情境。
- 執行需求
- 以本機程序執行,可透過安裝腳本、npm install -g agentgrasp 或 npx agentgrasp mcp 安裝。必須在啟動 Claude Code 的環境中設定 TYPESAFE_API_KEY 環境變數;否則 ask 與 search 會傳回 provider_unavailable。Claude Code 沙箱必須允許寫入 agentgrasp 狀態目錄。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 agentgrasp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
agentgrasp
agentgrasp keeps long command output out of a Claude Code agent's context. Claude Code still
runs every Bash command. When the output is long, agentgrasp saves it to a file and the agent
sees a short summary with the file path. The agent can then read the file, or ask yes/no
questions about it with the ask tool. The search tool finds the files and line ranges that
are relevant to a question, without returning source text.
ask and search use Jev, TypeSafe's yes/no model.
Install
Instead of the installer, npm install -g agentgrasp installs the same binary, and
npx agentgrasp mcp runs the MCP server without a global install.
The plugin calls agentgrasp from PATH. Set TYPESAFE_API_KEY in the environment that
starts Claude Code; without it, ask and search return provider_unavailable.
Settings
agentgrasp runs each Bash command inside a { ... } group that sends its output to files.
Claude Code asks for approval of every command that holds such a group, also when your allow
rules allow the command, and no allow rule changes that. So in Claude Code's default and
acceptEdits permission modes, every Bash call asks for approval. In bypassPermissions mode
the calls run without a prompt. Your deny rules still block a command in every mode.
When the Claude Code sandbox is on, let Bash write the agentgrasp state directory. Without this, the output cannot go to its files, the shell prints the error, and the command does not run:
Use $XDG_STATE_HOME/agentgrasp instead when XDG_STATE_HOME is set.
Costs and risks
askandsearchsend file content to TypeSafe. TypeSafe lists Jev at $42 per billion input tokens. Each call writes the tokens it used to its record under~/.local/state/agentgrasp/asks/orsearches/.askandsearchcan read any file inside the MCP roots, which are the project directory and the directories you add. This includes files that yourReaddeny rules block. When you allow these tools, you allow that.- The state directory grows until you delete files from it. agentgrasp never deletes them.
- A runaway command can fill the disk until Claude Code's timeout stops it.
Links
- MCP Registry name:
mcp-name: io.github.damejeras/agentgrasp
來源:README.md,提交 f979585
工具
0版本歷史
1- v0.1.0最新Oct 1, 2026

