VOOZH about

URL: https://glama.ai/mcp/servers/modelcontextprotocol/knowledge-graph-memory-server?locale=ko-KR

⇱ 지식 그래프 메모리 서버 by modelcontextprotocol | Glama


지식 그래프 메모리 서버

로컬 지식 그래프를 사용하는 영구 메모리의 기본 구현입니다. 이를 통해 Claude는 채팅 전반에 걸쳐 사용자에 대한 정보를 기억할 수 있습니다.

핵심 개념

엔티티(Entities)

엔티티는 지식 그래프의 기본 노드입니다. 각 엔티티는 다음을 가집니다:

  • 고유 이름(식별자)

  • 엔티티 유형(예: "사람", "조직", "이벤트")

  • 관찰 목록

예시:

{
 "name": "John_Smith",
 "entityType": "person",
 "observations": ["Speaks fluent Spanish"]
}

관계(Relations)

관계는 엔티티 간의 방향성 연결을 정의합니다. 관계는 항상 능동태로 저장되며 엔티티가 서로 어떻게 상호 작용하거나 관련되는지 설명합니다.

예시:

{
 "from": "John_Smith",
 "to": "Anthropic",
 "relationType": "works_at"
}

관찰(Observations)

관찰은 엔티티에 대한 개별적인 정보 조각입니다. 관찰의 특징은 다음과 같습니다:

  • 문자열로 저장됨

  • 특정 엔티티에 연결됨

  • 독립적으로 추가하거나 제거할 수 있음

  • 원자적이어야 함(관찰 하나당 사실 하나)

예시:

{
 "entityName": "John_Smith",
 "observations": [
 "Speaks fluent Spanish",
 "Graduated in 2019",
 "Prefers morning meetings"
 ]
}

Related MCP server: Knowledge Graph Memory Server

API

도구(Tools)

  • create_entities

    • 지식 그래프에 여러 개의 새 엔티티 생성

    • 입력: entities (객체 배열)

      • 각 객체 포함 항목:

        • name (문자열): 엔티티 식별자

        • entityType (문자열): 유형 분류

        • observations (문자열[]): 연결된 관찰

    • 기존 이름이 있는 엔티티는 무시함

  • create_relations

    • 엔티티 간에 여러 개의 새 관계 생성

    • 입력: relations (객체 배열)

      • 각 객체 포함 항목:

        • from (문자열): 소스 엔티티 이름

        • to (문자열): 대상 엔티티 이름

        • relationType (문자열): 능동태로 된 관계 유형

    • 중복 관계는 건너뜀

  • add_observations

    • 기존 엔티티에 새 관찰 추가

    • 입력: observations (객체 배열)

      • 각 객체 포함 항목:

        • entityName (문자열): 대상 엔티티

        • contents (문자열[]): 추가할 새 관찰

    • 엔티티별로 추가된 관찰을 반환함

    • 엔티티가 존재하지 않으면 실패함

  • delete_entities

    • 엔티티 및 해당 관계 제거

    • 입력: entityNames (문자열[])

    • 연결된 관계의 계단식 삭제

    • 엔티티가 존재하지 않으면 조용히 처리됨

  • delete_observations

    • 엔티티에서 특정 관찰 제거

    • 입력: deletions (객체 배열)

      • 각 객체 포함 항목:

        • entityName (문자열): 대상 엔티티

        • observations (문자열[]): 제거할 관찰

    • 관찰이 존재하지 않으면 조용히 처리됨

  • delete_relations

    • 그래프에서 특정 관계 제거

    • 입력: relations (객체 배열)

      • 각 객체 포함 항목:

        • from (문자열): 소스 엔티티 이름

        • to (문자열): 대상 엔티티 이름

        • relationType (문자열): 관계 유형

    • 관계가 존재하지 않으면 조용히 처리됨

  • read_graph

    • 전체 지식 그래프 읽기

    • 입력 필요 없음

    • 모든 엔티티와 관계가 포함된 전체 그래프 구조 반환

  • search_nodes

    • 쿼리를 기반으로 노드 검색

    • 입력: query (문자열)

    • 검색 범위:

      • 엔티티 이름

      • 엔티티 유형

      • 관찰 내용

    • 일치하는 엔티티와 해당 관계 반환

  • open_nodes

    • 이름으로 특정 노드 검색

    • 입력: names (문자열[])

    • 반환:

      • 요청된 엔티티

      • 요청된 엔티티 간의 관계

    • 존재하지 않는 노드는 조용히 건너뜀

Claude Desktop에서 사용하기

설정

claude_desktop_config.json에 다음을 추가하세요:

Docker

{
 "mcpServers": {
 "memory": {
 "command": "docker",
 "args": ["run", "-i", "-v", "claude-memory:/app/dist", "--rm", "mcp/memory"]
 }
 }
}

NPX

{
 "mcpServers": {
 "memory": {
 "command": "npx",
 "args": [
 "-y",
 "@modelcontextprotocol/server-memory"
 ]
 }
 }
}

Windows에서는 cmd /c를 사용하여 npx를 실행하세요:

{
 "mcpServers": {
 "memory": {
 "command": "cmd",
 "args": [
 "/c",
 "npx",
 "-y",
 "@modelcontextprotocol/server-memory"
 ]
 }
 }
}

사용자 지정 설정이 포함된 NPX

서버는 다음 환경 변수를 사용하여 구성할 수 있습니다:

{
 "mcpServers": {
 "memory": {
 "command": "npx",
 "args": [
 "-y",
 "@modelcontextprotocol/server-memory"
 ],
 "env": {
 "MEMORY_FILE_PATH": "/path/to/custom/memory.jsonl"
 }
 }
 }
}

Windows에서는 다음을 사용하세요:

{
 "mcpServers": {
 "memory": {
 "command": "cmd",
 "args": [
 "/c",
 "npx",
 "-y",
 "@modelcontextprotocol/server-memory"
 ],
 "env": {
 "MEMORY_FILE_PATH": "/path/to/custom/memory.jsonl"
 }
 }
 }
}
  • MEMORY_FILE_PATH: 메모리 저장 JSONL 파일 경로 (기본값: 서버 디렉토리의 memory.jsonl)

VS Code 설치 지침

빠른 설치를 위해 아래의 원클릭 설치 버튼 중 하나를 사용하세요:

👁 Install with NPX in VS Code
👁 Install with NPX in VS Code Insiders

👁 Install with Docker in VS Code
👁 Install with Docker in VS Code Insiders

수동 설치의 경우, 다음 방법 중 하나를 사용하여 MCP 서버를 구성할 수 있습니다:

방법 1: 사용자 구성(권장) 사용자 수준 MCP 구성 파일에 구성을 추가합니다. 명령 팔레트(Ctrl + Shift + P)를 열고 MCP: Open User Configuration을 실행합니다. 그러면 서버 구성을 추가할 수 있는 사용자 mcp.json 파일이 열립니다.

방법 2: 작업 영역 구성 또는 작업 영역의 .vscode/mcp.json이라는 파일에 구성을 추가할 수 있습니다. 이렇게 하면 다른 사람들과 구성을 공유할 수 있습니다.

VS Code의 MCP 구성에 대한 자세한 내용은 공식 VS Code MCP 문서를 참조하세요.

NPX

{
 "servers": {
 "memory": {
 "command": "npx",
 "args": [
 "-y",
 "@modelcontextprotocol/server-memory"
 ]
 }
 }
}

Windows에서는 다음을 사용하세요:

{
 "servers": {
 "memory": {
 "command": "cmd",
 "args": [
 "/c",
 "npx",
 "-y",
 "@modelcontextprotocol/server-memory"
 ]
 }
 }
}

Docker

{
 "servers": {
 "memory": {
 "command": "docker",
 "args": [
 "run",
 "-i",
 "-v",
 "claude-memory:/app/dist",
 "--rm",
 "mcp/memory"
 ]
 }
 }
}

시스템 프롬프트

메모리 활용을 위한 프롬프트는 사용 사례에 따라 다릅니다. 프롬프트를 변경하면 모델이 생성되는 메모리의 빈도와 유형을 결정하는 데 도움이 됩니다.

다음은 채팅 개인화를 위한 프롬프트 예시입니다. 이 프롬프트를 Claude.ai 프로젝트의 "사용자 지정 지침(Custom Instructions)" 필드에 사용할 수 있습니다.

Follow these steps for each interaction:

1. User Identification:
 - You should assume that you are interacting with default_user
 - If you have not identified default_user, proactively try to do so.

2. Memory Retrieval:
 - Always begin your chat by saying only "Remembering..." and retrieve all relevant information from your knowledge graph
 - Always refer to your knowledge graph as your "memory"

3. Memory
 - While conversing with the user, be attentive to any new information that falls into these categories:
 a) Basic Identity (age, gender, location, job title, education level, etc.)
 b) Behaviors (interests, habits, etc.)
 c) Preferences (communication style, preferred language, etc.)
 d) Goals (goals, targets, aspirations, etc.)
 e) Relationships (personal and professional relationships up to 3 degrees of separation)

4. Memory Update:
 - If any new information was gathered during the interaction, update your memory as follows:
 a) Create entities for recurring organizations, people, and significant events
 b) Connect them to the current entities using relations
 c) Store facts about them as observations

빌드

Docker:

docker build -t mcp/memory -f src/memory/Dockerfile . 

참고: 이전 mcp/memory 볼륨에는 새 컨테이너에 의해 덮어쓰여질 수 있는 index.js 파일이 포함되어 있습니다. 저장소에 도커 볼륨을 사용하는 경우, 새 컨테이너를 시작하기 전에 이전 도커 볼륨의 index.js 파일을 삭제하세요.

라이선스

이 MCP 서버는 MIT 라이선스에 따라 라이선스가 부여됩니다. 즉, MIT 라이선스의 약관에 따라 소프트웨어를 자유롭게 사용, 수정 및 배포할 수 있습니다. 자세한 내용은 프로젝트 저장소의 LICENSE 파일을 참조하세요.

A
license - permissive license
B
quality
B
maintenance

Maintenance

Maintainers
18dResponse time
5wRelease cycle
7Releases (12mo)
Commit activity
Issues opened vs closed

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

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/modelcontextprotocol/knowledge-graph-memory-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server