
Osiris
io.github.MlkBlk-ITPublished by GitHub account MlkBlk-ITv0.1.0Updated Nov 1, 2026
Cache-aware context engine for AI agents: server-side payload filtering, honest context ledger.
Overview
Osiris is a local context-governance server that gives an assistant task plans, sealed state manifests, action prechecks, loop detection and filtered recall…
- What you can do
- Plan, resume and check the status of a task, producing a sealed manifest the assistant carries between turns
- Authorize or deny an action against invariants, token budget and duplicate detection
- Log actions, detect loops, offload large payloads and record memory
- Rehydrate stored references with server-side filtering (grep, range, outline, aggregate) instead of full payloads
- Snapshot, compact or clear a session and issue delegation contracts between agents
- Expose task manifests, status and raw reference content as resources, plus a task-resume prompt
- When to use it
- Worth adding when long agent sessions on large payloads (logs, files, tool output) are burning context and cost, or when you want enforceable rules and loop protection around an agent's actions. It complements rather than replaces filesystem, Git or shell servers.
- Requirements
- Runs locally over stdio; the npm package is a launcher that needs a Python runtime (resolved via OSIRIS_PYTHON, uvx, python3 or python) and the PyPI package mcp-osiris. Optional environment variables: OSIRIS_HOME (state directory, default ~/.osiris), OSIRIS_ROOTS (allowed file-reading roots, empty means no file reading), OSIRIS_CACHE_TTL_S, OSIRIS_PRUNE_THRESHOLD_TOKENS, OSIRIS_DISPATCH_ONLY. No authentication declared.
Installation
In SourceWeft
- Open Osiris 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
[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)
Source: README.md at commit 57651cd
Tools
0Version history
1- v0.1.0LatestNov 1, 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