@memofs/mcp-server

@memofs/mcp-server

@memofs/mcp-server lets AI coding agents (Claude Code, Claude Desktop, Codex, Cursor, opencode, Gemini CLI, GitHub Copilot, Zed, and any other MCP client) securely read and write MemoFS memory through standard Model Context Protocol tools.

Category
访问服务器

README

<div align="center">

<img src="./assets/images/logo.svg" alt="MemoFS Logo" width="120" />

MemoFS

Open-source, file-first memory for AI applications and agents.

</div>

<p align="center"> <a href="https://www.npmjs.com/package/@memofs/core"><img src="https://img.shields.io/npm/v/%40memofs%2Fcore?label=%40memofs%2Fcore&style=for-the-badge" alt="npm version" /></a>   <a href="https://github.com/memo-fs/memofs"><img src="https://img.shields.io/badge/status-beta-blue?style=for-the-badge" alt="Project status: Beta" /></a>   <a href="https://github.com/memo-fs/memofs/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/memo-fs/memofs/ci.yml?branch=main&style=for-the-badge&label=CI" alt="CI status" /></a>   <a href="https://docs.memofs.dev/"><img src="https://img.shields.io/badge/docs-online-blue?style=for-the-badge" alt="Docs" /></a>   <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge" alt="MIT License" /></a> </p>


What is MemoFS?

File-first memory for AI applications and agents. Store, recall, and synchronize memory using plain files on disk — local-first by default, with optional cloud sync.

Most AI memory systems are database-first, vendor-locked, hard to inspect, and hard to version. MemoFS inverts that: your agent's memory lives as Markdown and JSONL under a .memofs/ directory you can cat, git diff, and roll back.

.memofs/
├── config.json       # Workspace settings and engine routing
├── manifest.json     # Asset registry tracking and hashes
├── memory/
│   ├── core.md       # Durable, project-wide facts (Markdown)
│   └── notes.md      # Timestamped notes and logs (Markdown)
├── events/
│   └── conversations.jsonl # Chronological interactions for recall
├── graph/
│   ├── nodes.jsonl   # Entities extracted from memory
│   └── edges.jsonl   # Relational connections
└── snapshots/
    └── snap_123.json # Versioned restore checkpoints

Quick Start

Reach first success in under a minute. No API keys, no database setup, no cloud required.

npm install @memofs/core
import { MemoFS } from "@memofs/core";
import { createNodeFsMemoryStore } from "@memofs/core/node-fs";

// Initialize a Node.js filesystem-backed memory store
const store = createNodeFsMemoryStore({
  rootDir: ".",
});

// Create the unified client
const memo = new MemoFS({
  store,
  projectId: "my-app",
  mode: "local",
});

// Read project-wide core memory (core.md)
const core = await memo.core.read();
console.log(core);

// Record a durable note (notes.md)
await memo.notes.record({
  content: "User prefers TypeScript with ESM modules.",
  kind: "preference",
});

// Recall works offline (lexical BM25 + fuzzy matching) with zero config
const hits = await memo.recall("TypeScript configuration");

To upgrade to semantic/vector search, plug in an embedder adapter like OpenAI (@memofs/adapter-openai) or Voyage AI (@memofs/adapter-voyage). For zero-API-key local vector search, enable the ONNX embedder (@memofs/adapter-transformers) to run embeddings completely in-process.

To connect your coding agent (Cursor, Claude Code, etc.), use the stdio-compatible @memofs/mcp-server.


Architecture

Your App / Agent / MCP client
        │
        ▼
    MemoFS   (local-first runtime)
      ├─ .read() / .write() / .recall()
      ├─ .snapshot.create() / .restore()
      ├─ AgentFS  (lease-locking & virtual paths)
      └─ .sync *  (Cloud sync pushes and pulls)

   read() / write() / recall() — core client methods
        │
        ▼
   .memofs/   (plain files on disk)
     ├─ memory/core.md      ├─ memory/notes.md
     ├─ events/*.jsonl      ├─ graph/{nodes,edges}.jsonl
     └─ snapshots/  manifest.json
        │   git-friendly, inspectable, versionable
        ▼   (optional)
   MemoFS Cloud

The runtime resolves configuration from constructor options → env vars → .memofs/config.json. Three runtime modes are supported: local (filesystem-only, default), hybrid (local + cloud sync with read/write policies), and memory (in-memory volatile, ideal for tests).


Packages

MemoFS is structured as a monorepo containing 15 published public packages under the @memofs/ scope. The CLI ships as @memofs/cli and installs the memofs command.

Core Engine & Servers

Package Purpose
@memofs/core Core runtime, virtual AgentFS, graph engine, and hybrid recall router.
@memofs/cli CLI tool for local and cloud memory workflows (npx memofs).
@memofs/server Self-hostable, OSS-deployable memory server for Node and Workers.
@memofs/mcp-server Model Context Protocol server exposing memory tools to AI agents.
@memofs/connectors Local ingestion framework plugins (Notion, GitHub).
@memofs/json-rpc Message schemas and validation for JSON-RPC 2.0.

Providers & Adapters

Package Purpose
@memofs/adapter-ai-sdk Vercel AI SDK integration, runtime bridges, and tool definitions.
@memofs/adapter-openai OpenAI embeddings adapter.
@memofs/adapter-voyage Voyage AI embedder and reranker adapter.
@memofs/adapter-transformers ONNX local embedder (Transformers.js) for zero-API-key hybrid recall.
@memofs/adapter-workers-ai Cloudflare Workers AI graph extractor adapter.
@memofs/adapter-r2 Cloudflare R2 Blob storage adapter.
@memofs/adapter-turso Turso / libSQL metadata store adapter.

Development Tooling

Package Purpose
@memofs/testing Shared contract tests, mocks, fakes, and fixtures.
@memofs/benchmark-kit Benchmark workloads and runners.

Open Source vs. MemoFS Cloud

The core runtime is open source (MIT) and fully functional locally. You do not need a cloud account to run MemoFS.

MemoFS Cloud is the memory plane for your agents: it keeps every machine, teammate, and agent on the same memory, and gives you a dashboard to see and govern it.

Feature Open source (this repo) MemoFS Cloud
Local file-first memory ✅ ✅
CLI + stdio MCP server ✅ ✅
All adapters (OpenAI, Voyage, etc.) ✅ ✅
Hosted sync (keep memory in sync) ✅ client ✅ hosted
Team workspaces & access control — ✅ available
Memory dashboard (explore, consolidate) — ✅ available
Hosted managed MCP endpoint — ✅ available (Pro+)
Managed runtime (memory API over HTTPS) — Soon

Join the Cloud waitlist →


Repository Structure

memofs/
├── apps/
│   └── docs/         # VitePress documentation (docs.memofs.dev)
├── packages/         # 15 published @memofs/* packages
├── tooling/          # Private @repo/* workspace build packages
├── benchmarks/       # Workspace benchmarking suite
├── examples/         # Runnable examples
└── package.json

Workspace Commands

Run these command tasks from the repository root:

# Install all dependencies
pnpm install

# Build all packages and applications
pnpm build

# Run TypeScript compilation checks
pnpm typecheck

# Run unit tests across all packages
pnpm test

# Run code style checks (Biome)
pnpm format-and-lint

# Fix linting and formatting issues automatically
pnpm format-and-lint:fix

# Build documentation locally
pnpm docs:build

Contributing

See CONTRIBUTING.md for details on formatting, testing, and pull requests. For roadmap targets, see ROADMAP.md.

For security reports, refer to SECURITY.md — do not open public issues for security vulnerabilities.


License

MIT. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选