Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

Memorizer v1 MCP 서버는 LLM(대규모 언어 모델)이 컨텍스트와 메모리를 재사용하고 기억할 수 있도록 돕는 컨텍스트/메모리 서버입니다[3]. 이 서버는 에이전트가 서버 전송 이벤트를 통해 통신하며, 인간 운영자는 UI를 통해 메모리를 확인하고 관리할 수 있습니다[6].

Memorizer는 Postgres와 PG vector, 그리고 임베딩 생성을 위한 작은 Llama 인스턴스에 의존하며, 이 모든 것은 Docker Compose 파일을 통해 자동으로 설정될 수 있습니다[51]. GPU 없이도 Raspberry Pi와 같은 저사양 컴퓨터에서도 실행 가능합니다

mcp.webnori.com

다음 오픈소스를 통해 이러한 컨셉을 로컬에서 수행또는 팀지식 장기메모리를 위한 용도로 구축해 활용할수 있습니다.

git :


위 오픈소스를 Pull한후 다음 명령을 수행해 로컬에 셋업

...

Code Block
themeEmacs
dotnet publish -c Release /t:PublishContainer

MCP설정 - VS CODE용

Code Block
themeEmacs
{
	"servers": {
		"microsoft.docs.mcp": {
			"type": "http",
			"url": "https://learn.microsoft.com/api/mcp"
		},
		"memorizer": {
			"type": "sse",
			"url": "http://localhost:5000/sse"
    	}
	},
	"inputs": []
}

...

  • 실시간으로 업데이트가 되지만 다양한 옵션으로 메모리(지식)를 재 업데이트 하는 기능


Graph RAG

Image Added

  • Graph Rag를 추가지원 -확장버전


테스트

팀의 장기기억메모리를 활용하는 컨셉을 알기위해 수행

...

  • 시키지도 안했는데~ 저장해준다고함 ..저장시킴
  • LLM이용하다 좋은내용이 히스토리 어딘가에 있지만 찾기가 힘듬... 장기메모리에 베스트케이스면 지속저장해 메모리를 보강 - 좋은 컨텐츠로 지식업+
  • 구축된 DB에 업데이트되어 함께이용시 팀공유된 지식으로 확장해 나갈수 있습니다.


관리툴에서 메모리 추가되었나 확인

  • LLM이용해 저장한 메모리 잘 저장되어있음

...

  • LLM이 생성한 결과를 잘 검색 ( 실시간은 아니지만 학습이 수초내 수행될것으로 예상 - 임베딩및,LLM성능)


핵심코드 살펴보기

Image Modified


MCP의 기본개념과 MCP와 MCP를 이용한 장기기억메모리 파트와 관련한 컨셉은 다음 영상및 영상분석에서 더 자세한 컨셉및 기초개념을 알수 있습니다.

...

이 샘플은 닷넷진영 AKKA.net 창시자가 액터모델을 이용한  작성되었으며 액터모델의 원조는 JVM진영 AKKA이며  이용해 작성한 오픈소스이며 자바진영 원조는 AKKA이며 AI에서 요구하는 A2A- Agent 기능이 ActorModel에 기본 탑재되어 제공하는

스케줄러,이벤트처리,상태관리,영속성을 동일하게 요구하기때문에 영속성기능을 요구하기 때문에 고급 에이전트를 구현하기위해 액터모델 장치를 이용하는것은 꽤 유용할것으로 예측해봅니다. -물론 꼭 액터모델이 아니여도 다양한 패턴으로 이러한 컨셉이 계속 등장하게 될것같습니다.

Rule for MCP

🧠 Example System Prompt for LLMs

Important

⚡ Pro Tip: Add this system prompt to your AGENT.md, Cursor Rules files, or any AI agent configuration! This will dramatically improve how often and effectively your LLM uses the Memorizer service for persistent memory management.

You have access to a long-term memory system via the Model Context Protocol (MCP) at the endpoint memorizer. Use the following tools:

  • store: Store a new memory. Parameters: type, content (markdown), source, tags, confidence, relatedTo (optional, memory ID), relationshipType (optional).
  • search: Search for similar memories. Parameters: query, limit, minSimilarity, filterTags.
  • get: Retrieve a memory by ID. Parameter: id.
  • getMany: Retrieve multiple memories by their IDs. Parameter: ids (list of IDs).
  • delete: Delete a memory by ID. Parameter: id.
  • createRelationship: Create a relationship between two memories. Parameters: fromId, toId, type.

Use these tools to remember, recall, relate, and manage information as needed to assist the user. You can also manually retrieve or relate memories by their IDs when necessary.

Expand
title프롬프트 for LLMs

🧠 LLM용 예시 시스템 프롬프트
중요

Pro Tip:
이 시스템 프롬프트를 AGENT.md, Cursor Rules 파일 또는 AI 에이전트 설정에 추가하세요.
그러면 LLM이 Memorizer 서비스를 장기 메모리 관리에 훨씬 더 자주, 효과적으로 활용하게 됩니다.


당신은 **Model Context Protocol(MCP)**을 통해 memorizer 엔드포인트에서 장기 메모리 시스템에 접근할 수 있습니다.
다음 도구들을 사용할 수 있습니다:

  • store: 새 메모리를 저장
    매개변수:

    • type

    • content (markdown)

    • source

    • tags

    • confidence

    • relatedTo (선택, 메모리 ID)

    • relationshipType (선택)

  • search: 유사한 메모리 검색
    매개변수:

    • query

    • limit

    • minSimilarity

    • filterTags

  • get: ID로 메모리 가져오기
    매개변수:

    • id

  • getMany: 여러 메모리를 ID 목록으로 가져오기
    매개변수:

    • ids (ID 리스트)

  • delete: ID로 메모리 삭제
    매개변수:

    • id

  • createRelationship: 두 메모리 간 관계 생성
    매개변수:

    • fromId

    • toId

    • type



프로젝트지침 : 사용자

Code Block
themeEmacs
MCP 기능을 참고  다음 Rule을 준수할것

Rule:

- 요청내용에 대해 메모리 먼저 검색해 활용할것, 연관자료 없을시 너의 자체 지식활용
- 메모리 저장 여부는 물어보고 저장할것 - 자동저장 금지
- 요약한후 메모리 저장이란 요청이 있을시, 메모리검색 없이 신규정보로 저장


## 📌 MCP를 통한 장기 메모리 접근
당신은 **Model Context Protocol(MCP)**을 통해 `memorizer` 엔드포인트에서 장기 메모리 시스템에 접근할 수 있습니다.  
다음 도구들을 사용할 수 있습니다:

---

### 1. **store** — 새 메모리를 저장
**매개변수:**
- `type`  
- `content` (markdown)  
- `source`  
- `tags`  
- `confidence`  
- `relatedTo` (선택, 메모리 ID)  
- `relationshipType` (선택)

---

### 2. **search** — 유사한 메모리 검색
**매개변수:**
- `query`  
- `limit`  
- `minSimilarity`  
- `filterTags`

---

### 3. **get** — ID로 메모리 가져오기
**매개변수:**
- `id`

---

### 4. **getMany** — 여러 메모리를 ID 목록으로 가져오기
**매개변수:**
- `ids` (ID 리스트)

---

### 5. **delete** — ID로 메모리 삭제
**매개변수:**
- `id`

---

### 6. **createRelationship** — 두 메모리 간 관계 생성
**매개변수:**
- `fromId`  
- `toId`  
- `type`



MCP Nginx PROXY를 위한추가팁

Code Block
themeEmacs
# location 컨텍스트에서 유효
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# SSE는 스트림을 즉시 흘려보내야 함
proxy_buffering off;
proxy_request_buffering off;
proxy_cache off;

# 압축/청크가 스트림을 묶지 않도록
gzip off;
proxy_set_header Accept-Encoding "";

# 커넥션/타임아웃
proxy_http_version 1.1;
proxy_read_timeout 1h;
proxy_send_timeout 1h;

# Nginx가 헤더를 재작성하지 않도록(일부 환경에서 유용)
proxy_set_header Connection "";
  • SSE를 SSL Proxy시 모드로 작동시 참고 - http 1.1버전