Project Memory MCP Server

Project Memory MCP Server

Provides persistent, searchable memory for MCP-compatible AI coding tools, allowing notes added from one tool to be retrieved from another.

Category
访问服务器

README

Project Memory MCP Server

One small local server that gives any MCP-compatible AI coding tool the same persistent, searchable memory. Add a note once — from any tool, or by hand — and retrieve it from whichever tool you're in that day.

Why this works across tools

Antigravity and OpenCode are different products, but both speak MCP (Model Context Protocol) and both let you register a local server by giving them a command to launch it. Neither cares what's inside that server — it's just a subprocess they talk to over stdio. So instead of building "a memory feature for Antigravity" and "a memory feature for OpenCode," you build one server once, and register the same server.py in both tools' configs. Add Claude Code, Cursor, or anything else MCP-based later the same way, no extra work.

What's in this folder

File Purpose
memory_store.py Local vector store (ChromaDB, on-disk at ./chroma_db/) — add/search/list/delete
server.py MCP server exposing that store as 4 tools, over stdio
ingest.py Bulk-loads .md/.txt files from ./memory/ into the store
memory/example-notes.md Demo notes — replace with your own

No external database, no account, no API key required for the default setup.

Setup

cd rag-memory-mcp
python3 -m venv venv
./venv/bin/pip install -r requirements.txt

The first time anything calls add_memory or search_memory, ChromaDB downloads a small local embedding model (~80MB, one-time). After that it runs fully offline — no per-query API calls, no per-query cost.

Seed it:

./venv/bin/python ingest.py

Get the absolute path to this folder (you'll need it for both configs below):

pwd

Wire it into Antigravity

Antigravity, its CLI, and its IDE share one MCP config file: ~/.gemini/config/mcp_config.json. You can also open it from inside the IDE: Settings → Customizations → Manage MCP Servers → View raw config. Add:

{
  "mcpServers": {
    "project-memory": {
      "command": "/absolute/path/to/rag-memory-mcp/venv/bin/python3",
      "args": ["/absolute/path/to/rag-memory-mcp/server.py"]
    }
  }
}

Then in Antigravity, refresh the MCP servers list (Manage MCP Servers → Refresh). project-memory's 4 tools show up alongside your others.

Wire it into OpenCode

Add to opencode.json — either globally at ~/.config/opencode/opencode.json, or per-project at opencode.json in a specific project's root if you only want it there:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "project-memory": {
      "type": "local",
      "command": [
        "/absolute/path/to/rag-memory-mcp/venv/bin/python3",
        "/absolute/path/to/rag-memory-mcp/server.py"
      ],
      "enabled": true
    }
  }
}

Restart OpenCode, or confirm it picked it up with opencode mcp list.

Using it day to day

Adding memories, two ways:

  1. Write markdown in memory/ (one idea per paragraph — each becomes its own retrievable chunk), then re-run ingest.py. Add --wipe to rebuild from scratch instead of appending on top of what's there.
  2. Just tell whichever agent you're talking to "remember that ___" — it calls add_memory directly, no ingest step needed.

Getting memories back: ask directly ("check memory for how I handled the Realtime bug before"), or make it automatic by adding a line to each tool's instructions (Antigravity: a rule/skill file; OpenCode: AGENTS.md or the instructions config key):

Before starting a nontrivial task, call search_memory with a short description of the task. When you learn something worth keeping — a decision, a root cause, a convention — call add_memory.

Testing it without any IDE

npx @modelcontextprotocol/inspector ./venv/bin/python3 server.py

Opens a browser UI where you can call each tool by hand and see raw results. Useful to confirm the server itself is healthy before debugging a specific tool's config. (Keep the Inspector on localhost only — don't expose its ports on a shared network.)

If you want memory synced across machines, not just local-only

Swap the ChromaDB calls in memory_store.py for Supabase + pgvector — same 4 function signatures (add_memory, search_memory, recent_memories, delete_memory), backed by a memories table with a vector column instead of ./chroma_db/. Since you're already running Supabase for Foster, this is mostly copy-pasting patterns you already have, and it means the same memory is reachable from any machine, not just the one where chroma_db/ lives.

推荐服务器

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

官方
精选