mcp-memory-server
MCP Memory Server
Blockbrain(또는 모든 MCP 클라이언트)을 위한 영구 에이전트 메모리 — Markdown 파일 + SQLite FTS5 전문 검색 기반.
왜 필요한가?
Blockbrain 에이전트는 세션 간 메모리를 유지하지 않습니다. 모든 대화는 빈 상태에서 시작됩니다. 이 MCP 서버가 그 문제를 해결합니다 — 에이전트가 학습한 내용을 저장하고 다음에 다시 불러올 수 있습니다.
작동 방식:
에이전트가 문제를 해결 →
memory_save를 호출하여 해결책 저장에이전트가 새 작업을 시작 →
memory_recall을 호출하여 유사한 과거 문제 확인모든 메모리는 읽기 가능한 Markdown 파일로 저장 + 빠른 검색을 위해 SQLite에 인덱싱
Related MCP server: universal-memory-mcp
도구
도구 | 설명 |
| 메모리 항목 저장 (주제, 제목, 내용) |
| 키워드/주제로 메모리 검색 (FTS5) |
| 저장된 모든 주제와 항목 수 나열 |
| ID로 메모리 항목 삭제 |
빠른 시작 (Docker)
# 1. Clone
git clone https://github.com/lanlibbi/mcp-memory-server.git
cd mcp-memory-server
# 2. Configure
cp .env.example .env
# Edit .env — set MEMORY_API_KEY!
# Generate a key: openssl rand -hex 32
# 3. Run
docker compose up -d
# 4. Verify
curl http://localhost:8080/healthBlockbrain 연동
서버를 공개적으로 노출 — Blockbrain에는 HTTPS URL이 필요합니다:
옵션 A: Cloudflare Tunnel (
cloudflared tunnel --url http://localhost:8080)옵션 B: TLS가 있는 모든 리버스 프록시 (nginx, Caddy, Traefik)
옵션 C: 테스트용 ngrok (
ngrok http 8080)
Blockbrain에 등록:
Admin → Agents → MCP Servers로 이동
"+ Add MCP Server" 클릭
다음을 입력:
이름: Memory Server
서버 URL:
https://<your-public-url>/sse전송 방식: SSE
인증: API Key
API Key: (.env의 값)
저장 및 활성화
에이전트에 할당하고 에이전트의 시스템 프롬프트에 지침 추가:
Before starting a new task, call memory_recall with keywords related to the task. After completing a task or learning something new, call memory_save with: - topic: a category for the task (e.g. "contract-review", "supplier-issue") - title: a short descriptive title - content: what was the problem, what was the solution, what was learned
구성
모든 구성은 환경 변수를 통해 설정:
변수 | 기본값 | 설명 |
| (비어 있음 = 인증 없음) | X-API-Key 헤더용 API 키 |
|
| Markdown 파일 저장 위치 |
|
| HTTP 포트 |
|
| 쿼리당 최대 검색 결과 수 |
|
| debug, info, warning, error |
저장소
메모리는 YAML frontmatter가 있는 Markdown 파일로 저장됩니다:
/data/memories/
├── contract-review/
│ ├── nda-standard-clauses.md
│ └── liability-clause-fix.md
├── supplier-issue/
│ └── delayed-delivery-workaround.md
└── memory.db ← SQLite FTS5 index각 파일은 다음과 같습니다:
---
id: a1b2c3d4e5f67890
topic: contract-review
title: NDA Standard Clauses
created_at: 2026-08-20T15:00:00Z
updated_at: 2026-08-20T15:00:00Z
---
# NDA Standard Clauses
The standard NDA should always include...메모리를 직접 탐색, 편집, 삭제할 수 있습니다 — 그냥 Markdown 파일일 뿐입니다. SQLite 인덱스는 자동으로 동기화됩니다.
로컬 개발 (Docker 없이)
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
export MEMORY_API_KEY=test-key
export MEMORY_DATA_DIR=./data/memories
python -m uvicorn src.server:app --host 0.0.0.0 --port 8080API 엔드포인트
엔드포인트 | 메서드 | 설명 |
| GET | 상태 확인 (인증 불필요) |
| GET | MCP 클라이언트 연결용 SSE 엔드포인트 |
| POST | MCP 메시지 엔드포인트 (SSE 전송에 사용) |
기술 스택
Python 3.12 + MCP SDK
Starlette + Uvicorn (HTTP/SSE용)
SQLite FTS5 전문 검색 (외부 의존성 없음)
Markdown 사람이 읽을 수 있는 저장 형식
라이선스
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP memory for coding agents: persistent across sessions, editable markdown, team sharing.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
One memory, every AI. A shared, user-owned markdown memory your AI clients read and write over MCP.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server providing persistent memory management for AI agents using SQLite and FTS5, enabling storage, full-text search, and recall of memories with namespace isolation.1MIT
- AlicenseAqualityCmaintenancePersistent memory MCP server for AI agents, using SQLite with hybrid keyword and semantic search for long-term memory storage.5Do What The F*ck You Want To Public
- AlicenseNot gradedqualityDmaintenancePersistent memory MCP server that stores and retrieves memories in Markdown files, enabling shared context across multiple AI agents with hybrid search and deduplication.MIT
- AlicenseAqualityBmaintenanceMCP server for persistent, cross-session, local-first memory for AI agents, storing memories as Markdown files with SQLite indexing for hybrid search.24Apache 2.0