
Ossian Mcp
io.github.dockndevai由 GitHub 帳號 dockndevai 發布v0.2.2更新於 Oct 24, 2026
Ask your own documents with citations, plus durable memory for agents. Safe by default.
概覽
讓助理根據組織自有文件附引用地回答問題,並為代理保留跨對話的持久記憶。
- 可以做什麼
- 這是一個透過 stdio 連接代理與 Ossian 實例的轉接器。唯讀工具包括 ask_documents(根據語料庫作答並附引用,沒有依據時明確拒答)、list_namespaces、list_documents,以及依相關性、重要性與時效排序的 recall 記憶檢索。寫入工具 add_document_from_url 與 remember 需要 read-write 模式,forget_session 刪除工作階段記憶則需要 admin 模式。只有在目前存取模式允許其能力時,工具才會被註冊。
- 適用情境
- 適合希望助理根據私有文件語料庫作答並引用原文出處、而非依賴一般知識的情境。也適合需要跨對話持久記憶、且記憶與文件語料庫彼此獨立的代理。若沒有可連線的執行中 Ossian 實例,則沒有用處。
- 執行需求
- 需要本機 Node.js 執行環境並安裝 npm 套件 ossian-mcp,以及一個可透過 OSSIAN_URL 存取的執行中 Ossian 實例。必須提供從主控台簽發的 Ossian API 金鑰(OSSIAN_API_KEY,osk_...)。選用變數包括 OSSIAN_AGENT_ID(預設 mcp)、OSSIAN_MODE(預設 read-only),以及 OSSIAN_ALLOW_FORGET、OSSIAN_NAMESPACE_ALLOWLIST、OSSIAN_PROTECTED_NAMESPACES、OSSIAN_DRY_RUN、OSSIAN_AUDIT_LOG 等政策變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Ossian Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
ossian-mcp
MCP server for Ossian — ask your organisation's own documents and get the passages the answer came from, plus a memory for your agent that outlives the conversation.
Ossian is the server; this is the adapter that puts it in front of an agent. You need a running
Ossian to point it at — see its README for a
docker compose up.
What it gives an agent
Tools are gated by access mode (see Safe by default) — the server starts read-only, exposing only the four read tools until you raise the mode.
Install
You need a running Ossian and an API key. Issue one from the console (Console → API keys) or:
Give the key the narrowest scope that works. namespace confines it to one slice, so a key that
leaks reads only what that agent was for.
Configure
OSSIAN_AGENT_ID separates one agent's memories from another's; two agents sharing an id share
their recollections, which is occasionally what you want and usually not.
See docs/CLIENTS.md for Claude Code / Cursor / Codex / VS Code / Windsurf snippets, and .env.example for every supported variable.
Safe by default
The server enforces an access model on top of the Ossian API key — defence in depth over the
key's own roles and namespace confinement. It reads its policy from the environment
(.env.example) and enforces it in src/security.ts:
OSSIAN_MODE—read-only(default) →read-write→admin. A tool is registered only if the mode allows its capability. Read-only exposes four tools; ingest and remember needread-write; forget needsadmin.OSSIAN_ALLOW_FORGET—forget_sessionerases memory irreversibly, so on top ofadminmode it also requires this flag.OSSIAN_NAMESPACE_ALLOWLIST/OSSIAN_PROTECTED_NAMESPACES— confine which slices can be touched, and mark slices that may be read but never ingested into.OSSIAN_DRY_RUN— validate and log writes (ingest / remember / forget) without executing.OSSIAN_AUDIT_LOG— a JSON audit line per guarded operation, on stderr (default on).- Interactive confirmation — when the client supports MCP elicitation,
forget_sessionprompts the human to approve before erasing a session's memory; clients that can't elicit fall back to theOSSIAN_ALLOW_FORGETgate.
The primary control remains the API key: issue the narrowest one that works. See SECURITY.md.
Two things worth knowing
A "not found" is an answer. ask_documents returns a refusal when nothing in the corpus
supports a response, and the tool description tells the model to report that rather than falling
back on general knowledge. An invented answer presented as company policy is the failure this
whole system exists to prevent — do not paper over it in your own prompt.
Memory is not the corpus. recall searches what the agent was told; ask_documents searches
what the organisation wrote down. They are separate stores on purpose: memories surfacing as
citations in a policy answer would be indistinguishable from the policy itself.
Developing
It speaks JSON-RPC over stdio, so it will sit there waiting for a frame. To drive it by hand:
Diagnostics go to stderr on purpose — anything written to stdout that is not a protocol frame corrupts the stream, and the failure looks like a client that cannot parse rather than a server that printed a log line.
Licence
Apache-2.0
來源:README.md,提交 d08810f
工具
0版本歷史
1- v0.2.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分