Memory MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Memory MCP (local-first)
Yêu cầu
Node.js >= 20
Docker + Docker Compose
Related MCP server: Engram
Docker (phiên bản image)
Postgres:
postgres:16-alpineQdrant:
qdrant/qdrant:v1.9.3
Checklist khởi động
docker compose up -dnpm installCopy
.env.example→.env(Postgres host mặc định127.0.0.1:55432)npm run db:migratenpm run qdrant:bootstrapnpm run devhoặcnpm run build && npm start
Scripts
Script | Mô tả |
| MCP server (tsx watch, stdio) |
|
|
|
|
| Vitest: unit + integration (xem bên dưới) |
| Chạy migration Postgres theo thứ tự ( |
| Tạo collection Qdrant nếu chưa có |
ENV
Copy .env.example thành .env.
Biến | Ý nghĩa |
| Kết nối Postgres ( |
| REST API Qdrant (mặc định |
| Tên collection điểm vector |
| Phase 0–1: |
| Chiều vector (mặc định |
| Mức log pino |
| Actor mặc định cho audit (optional) |
MCP tools (stdio)
Server giao tiếp JSON-RPC qua stdout. Log (pino) trên stderr — không redirect stderr nếu cần xem log.
Tool | Vai trò ngắn |
| Lưu memory có scope + metadata; dedupe; index Qdrant best-effort |
| Truy vấn (vector + metadata), fallback metadata khi lỗi phụ thuộc |
| Gói context (semantic / procedural / episodic) + trường mở rộng cố định |
| Soft transition ( |
| Phase 2: cập nhật có optimistic locking ( |
| Phase 2: ghi fact (subject / predicate / object) gắn với |
recall / fallback metadata lọc memory đã hết hạn (expires_at); có thể bổ sung cảnh báo CONFLICTING_FACTS khi hai fact trong workspace mâu thuẫn (cùng subject+predicate, khác object).
Payload chi tiết theo Zod trong src/contracts/tools/*.ts.
Ví dụ cấu hình Cursor
Thêm MCP server trỏ tới entrypoint đã build (hoặc tsx):
{
"mcpServers": {
"memory-mcp": {
"command": "node",
"args": ["/absolute/path/to/Memory-mcp/dist/index.js"],
"env": {
"PGHOST": "127.0.0.1",
"PGPORT": "55432",
"PGUSER": "memory",
"PGPASSWORD": "memory",
"PGDATABASE": "memory_mcp",
"QDRANT_URL": "http://127.0.0.1:6333",
"QDRANT_COLLECTION": "memories",
"EMBEDDING_PROVIDER": "hash",
"EMBEDDING_DIMENSION": "384"
}
}
}
}Đường dẫn và env chỉnh theo máy bạn.
Chế độ suy giảm (recall / context pack)
Khi embedding hoặc Qdrant lỗi, recall vẫn trả ok: true với retrieval chỉ từ Postgres (metadata / keyword nhẹ), kèm warnings:
Mã | Khi nào |
|
|
|
|
| Đang dùng fallback metadata |
Lỗi business (input sai, scope, không tìm thấy, v.v.) trả ok: false + error.code từ INVALID_INPUT, SCOPE_VIOLATION, NOT_FOUND, DEPENDENCY_UNAVAILABLE, …
Tests
npm testUnit: không cần Docker.
Integration (
src/testing/integration/memoryMcp.int.test.ts): cần Postgres (và Qdrant cho luồng vector thật trong vài case). Nếu không kết nối được DB trong ~8s, các case đó bỏ qua (log cảnh báo), suite vẫn PASS.Tắt hẳn integration:
SKIP_INTEGRATION=1 npm test.
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent, portable memory for AI assistants — your private memory graph, from any MCP client.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
An MCP memory server. One memory your agents share — across models, devices and apps.
Related MCP Servers
- AlicenseAqualityCmaintenanceA local, fully-offline MCP memory server that enables persistent storage and retrieval of information using SQLite with both keyword and semantic vector search capabilities.1034 npm13MIT
- AlicenseNot gradedqualityDmaintenanceA local-first memory MCP server that enables storing, searching, and managing personal memories with hybrid keyword and semantic recall, all on-device.67 npmMIT
- AlicenseNot gradedqualityCmaintenanceA local-first compiled knowledge graph MCP server that provides structured memory for AI agents with full-text search, vector embeddings, and timeline tracking.639 npm8MIT
- AlicenseNot gradedqualityCmaintenanceA local-first, team-ready MCP server providing durable memory for LLM-based coding workflows with multiple storage backends and fast search.4MIT