
Osiris
io.github.MlkBlk-IT由 GitHub 帳號 MlkBlk-IT 發布v0.1.0更新於 Nov 1, 2026
Cache-aware context engine for AI agents: server-side payload filtering, honest context ledger.
概覽
Osiris 是在本機執行的上下文治理伺服器,為助理提供任務計畫、密封狀態清單、動作預檢、迴圈偵測與過濾式召回,以降低 token 用量。
- 可以做什麼
- 規劃、恢復任務並檢視狀態,產生助理在各輪之間攜帶的密封清單
- 依不變量、token 預算與重複偵測來核准或拒絕某個動作
- 記錄動作、偵測迴圈、將大型資料外置並登錄記憶
- 以伺服器端過濾方式(grep、範圍、大綱、彙總)按需取回已存參照,而非整段內容
- 對工作階段做快照、壓縮或清理,並在代理之間簽發委派契約
- 以資源形式提供任務清單、狀態與參照原始內容,並提供任務恢復提示詞
- 適用情境
- 適合長時間代理工作階段處理大型資料(日誌、檔案、工具輸出)而導致上下文與成本膨脹的情況,也適合想對代理動作施加可執行規則與迴圈保護時使用。它與檔案系統、Git、shell 等伺服器並存,而非取代它們。
- 執行需求
- 透過 stdio 在本機執行;npm 套件只是啟動器,需要 Python 執行環境(依 OSIRIS_PYTHON、uvx、python3、python 順序解析)以及 PyPI 套件 mcp-osiris。選用環境變數:OSIRIS_HOME(狀態目錄,預設 ~/.osiris)、OSIRIS_ROOTS(允許讀取檔案的根目錄,留空則不讀取檔案)、OSIRIS_CACHE_TTL_S、OSIRIS_PRUNE_THRESHOLD_TOKENS、OSIRIS_DISPATCH_ONLY。未宣告驗證機制。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Osiris,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[OSIRIS — Cache-aware context engine & state governor for AI agents]
OSIRIS
[PyPI] [npm] [Python] [License]
Cache-aware context engine & state governor for AI agents. Standard MCP server, local-first, independent of any model provider.
OSIRIS makes AI agents cheaper, faster, and more reliable: fewer tokens, fewer loops, zero unnecessary tools, and zero loss of context.
OSIRIS does not replace your other MCP servers (filesystem, Git, GitHub, shell, browser…). It coexists alongside them and drastically cuts what they cost in prompt context.
1. The Core Architectural Constraint
An MCP server never sees the final prompt assembled by the client host. It only sees what the agent sends to it. Therefore, OSIRIS cannot:
The promise is honest: OSIRIS provides stable state and an enforceable safety contract, not a client prompt builder.
2. Sealed Manifest — The Core Design
osiris.plan returns a deterministic block (~120 tokens) that the agent carries at a fixed position in its context window:
The SEAL is a SHA256 digest of stable zones. The agent passes it on every turn to osiris.observe: OSIRIS recomputes and detects any state drift immediately.
This is OSIRIS's passive transport: even if the agent stops calling tools, it carries the essential state cleanly.
Three Hashes Because Prompt Cache is Prefix-Based
Appending a constraint or decision changes
tail_hashbut notprefix_hash: the prompt cache holds, only the new tokens are prefilled.Rewriting a pinned decision is explicitly caught: OSIRIS checks collection identity, flagging a semantic break (
semantic_break: true,cause: pinned_rewrite).
3. The 6 MCP Tools
Access footprint: 1,019 tokens of schemas and descriptions in model context (measured via bench/run_bench.py). Paid on task start, amortized across the session — pays off on the very first turn with ≥800 token payloads.
osiris.observe combines logging, loop protection, payload externalization, memory registry, and automated pruning in a single call so the agent always reports back seamlessly.
Extended Operations
Resources & Prompts
osiris://task/{task_id}/manifest— Active zones, drift status, objectiveosiris://task/{task_id}/status— Real-time context pressureosiris://ref/{ref}— Raw byte content of any referenced payload- Prompt
osiris/task-resume— Clean agent recovery template after crashes
4. Architecture
5. Memory Model
Deterministic, typed, content-addressable memory — not an opaque vector database.
Scopes: task → project → agent → global.
6. Cache-Aware Pruning
Security Invariant: Pruning moves payload data to content-addressed refs (mem://sha256:…). It NEVER deletes.
7. LoopGuard Protection
8. Invariants (Guard Rails)
Define project safety rules in .osiris/invariants.toml:
9. Lossless Verification & Non-Loss Proof
OSIRIS guarantees full auditability for offloaded data:
- Self-verifying refs:
mem://sha256:<hash>. Reads re-verify data integrity against the hash before returning. - Zero deletion paths: data is relocated to the local store, never pruned permanently.
- Reproducible audit: Outputs cryptographic proof of non-loss:
10. Verified Benchmarks
Real measurements from python bench\run_bench.py running an automated coding workflow:
- Access Cost: 1,019 tokens of schemas, amortized across session tasks.
- Session Net Gate: PASS (Worst-case net across full suite: +951 tokens).
- At 20,000 tokens: +71.46% net savings on context usage.
11. Quick Start
CLI Verification
Registration as MCP Server
Add to your client configuration (mcp.json):
12. Installation
From PyPI (recommended)
From npm (no Python setup)
The npm package is a stdio launcher. It resolves the Python runtime in this
order — OSIRIS_PYTHON → uvx → python3 → python — and runs the PyPI
package mcp-osiris.
From source
MCP client configuration
License
MIT © 2026 Malik Belkacemi (MLKBLK-IT)
來源:README.md,提交 57651cd
工具
0版本歷史
1- v0.1.0最新Nov 1, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分