← 返回
未分类

YiHui CONTEXT MODE

context-mode is an MCP server that saves 98% of your context window by sandboxing tool outputs. It routes large file reads, shell outputs, and web fetches th...
context-mode 是一个 MCP 服务器,通过沙箱化工具输出来节省 98% 的上下文窗口。它路由大文件读取、shell 输出和网页获取等操作...
1yihui
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 343
下载
💾 0
安装
1
版本
#latest

概述

Context Mode

An MCP server that solves the context window problem in AI coding agents. It provides:

  1. Context Saving — sandbox tools keep raw data out of context window
  2. Session Continuity — SQLite + FTS5 for event tracking
  3. Think in Code — program analysis instead of reading files
  4. Output Compression — terse output format reducing tokens 65-75%

Available Tools

ToolWhen to UseToken Savings
----------------------------------
ctx_batch_executeRun multiple commands + auto-search results90%+ vs raw exec
ctx_executeSingle script execution (JS/Python/Shell)90%+ vs raw exec
ctx_execute_fileRun code from a file, return only resulthigh
ctx_indexIndex docs/knowledge into searchable FTS5
ctx_searchSearch indexed content with BM25fast recall
ctx_fetch_and_indexFetch URL + index into knowledge base90%+ vs raw web fetch

Decision Rules

Use ctx_batch_execute instead of multiple exec/read calls when:

  • Analyzing multiple files at once
  • Counting/grepping across many files
  • Need command output + search results together

Use ctx_execute instead of reading files when:

  • User asks "how many lines/funcs/classes in X"
  • Need to compute something, not just read it

Use ctx_fetch_and_index instead of web_fetch when:

  • Researching a topic across multiple pages
  • Full raw content won't fit in context

Output Format

Terse. Drop filler, pleasantries, hedging.

❌ "So I ran a command to check the files and found that there are..."
✅ "Checked. 3 TypeScript files: src/index.ts (142 lines), src/cli.ts (89 lines)."

OpenClaw Integration

Install via MCP:

openclaw mcp set context-mode '{"command":"npx","args":["-y","context-mode"]}'
openclaw gateway restart

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-08 00:19 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

taskflow

1yihui
用于需要跨越一个或多个独立任务,但仍需作为单一作业运行且保持统一所有者上下文的场景。TaskFlow 是持久化流程的底层支撑...
★ 1 📥 677

YiHui Agent Swarm

1yihui
Multi-agent orchestration framework for OpenClaw. Define roles, route tasks, manage state, and coordinate agent teams us
★ 0 📥 337

Dalong Video Frames

1yihui
使用 ffmpeg 从视频中提取帧或短片段。
★ 0 📥 347