SuperAPI AI Directory

ossian-mcp

RAG over your own documents with cited passages, plus durable agent memory ranked by relevance, importance and recency; read-only by default.

Open website

About this tool

Purpose

ossian-mcp is the MCP server adapter for Ossian. Ossian itself runs as a server, and this project is responsible for putting Ossian in front of AI agents so that agents can: ask questions about an organization's own documents and get the passages on which the answers are based, and have a persistent memory that outlives a single conversation. Before use, you need a running Ossian instance, and refer to its README to start it via docker compose up.

Main capabilities

  • Document Q&A: ask_documents searches the corpus and returns the answer along with its source passages. When the corpus does not support a given answer, the tool returns a refusal, and the tool description requires the model to report this faithfully rather than falling back to general knowledge.
  • Agent memory: recall searches what the agent has been told; memories are ranked by relevance, importance, and recency, and persist after the conversation ends.
  • Memory and corpus are two separate stores: recall searches what the agent has been told, ask_documents searches what the organization has written down; they are deliberately kept separate to avoid memory appearing as a citation in policy-type answers and being confused with the policy itself.
  • Tools are registered by access mode: read-only mode exposes four read tools; ingest and remember require read-write mode; forget requires admin mode.

How to use

  • Requires a running Ossian and an API key. Keys can be issued in the Console (Console → API keys).
  • It is recommended to give keys the minimum scope: namespace can restrict a key to a particular slice.
  • OSSIAN_AGENT_ID is used to distinguish the memories of different agents; two agents sharing the same id share memory.
  • For client configuration snippets, see docs/CLIENTS.md, covering Claude Code / Cursor / Codex / VS Code / Windsurf; for all supported environment variables, see .env.example.
  • The server communicates via JSON-RPC over stdio, waiting for protocol frames. Diagnostic information is output to stderr; only protocol frames are allowed on stdout.

Security and default limits

The server enforces an additional access model on top of the Ossian API key; the policy is read from environment variables and enforced in src/security.ts:

  • OSSIAN_MODE: read-only (default) → read-write → admin. Only tools whose capabilities the mode allows are registered.
  • OSSIAN_ALLOW_FORGET: forget_session irreversibly erases memory; in addition to admin mode, this flag is also required.
  • OSSIAN_NAMESPACE_ALLOWLIST / OSSIAN_PROTECTED_NAMESPACES: restrict the slices that can be operated on and mark slices as read-only and not writable.
  • OSSIAN_DRY_RUN: validates and logs writes (ingest / remember / forget) without actually performing them.
  • OSSIAN_AUDIT_LOG: outputs one line of JSON audit log to stderr for each protected operation (enabled by default).
  • Interactive confirmation: when the client supports MCP elicitation, forget_session prompts for human approval before erasing session memory; clients that do not support this feature fall back to the OSSIAN_ALLOW_FORGET gate.

The primary control is still the API key: issue the minimum key that meets the need. See SECURITY.md for details.

Applicable scenarios

Suitable for scenarios that require agents to give cited answers based on an organization's internal documents and to maintain memory across conversations. Because it is read-only by default and supports namespace restrictions, audit logs, and dry runs, it is also suitable for environments that are cautious about write operations and need to verify before granting permissions.

Limitations and notes

  • A running Ossian service and a valid API key are required first, otherwise it cannot be used.
  • Read-only by default; writes and erasures require explicitly elevating the mode; erasing memory also requires an additional flag or human confirmation.
  • Missing facts not yet provided: specific platform support scope, fees and pricing, performance metrics, etc. are not explained in the materials.