UNPKG

@mnemoverse/mcp-memory-server

Version:

Hosted AI agent memory over MCP that learns from outcomes — feedback re-ranks recall — with shared rooms for multi-agent work; one key or OAuth across Claude Code, Cursor, VS Code & ChatGPT, no infra to run

29 lines (28 loc) • 1.54 kB
/** * MCP resource: one saved memory by id, as `memory://item/{memory_id}`. * * Clients that support resources (Claude.ai connectors attach them through an * @-mention) can pull one specific memory into context. The ids are the `id:` * lines of memory_read and memory_list_recent results, so this is the "open * this memory" companion to the recall tools. There is no listing: the * template is advertised, and reading needs a known id. * * Moved here from the hosted connector (mnemoverse-mcp-remote, * src/resources/index.ts) in step 3c of the ADR-025 plan, with the same URI * template, name and output, so the connector can register this instead of * its copy. It returns only `memory_id`, `content` and `domain`: the engine's * point read also carries importance, valence, access counts and metadata, * which a model opening a memory does not need. * * Two limits, both the engine's. The point read looks only in the caller's * own store (GET /memory/atoms/{id} takes no domain), so a memory read from a * shared room cannot be opened here; the description says so. And a Vault * secret is safe to open: its value lives in a column no read returns. */ import { type McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { type MemoryToolDeps } from "./tools.js"; /** * Register the `memory://item/{memory_id}` resource on `server`. It reaches the * API only through `deps.apiFetch`, like the tools. */ export declare function registerMemoryResources(server: McpServer, deps: MemoryToolDeps): void;