Memory MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Memory MCPremember that my favorite color is blue"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Memory MCP (local-first)
Yêu cầu
Node.js >= 20
Docker + Docker Compose
Related MCP server: server-memory
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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tungvt93/Memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server