Thrift Memory

MCP开发工具

提供方 未标注

开发工具 stdio · 本地进程 未标注 社区 / 第三方 ClaudeCursorVS CodeWindsurf
查看接入方式

Thrift Memory 是一个成本优先的MCP内存服务器,适用于编码代理,避免每次会话都重新加载庞大的MEMORY.md、AGENTS.md和项目上下文文件。它在严格的令牌预算下仅回忆与任务相关的记忆,并返回一份节省收据:baselineTokens vs injectedTokens vs...

一句话选型结论

按资料字段整理

Thrift Memory 属于开发工具类 MCP 服务器,stdio · 本地进程,鉴权方式未标注,可直接接入 Claude、Cursor、VS Code 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类开发工具 传输方式stdio · 本地进程 鉴权未标注 部署方式本地部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

开发工具
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

开发

安装与配置

stdio · 本地进程 未标注
客户端在本机拉起子进程,数据不出本机
npx -y thrift-memory audit

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js 等运行时,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
代码与仓库操作

在对话里直接查代码、提 issue、走 PR,省掉来回切工具。

本地命令与脚本

把构建、测试、格式化这类重复命令交给模型执行。

接口联调与测试

让模型调你的接口、跑一遍用例,快速定位问题。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude、Cursor、VS Code,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude、Cursor 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Thrift Memory当前 未标注 stdio · 本地进程 本地部署 有 未标注
Git 838e2ec1 12 stdio · 本地进程 本地部署 有 2026-05-17
Markitdown MCP 2c653a5f 1 stdio · 本地进程 本地部署 有 2026-05-17
JavaGuide 未标注 stdio · 本地进程 本地部署 有 2026-04-11
awesome-claude-skills 未标注 stdio · 本地进程 本地部署 有 2026-04-26
Context7 831acf40 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

开发工具
字段来自项目仓库与公开索引,中文说明由本站标注
提供方未标注上游标注的维护方 未标注
分类开发工具本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式未标注远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验未标注上游最后核验时间

详细介绍

22.5 KB
来自项目仓库与上游目录的原文,未做删改

Thrift Memory

The MCP memory server that proves how many tokens you saved. (npm: thrift-memory)

🌐 thrift-memory landing page → · npm

> Not affiliated with Apache Thrift, the RPC framework.
> This project is always referred to as Thrift Memory — an MCP memory layer for coding agents.

Thrift Memory is a cost-first MCP memory server for coding agents that stop reloading large
MEMORY.md, AGENTS.md, and project context files every session.
It recalls only
task-relevant memory under a hard token budget and returns a savings receipt:
baselineTokens vs injectedTokens vs savedTokens.```text
savedTokens = baselineTokens - injectedTokens


If your coding agent re-loads the same large context file at every session start, that
reload is pure, repeated token cost. Thrift Memory caps it and — uniquely — logs a
receipt on every recall so you can see the token usage you avoided, not just trust that
you avoided it.

> Budgeted recall, in one line: *Thrift Memory recalls only task-relevant memory under a
> hard token budget and logs a receipt showing baselineTokens vs injectedTokens vs
> savedTokens.*

> Status: early `0.0.x`. APIs are useful but still allowed to change before
> `v0.1`.

## What It Does

Thrift has three surfaces:

| Surface | Purpose |
| --- | --- |
| MCP server | Agent memory tools: `remember`, `recall`, `search_memory` |
| Local dashboard | Savings UI backed by the meter JSONL, plus owner controls (pin/disable, budgets, kill-switch) |
| Proxy | Optional HTTP gateway that trims live LLM requests and retries rate limits |

Be precise about the split:

- **MCP manages memory recall and token receipts.**
- **`thrift-proxy` manages live request trimming and rate-limit retries.**

## How It Compares

The right comparison for Thrift Memory is **not** recall-quality / knowledge-graph
layers like Mem0, Zep, or
Graphiti — those optimize how *smart* recall is.
Thrift Memory competes with the growing set of **MCP memory servers for coding agents**,
and it differs from all of them on one axis: **cost visibility.**

Every recall returns a savings receipt — `baselineTokens`, `injectedTokens`,
`savedTokens` — so you can see how many tokens you avoided. No other server in this
category positions itself around *proving* the saving.

| Server | What it optimizes | Hard token budget on recall? | Emits a savings receipt (baseline vs injected vs saved)? |
| --- | --- | --- | --- |
| **Thrift Memory** | **Cost-first recall — cap the tokens and prove the saving** | **Yes** | **Yes — every recall** |
| Official Memory MCP | Knowledge-graph memory (entities / relations) | No | No |
| Context Mode | Context sandboxing — keep large tool/file outputs out of context (SQLite FTS5) | No (sandbox, not a recall budget) | No |
| Agent Memory MCP | Returns a small index via `memory_read`, then `memory_search` by topic | No | No |
| @provos/memory-mcp-server | `memory_context` / `task` recall inside a token budget | Yes | No |
| memento-memory-mcp | Memory for coding agents — imports `CLAUDE.md`, SQLite, git sync, local UI | No | No |
| MCP Context Server | Thread-scoped storage, full-text / semantic / hybrid search, reranking | No | No |
| smart-claude-memory-mcp | Claude-oriented memory store | No | No |

The closest competitor, `@provos/memory-mcp-server`, also recalls under a token budget —
but it does not surface *what the budget saved you*. Thrift Memory's differentiator is
not "I do memory"; it is "I do memory with a **cost accounting**." The
`savedTokens = baselineTokens - injectedTokens` receipt is the thing no one else in this
category leads with.

Honest summary: if you need the smartest possible recall, use a knowledge-graph layer
like Mem0 or Zep. If your coding agents keep re-paying to reload large `MEMORY.md` /
`AGENTS.md` / project context files at every session start and you want to **measure
and cap that cost** with no extra infrastructure, that gap is what Thrift Memory fills.
The two are not mutually exclusive — Thrift Memory can sit in front of a heavier store
as the budget/metering layer.

For the full head-to-head — including how Thrift Memory differs from **Mem0**, **Zep**,
and **Graphiti** on the cost-vs-recall-quality axis — see
docs/COMPARISON.md. Common questions are answered in
docs/FAQ.md. For a narrative walkthrough of the whole memory field —
recall-quality layers vs. the cost-first MCP memory servers — read
the Mem0 vs Zep vs Graphiti blog post.

## MCP Tools```text
remember(scope, text, agentId?, sessionId?, tags?)
  Store a memory in org, agent, or session scope.

recall(agentId, tokenBudget, task?, tags?)
  Return relevant memories under a hard token budget.
  Also returns { injectedTokens, baselineTokens, savedTokens }.

search_memory(agentId, task?, tags?, limit?)
  Browse matching memories without applying a small recall budget.

See Your Own Waste (10 seconds, nothing installed)

Before adopting anything, measure what your agents already reload every session:```bash
npx -y thrift-memory audit


It scans the current repo for agent memory / instruction files — `CLAUDE.md`,
`CLAUDE.local.md`, `MEMORY.md`, `AGENTS.md`, `GEMINI.md`, `.cursorrules`,
`.cursor/rules/`, `.windsurfrules`, `.clinerules`,
`.github/copilot-instructions.md`, plus your user-global `~/.claude/CLAUDE.md` —
and prints the bill:```text
Thrift Memory audit — D:\myrepo

  File                               Tokens
  CLAUDE.md                           3,000
  .cursor/rules/api.mdc                 900
  AGENTS.md                             800
  .github/copilot-instructions.md       300
  TOTAL reloaded per session          5,000

At 10 sessions/day (--sessions): ~50,000 tokens/day, ~1,500,000/month
≈ $22.50/month at $15/M input tokens (an assumption — adjust: --price-per-mtok)

With recall capped at 2,000 tokens/session (--budget): projected saving ~60%

Every number is computed from your files with the same estimator the meter uses —
nothing is phoned home, nothing is installed. Flags: --path=, --sessions=,
--budget=, --price-per-mtok=.

Quick Start

Option A — Claude Code plugin (one command, automatic memory)

If you use Claude Code, install the whole thing — MCP server, a memory-aware
agent, and /thrift-recall / /thrift-remember commands — in one step:```text
/plugin marketplace add YohadH/thrift-memory
/plugin install thrift-memory@thrift


That registers the `thrift` MCP server automatically (via `npx thrift-memory`),
so `recall` / `remember` / `search_memory` are available with no config editing.
See `plugins/thrift-memory/` for what the plugin bundles.

**Automatic memory (plugin v0.2.0):** the plugin ships a `SessionStart` hook that runs
`thrift-memory session-context` and injects a budgeted memory slice (default
1,500 tokens) directly into context at every session **start**, **resume**,
**`/clear`**, and **post-compaction**. Your durable memories survive context
loss with zero tool calls — and each auto-injection is metered (agent
`session-start`), so the dashboard shows what the automatic path costs and
saves too. An empty store injects nothing.

### Option B — MCP config (any MCP client)```bash
npm install -g thrift-memory

Add Thrift to an MCP-capable client:```json
{
"mcpServers": {
"thrift": {
"command": "npx",
"args": ["thrift-memory"]
}
}
}


Or run the MCP server directly:```bash
npx thrift-memory \
  --store-path=~/.thrift/memories.jsonl \
  --meter-path=~/.thrift/meter.jsonl \
  --default-budget=2000

File-Backed Recall + JSONL Overlay

By default, the MCP server also scans the current working directory for existing
agent context files: MEMORY.md, AGENTS.md, CLAUDE.md, GEMINI.md,
.cursorrules, .windsurfrules, .clinerules, .cursor/rules/*.md|*.mdc,
.windsurf/rules/*.md|*.mdc, .github/copilot-instructions.md, and
agent-specific folders matching memory//*.md.

Those files are treated as read-only recall sources. remember() still writes
new durable memories to the JSONL store at --store-path, so the runtime model is:```text
MEMORY.md / AGENTS.md / rules files / memory/<agentId>/*.md + ~/.thrift/memories.jsonl
read-only sources + writable overlay


Files under `memory//*.md` are loaded as agent-scoped memories, so
`memory/takshi/crm.md` is visible to `agentId: &quot;takshi&quot;`, while
`memory/qa-manager/smoke.md` is visible to `agentId: &quot;qa-manager&quot;`. Shared
folders such as `memory/reports`, `memory/feed`, and `memory/advice` are not
treated as agent IDs.

File edits are picked up on the next recall/search. To scan a different project
root, pass `--file-root=/path/to/repo` or set `THRIFT_FILE_ROOT`. To disable
file-backed recall and use only JSONL memories, pass `--file-memory=false` or set
`THRIFT_FILE_MEMORY=0`.

## 60-Second Demo

No agent required — prove the `remember → recall → receipt` loop with the library.
Save as `demo.mjs` after `npm install thrift-memory`, then `node demo.mjs`:```js
import { JsonlStore, ScopedRetriever } from &quot;thrift-memory&quot;;

const store = new JsonlStore({ path: &quot;./demo.jsonl&quot; });
const now = Date.now();

// 1. remember — store a few org memories (cheap, no LLM enrichment)
store.add({ scope: &quot;org&quot;, text: &quot;All money values are stored as integer cents, never floats.&quot; }, now);
store.add({ scope: &quot;org&quot;, text: &quot;We deploy only on green CI; no Friday-evening releases.&quot; }, now);
store.add({ scope: &quot;org&quot;, text: &quot;Postgres is the system of record; Redis is cache-only.&quot; }, now);

// 2. recall — load only what the task needs, under a hard token budget
const r = new ScopedRetriever().recall(store, {
  agentId: &quot;dev&quot;,
  task: &quot;how should I store money values?&quot;,
  tokenBudget: 40,
});

// 3. receipt
for (const m of r.memories) console.log(&quot;•&quot;, m.text);
console.log(`injected ${r.injectedTokens} / baseline ${r.baselineTokens} (saved ${r.savedTokens})`);
``````text
• All money values are stored as integer cents, never floats.
injected 15 / baseline 43 (saved 28)

Only the relevant memory is injected — the deploy-cadence and Postgres notes are
dropped because they don't match the task, not merely because of the budget
(recall applies a relevance floor). That gap, baseline - injected, is exactly
what you stop paying for on every run. Relevance here is lexical overlap, so phrase
the task with words your memories actually use; an empty result means nothing
in scope was relevant — which is the honest answer, not noise to pad the budget.

Dashboard

The optional dashboard is local. It shows whether Thrift is really saving tokens
across real agent runs, and (as of 0.0.3) exposes a small write surface for owner
controls — pin/disable a memory, set per-agent budgets, mute an agent, and a
fleet-wide kill-switch — over local POST/DELETE endpoints. The same controls
are available from the thrift-panel CLI.```bash
npx thrift-panel serve \
--store-path=~/.thrift/memories.jsonl \
--meter-path=~/.thrift/meter.jsonl \
--control-path=~/.thrift/control.json \
--port=8585


Open `http://127.0.0.1:8585`.

The dashboard shows:

| View | What it proves |
| --- | --- |
| Fleet summary | Total baseline, injected, saved tokens, and savings rate |
| Daily token flow | Whether savings persist across real days |
| Agent savings | Which agents are expensive and which save the most |
| Recent receipts | The latest metered recall/proxy events |
| Audit paths | The local files backing the numbers |

CLI equivalents:```bash
npx thrift-panel summary --store-path=~/.thrift/memories.jsonl --meter-path=~/.thrift/meter.jsonl
npx thrift-panel agents --store-path=~/.thrift/memories.jsonl --meter-path=~/.thrift/meter.jsonl
npx thrift-panel memories --store-path=~/.thrift/memories.jsonl --scope=org

Measuring Performance

Every recall writes a receipt to THRIFT_METER_PATH when a meter path is
configured:```json
{"at":1760000000000,"agentId":"dev","injectedTokens":420,"baselineTokens":2100,"savedTokens":1680}


Definitions:

| Field | Meaning |
| --- | --- |
| `baselineTokens` | The no-Thrift counterfactual: all in-scope memory that would have been loaded |
| `injectedTokens` | The slice Thrift actually returned under budget |
| `savedTokens` | `baselineTokens - injectedTokens` |
| Savings rate | `savedTokens / baselineTokens` |

Recommended measurement loop:

1. Seed memories from your own markdown files or use `remember`.
2. Let real agents call `recall` during normal work.
3. Review `thrift-panel summary` and `thrift-panel agents`.
4. Validate quality separately by comparing task outcomes with full memory vs
   Thrift recall.

For a credible public report, publish both token reduction and quality evidence.
For example: &quot;saved 72% of memory tokens across 200 real recalls, with 19/20
paired tasks producing the same outcome.&quot;

### Safe token saver — budget-pressure signals

Cutting tokens is only safe if the agent can tell &quot;I got everything relevant&quot;
apart from &quot;I got a fraction of it.&quot; So every `recall` result also reports how
much *relevant* memory the budget forced it to leave behind:```json
{
  &quot;injectedTokens&quot;: 492,
  &quot;baselineTokens&quot;: 14000,
  &quot;savedTokens&quot;: 13508,
  &quot;relevantTokens&quot;: 2100,
  &quot;skippedForBudget&quot;: 12,
  &quot;skippedTokensForBudget&quot;: 1608,
  &quot;hasMoreRelevantMemory&quot;: true,
  &quot;budgetPressure&quot;: &quot;high&quot;
}
Field Meaning
relevantTokens Tokens of memory that cleared the relevance filter — what was worth injecting before the budget applied
skippedForBudget Count of relevant memories dropped only because they didn't fit the budget
skippedTokensForBudget relevantTokens - injectedTokens
hasMoreRelevantMemory true when relevant memory was left out for budget
budgetPressure none (everything relevant fit) · low · high (as much relevant memory skipped as injected)

These count only memory that passed the relevance filter, so hasMoreRelevantMemory
never fires on noise the recall correctly dropped. The intended loop is
progressive recall, done by the agent (not the end user): start with a small
budget, and if budgetPressure is high, do one more focused recall before
acting — never exceeding a total task budget. That is what turns Thrift from a
token saver into a safe token saver: you never silently act on a starved slice.
The bundled Claude Code plugin's memory-keeper agent and /thrift-recall command
already follow this loop.

> Account for the MCP overhead. Registering any MCP server adds its tool-schema
> load to each agent's context (often several thousand tokens). The honest figure is
> net: savings = recall reduction − MCP schema/tool-call overhead. On a
> context-heavy agent that reloads broad memory every run, recall usually wins by a
> wide margin — but confirm it with the meter on your own workload before going
> fleet-wide, rather than assuming. The receipts exist precisely so you don't have to
> guess.

Synthetic Benchmark

This repo includes a small synthetic fixture so users can verify the measurement
pipeline without any private data:```bash
npm run build
node benchmark/run.mjs


It reads:

- `benchmark/fixtures/memories.jsonl`
- `benchmark/fixtures/meter.jsonl`

See docs/case-study.md for a sanitized example of how to
interpret the numbers.

## Context Watch

The plugin&#x27;s `UserPromptSubmit` hook runs `thrift-memory context-watch` on every
prompt. It tracks context usage against the model&#x27;s window and, when usage
crosses a step boundary, injects an instruction telling the agent to save
durable facts via `remember` and suggests running `/compact` — so decisions
survive compaction instead of being silently dropped.

Step size is clamped between a floor and a ceiling so it neither fires too
often on small windows nor too rarely on huge ones:```
step = clamp(stepPct% × window, minStepTokens, maxStepPct% × window)
Flag Default Meaning
--step-pct= 20 Target step size, as a percent of the window
--min-step-tokens= 80000 Floor on step size, in tokens
--max-step-pct= 50 Ceiling on step size, as a percent of the window
--window-tokens= (auto) Override the detected model window size
--state-path= ~/.thrift/context-watch/ Where step-crossing state is persisted

The save → compact → reload loop: context-watch prompts a save before a
step boundary is crossed, PreCompact prints compaction guidance as a safety
net, and the pre-existing SessionStart hook reloads a budgeted memory slice
immediately after — closing the loop so no durable fact is lost to compaction.

Delta saves, not re-saves: each crossing now tags its guidance with a
session-specific marker, session:, so the agent isn't just told
to "save facts" blind every time. The injected instruction has the agent call
search_memory for that tag first to see what it already stored this
session, then save only genuinely new facts, tagging them the same way. That
keeps later crossings in the same session from re-remembering the same fact
over and over, and stops the agent from wrongly assuming something was
already saved.

Opt out by removing the UserPromptSubmit (and optionally PreCompact)
entries from plugins/thrift-memory/hooks/hooks.json.

Measured savings: node benchmark/context-watch.mjs shows ~72.5% fewer tokens
reloaded across simulated windows (37,744 baseline vs. 10,367 injected, saving
27,377 tokens) — see Synthetic Benchmark above for
methodology.

Verified

Unit tests. npm test — 157 tests across 12 files, including a dedicated
test/contextWatch.test.ts that covers the clamp table (1M→200k, 200k→80k,
128k→64k, 32k→16k step sizes), the step-crossing state machine (first
crossing fires, same step doesn't re-fire, the next step fires again,
per-session isolation), transcript-tail parsing (real message.usage, a
bounded tail-read for large transcripts, fallback to fileSize / 4), model →
window inference, session-ID path-traversal rejection, and malformed/missing
input. All green.

Manual hook-contract run. The built CLI (node dist/mcp/bin.js context-watch) was driven directly with hook-shaped stdin JSON against a
synthetic transcript: it fires with the exact hookSpecificOutput JSON on a
crossing, stays silent on a repeat of the same step, fires again on the next
step, and stays silent (exit 0) on garbage stdin, empty stdin, and a missing
transcript path — confirming the "never break the prompt" contract holds
under every failure mode, not just the happy path.

Real end-to-end run, against this feature's own development session.
Rather than only a synthetic fixture, context-watch was replayed against
the actual, live Claude Code transcript that was generated while building
this feature
— a genuinely long session (963 KB, 410 lines, real
claude-sonnet-5 / claude-fable-5 usage data, no window override). Four
real snapshots were cut from that transcript at increasing points in the
session's actual history and fed through the CLI in chronological order,
each as a fresh hook invocation:

Turn Real usage (tokens) % of 200k window Result
T1 31,686 ~16% silent (below the first step)
T2 94,821 ~47% fires — crosses the 40% step
T3 135,227 ~68% silent (same step as T2, no re-fire)
T4 182,661 ~91% fires — crosses the 80% step

This matches the documented "200k window → saves at ~40% and ~80%" behavior
exactly, using genuine per-turn token growth instead of hand-picked numbers.
The full 963 KB transcript (well above the 64 KB bounded tail-read threshold)
was also run standalone and returned in well under a second (~0.3–0.6s wall
time, dominated by Node process startup, not transcript parsing) — confirming
the bounded tail-read keeps the hook cheap even against a large, real,
long-running session.

Proxy And Rate Limits

The proxy is optional. Use it when an agent can point its LLM base_url at a
local HTTP gateway.

> Security — run it locally only. The proxy forwards your real provider API
> key upstream unchanged. It binds to 127.0.0.1 by default (enforced in code, not
> just docs), so it is not reachable off-host unless you deliberately opt in with
> --host=0.0.0.0 / THRIFT_PROXY_HOST. Never expose it on a public interface or
> share the port. It is a single-tenant developer tool, not a hardened multi-tenant
> gateway. Responses are also buffered, so SSE streaming is not passed through yet.```bash
npx thrift-proxy \
--upstream=https://api.anthropic.com \
--host=127.0.0.1 \
--port=8787 \
--budget=4000 \
--meter-path=~/.thrift/meter.jsonl


Then configure the agent&#x27;s LLM base URL as `http://localhost:8787` and keep using
the real provider API key.

The proxy:

- trims live request context under a hard token budget,
- writes the same savings receipts as the MCP surface,
- retries upstream `429` and `503 Retry-After` responses,
- throttles concurrent upstream requests per provider.

Rate-limit defaults:

| Setting | Default | Env var |
| --- | ---: | --- |
| Max concurrency | `5` | `THRIFT_MAX_CONCURRENCY` |
| Max retries | `5` | `THRIFT_MAX_RETRIES` |
| Backoff base | `1000ms` | `THRIFT_BACKOFF_BASE_MS` |
| Max backoff | `60000ms` | `THRIFT_MAX_BACKOFF_MS` |

`thrift-proxy` buffers responses in this version; streaming passthrough is a
future improvement.

## Import Existing Memories

The import script is generic and local-only. It can import markdown files into a
JSONL store:```bash
node scripts/import-memories.mjs \
  --source=./memory \
  --scope=org \
  --store-path=~/.thrift/memories.jsonl \
  --dry-run

For agent-scoped memories, put markdown files under project directories and use
--scope=agent:```text
memory/
checkout-service/
dev.md
qa.md
docs-site/
writer.md
``````bash
node scripts/import-memories.mjs --source=./memory --scope=agent


## Library Usage```ts
import { JsonlStore, ScopedRetriever, InMemoryMeter, ThriftMcpServer } from &quot;thrift-memory&quot;;

const server = new ThriftMcpServer({
  store: new JsonlStore({ path: &quot;./memories.jsonl&quot; }),
  retriever: new ScopedRetriever(),
  meter: new InMemoryMeter(),
  defaultTokenBudget: 2000,
});

await server.runStdio();

Development```bash

npm install
npm run typecheck
npm run build
npm test
```

Layout

Path Purpose
src/mcp/ MCP stdio server and tool definitions
src/store/ JSONL memory store
src/retrieval/ Scoped budget-bounded recall
src/meter/ Token meter and rollups
src/control/ CLI and local dashboard
src/proxy/ HTTP proxy, context trimming, rate-limit retries
benchmark/fixtures/ Synthetic public benchmark data
docs/ Public docs, screenshot, sanitized case study
test/ Unit and integration tests

License

Apache-2.0

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Thrift Memory 怎么安装?

在客户端按下面的安装命令接入:npx -y thrift-memory audit。装完在客户端配置里引用同一个包或端点。

Thrift Memory 怎么在 Claude、Cursor、VS Code 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Thrift Memory 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Thrift Memory 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

Thrift Memory 支持哪些客户端?

资料标注支持 Claude、Cursor、VS Code、Windsurf、Cline、Gemini CLI;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Thrift Memory 能提供哪些能力?

资料显示能力标签包括 开发。具体工具清单以官方文档为准。

Thrift Memory 需要什么运行环境?

属于本地进程,需要在本机装好运行环境。

Thrift Memory 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 未标注。