VecFS

VecFS

VecFS is a lightweight, local-first vector storage specification and implementation for AI agent long-term memory. It provides an MCP server enabling agents to search, memorize, and manage context.

Category
访问服务器

README

VecFS

VecFS (Vector File System) is a lightweight, local-first vector storage specification and implementation designed for AI agent long-term memory.

Copyright

(c) Copyright 2026 Warwick Molloy. Contribution to this project is supported and contributors will be recognised. Created by Warwick Molloy Feb 2026.

Overview

VecFS gives AI agents a simple, efficient way to store and retrieve context locally. Through the Model Context Protocol (MCP), agents can learn from their interactions and recall relevant information in future sessions without the complexity of a full-scale vector database.

Key Features

  • Sparse Vector Storage: Follows the principle of "not storing zeros" for natural data compression and minimal disk footprint.
  • Local-First: Designed to run on a laptop (WSL2, Linux, macOS) with simple file-based storage.
  • MCP Integration: Acts as an MCP server, providing tools for agents to search, memorize, feedback, and delete context.
  • Agent Skill: Ships with a portable Agent Skill definition that teaches agents how to use long-term memory effectively.
  • Embedding Script: Includes a model-agnostic Python tool for converting text to sparse vectors.

Quick Start

Install from GitHub (no npm or pip)

Clone the repo and run the installer. You only need Node.js and Python runtimes.

git clone https://github.com/WazzaMo/vecfs.git
cd vecfs
./install-from-github.sh

This installs into ~/.local by default. Add ~/.local/bin to your PATH if needed. For the embedding script, install Python dependencies once: pip install ~/.local/lib/vecfs/embed (or use ./install-from-github.sh --install-python-deps).

Options: --server (MCP server only), --embed (embedding script only), --prefix DIR, --install-python-deps, --help.

Install the MCP Server (npm)

npm install -g vecfs

Or run directly without installing:

npx vecfs

Agent Configuration

Add VecFS to your agent's MCP configuration (Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "vecfs": {
      "command": "npx",
      "args": ["-y", "vecfs"],
      "env": {
        "VECFS_FILE": "/path/to/memory.jsonl"
      }
    }
  }
}

If you installed from GitHub with install-from-github.sh, use the full path to the binary, e.g. "command": "/home/you/.local/bin/vecfs" (and omit args), or ensure ~/.local/bin is on the PATH used by your agent.

Install the Embedding Script (pip/uv)

The embedding script converts text to sparse vectors for the MCP server.

pip install vecfs-embed

Or using uv:

uv tool install vecfs-embed

If you used the GitHub installer above, install deps from the installed copy: pip install ~/.local/lib/vecfs/embed.

Usage

# Embed a query for searching
vecfs-embed --mode query "sparse vector storage"

# Embed a document for memorisation
vecfs-embed --mode document "key lesson to remember"

# Batch embed multiple texts
cat texts.txt | vecfs-embed --batch --mode document

# Find the right sparsification threshold for your model
cat sample.txt | vecfs-embed --calibrate

Transport Modes

Stdio (Default)

vecfs

Used with CLI-based agents like Claude Desktop and Cursor. Simple, secure, no network ports exposed.

HTTP / SSE

vecfs --http
# Or with custom port
PORT=8080 vecfs --http

Used for remote agents, debugging, or containerised deployments. Endpoints: GET /sse and POST /messages.

Configuration

Environment Variable Description Default
VECFS_FILE Path to the vector storage file ./vecfs-data.jsonl
PORT Port for HTTP mode 3000

Agent Skill

VecFS ships with a vecfs-memory skill in the Agent Skills format. The skill directory is bundled in the npm package at vecfs-memory/ and teaches agents:

  • Context Sweep: Proactively search for relevant history at the start of a task.
  • Reflective Learning: Memorise key lessons after completing work.
  • Feedback Loop: Reinforce useful memories and demote unhelpful ones.

See vecfs-memory/SKILL.md for the full skill definition.

Development

Prerequisites

  • Node.js 22+ (see .node-version)
  • Python 3.10+ and uv (for the embedding script)

Building from Source

# MCP server
npm install
npm run build

# Embedding script
cd py-src
uv sync

Packaging for Distribution

To create a self-contained distributable archive containing the MCP server, the embedding script wheel, the agent skill, and an installer:

./scripts/package.sh

This runs all build steps, executes the test suites, and produces a minimal vecfs-<version>.tar.gz (~400 KB). The tarball contains no source code, no node_modules, and no dev tooling — just pre-built artefacts ready to install.

To install from the archive:

tar xzf vecfs-0.1.0.tar.gz
cd vecfs-0.1.0
./install.sh            # installs both MCP server and embedding script
./install.sh --server   # MCP server only
./install.sh --embed    # embedding script only

Running Tests

# All TypeScript tests (unit + stdio integration)
npm test

# Stdio MCP server integration tests only
npm run test:integration

# HTTP/SSE MCP server integration tests (builds first)
npm run test:http

# Python unit tests (sparsify module, no model needed)
cd py-src
uv run pytest tests/test_sparsify.py -v

# Python embedding integration tests (uses docs/ as input, loads model)
cd py-src
uv run pytest tests/test_integration.py -v

Local Agent installs

Running VecFS in Cursor

Use the package script to bundle up VecFS and use it to install the MCP server and vecfs-embed program globally.

In your local project where you want persistent memory add:

mkdir -p .cursor

create .cursor/mcp.json and give it this text.

{
  "mcpServers": {
    "vecfs": {
      "command": "npx",
      "args": ["vecfs"],
      "env": {
        "VECFS_FILE": "./vecfs-memory.jsonl",
        "PORT": "3000"
      }
    }
  }
} 

Documentation

  • Goals - The vision and core principles of VecFS.
  • Requirements - Technical requirements for the MCP server and storage layer.
  • Agent Skills - Behavioral logic for AI agents.
  • Server Connections - Transport configuration guide.
  • Doc Guide - Guidelines for contributing to documentation.

License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选