MemoFS MCP Server

Official registry AI and agents

Persistent memory and virtual filesystem MCP server for AI agents.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

Remote (streamable-http)
Claude Code
claude mcp add --transport http memofs-mcp-server 'https://memofs.dev/api/v1/projects/{projectId}/mcp' --header 'Authorization: <Bearer token using your MemoFS Cloud API key>'
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "memofs-mcp-server": {
            "type": "http",
            "url": "https://memofs.dev/api/v1/projects/{projectId}/mcp",
            "headers": {
                "Authorization": "<Bearer token using your MemoFS Cloud API key>"
            }
        }
    }
}
NPM package @memofs/mcp-server
Claude Code
claude mcp add memofs-mcp-server -e 'MEMOFS_API_KEY=<your memofs_api_key>' -e 'MEMOFS_RUNTIME=local' -- npx -y @memofs/mcp-server@1.3.0-beta.3
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "memofs-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@memofs/mcp-server@1.3.0-beta.3"
            ],
            "env": {
                "MEMOFS_API_KEY": "<your memofs_api_key>",
                "MEMOFS_RUNTIME": "local"
            }
        }
    }
}

Environment variables

  • MEMOFS_API_KEY secret API key for MemoFS Cloud synchronization (required for hybrid mode)
  • MEMOFS_RUNTIME Runtime mode: local or hybrid

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. MemoFS
  2. What is MemoFS?
  3. Quick Start
  4. Architecture
  5. Packages
  6. Open Source vs. MemoFS Cloud
  7. Repository Structure
  8. Workspace Commands
  9. Contributing
  10. License

MemoFS

Open-source, file-first memory runtime for AI agents.


What is MemoFS?

File-first memory runtime for AI 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
├── archive/          # Cold storage for deprecated memories
│   └── <id>.json     # Full-fidelity archived memory records
└── snapshots/
    └── snap_123.json # Versioned restore checkpoints

Quick Start

MemoFS serves two primary paths: users running AI agents day-to-day and engineers building custom agents & runtimes.

Path A: For Users of AI Agents (Cursor, Claude Code, Codex, Copilot, Cline, etc.)

Initialize MemoFS in any project in under a minute. The CLI creates .memofs/, sets up project rules, pre-wires platform lifecycle hooks, and configures the local MCP server:

npx @memofs/cli init

Your agent now automatically inherits durable memory across sessions — zero manual prompting required.

Path B: For Builders of AI Agents & Runtimes

Embed the runtime directly into your TypeScript or Node.js agent architecture:

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.


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).

Memory Intelligence
  • Project & Source Anchoring — bind memories to project files, data schemas, byte hashes, and symbol paths; query-time drift detection automatically demotes stale knowledge when assets change.
  • Agent Behavior Enforcement — deterministic push hooks across 9+ agent tools (Claude Code, Cursor, Copilot, Codex, OpenCode, Cline, etc.) inject active memory context at session start and preserve it across context compactions.
  • Causal Lineage & Action Receipts — traverse decision provenance (memofs why <id>) backed by append-only action receipts with task correlation (taskRef).
  • Ephemeral Coordination Stream — real-time cross-agent pub/sub (stream.jsonl) with typed coordination events (agent.heartbeat, resource.intent, task.status, agent.hint) filtered out of durable recall.
  • Static Memory Linter — memofs lint CI/CD rule pipeline detecting broken references, contradictory assertions, and broken provenance links.
  • Cognitive Decay & Cold Archive — kind-specific expiry thresholds transition old memories to unverified status before semantic archiving.
  • Session Outcomes & AgentFS — isolated workspace scratchpads with success / failure / aborted outcome gates governing durable memory promotion and cleanup.

Packages

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

Core Engine & Servers
PackagePurpose
@memofs/coreCore runtime, virtual AgentFS, graph engine, and hybrid recall router.
@memofs/cliCLI tool for local and cloud memory workflows (npx memofs).
@memofs/serverSelf-hostable, OSS-deployable memory server for Node and Workers.
@memofs/mcp-serverModel Context Protocol server exposing memory tools to AI agents.
@memofs/specCanonical JSON schemas, TypeScript contracts, and schema validators.
@memofs/connectorsLocal ingestion framework plugins (Notion, GitHub).
@memofs/json-rpcMessage schemas and validation for JSON-RPC 2.0.
Providers & Adapters
PackagePurpose
@memofs/adapter-ai-sdkVercel AI SDK integration, runtime bridges, and tool definitions.
@memofs/adapter-openaiOpenAI embeddings adapter.
@memofs/adapter-voyageVoyage AI embedder and reranker adapter.
@memofs/adapter-transformersONNX local embedder (Transformers.js) for zero-API-key hybrid recall.
@memofs/adapter-workers-aiCloudflare Workers AI graph extractor adapter.
@memofs/adapter-r2Cloudflare R2 Blob storage adapter.
@memofs/adapter-tursoTurso / libSQL metadata store adapter.
Development Tooling
PackagePurpose
@memofs/testingShared contract tests, mocks, fakes, and fixtures.
@memofs/benchmark-kitBenchmark 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.

FeatureOpen 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/         # React Router & Fumadocs documentation (docs.memofs.dev)
├── packages/         # 16 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 and lint checks (Biome)
pnpm check

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

# Run local documentation dev server
pnpm docs:dev

# 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.

Frequently asked questions

What is MemoFS MCP Server?

Persistent memory and virtual filesystem MCP server for AI agents.

How do I install MemoFS MCP Server?

It runs as a remote server. In Claude Code: claude mcp add --transport http memofs-mcp-server 'https://memofs.dev/api/v1/projects/{projectId}/mcp' --header 'Authorization: <Bearer token using your MemoFS Cloud API key>'. For other clients, paste the JSON configuration from this page into their MCP settings.

Does MemoFS MCP Server need an API key?

Yes. It expects MEMOFS_API_KEY, Authorization, which you set in its configuration.

Is MemoFS MCP Server open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains MemoFS MCP Server?

It is published by memo-fs. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.