Skip to main content
Glama

MCP 메모리 서버

이 서버는 pgvector를 탑재한 PostgreSQL로 구동되는 mem0 원리를 사용하여 AI 보조 장치의 장기 메모리 기능을 구현하여 효율적인 벡터 유사성 검색을 구현합니다.

특징

  • 벡터 유사성 검색을 위한 pgvector를 사용한 PostgreSQL

  • BERT를 이용한 자동 임베딩 생성

  • 메모리 작업을 위한 RESTful API

  • 의미 검색 기능

  • 다양한 유형의 기억(학습, 경험 등) 지원

  • 태그 기반 메모리 검색

  • 기억에 대한 자신감 점수

  • 실시간 업데이트를 위한 SSE(서버 전송 이벤트)

  • 커서 MCP 프로토콜 호환

Related MCP server: PostgreSQL MCP Server

필수 조건

  1. pgvector 확장 기능이 설치된 PostgreSQL 14+:

지엑스피1

  1. 노드.js 16+

설정

  1. 종속성 설치:

npm install
  1. 환경 변수 구성: .env.sample``.env 로 복사하고 값을 조정합니다.

cp .env.sample .env

.env 구성 예시:

# With username/password DATABASE_URL="postgresql://username:password@localhost:5432/mcp_memory" PORT=3333 # Local development with peer authentication DATABASE_URL="postgresql:///mcp_memory" PORT=3333
  1. 데이터베이스를 초기화합니다.

npm run prisma:migrate
  1. 서버를 시작합니다:

npm start

자동 재로드를 사용한 개발의 경우:

npm run dev

커서와 함께 사용

커서에 MCP 서버 추가

커서에 메모리 서버를 추가하려면 ~/.cursor/mcp.json 에 있는 MCP 구성 파일을 수정해야 합니다. mcpServers 객체에 다음 구성을 추가합니다.

{ "mcpServers": { "memory": { "command": "node", "args": [ "/path/to/your/memory/src/server.js" ] } } }

/path/to/your/memory 메모리 서버 설치의 실제 경로로 바꾸세요.

예를 들어, 저장소를 /Users/username/workspace/memory 로 복제한 경우 구성은 다음과 같습니다.

{ "mcpServers": { "memory": { "command": "node", "args": [ "/Users/username/workspace/memory/src/server.js" ] } } }

서버는 필요 시 Cursor에 의해 자동으로 시작됩니다. 다음과 같이 서버가 제대로 작동하는지 확인할 수 있습니다.

  1. 커서 열기

  2. 커서가 실행되면 메모리 서버가 자동으로 시작됩니다.

  3. http://localhost:3333/mcp/v1/health 방문하여 서버 상태를 확인할 수 있습니다.

사용 가능한 MCP 엔드포인트

SSE 연결

  • 엔드포인트 : GET /mcp/v1/sse

  • 쿼리 매개변수 :

    • subscribe : 구독할 이벤트의 쉼표로 구분된 목록(선택 사항)

  • 이벤트 :

    • connected : 초기 연결 시 전송됨

    • memory.created : 새로운 메모리가 생성될 때 전송됨

    • memory.updated : 기존 메모리가 업데이트될 때 전송됩니다.

메모리 작업

  1. 메모리 만들기

POST /mcp/v1/memory Content-Type: application/json { "type": "learning", "content": { "topic": "Express.js", "details": "Express.js is a web application framework for Node.js" }, "source": "documentation", "tags": ["nodejs", "web-framework"], "confidence": 0.95 }
  1. 추억 검색

GET /mcp/v1/memory/search?query=web+frameworks&type=learning&tags=nodejs
  1. 추억 목록

GET /mcp/v1/memory?type=learning&tags=nodejs,web-framework

건강 검진

GET /mcp/v1/health

응답 형식

모든 API 응답은 표준 MCP 형식을 따릅니다.

{ "status": "success", "data": { // Response data } }

또는 오류의 경우:

{ "status": "error", "error": "Error message" }

메모리 스키마

  • id: 고유 식별자

  • 유형: 기억의 유형(학습, 경험 등)

  • content: 실제 메모리 내용(JSON)

  • 출처: 기억은 어디에서 왔는가

  • 임베딩: 콘텐츠의 벡터 표현(384차원)

  • 태그: 관련 태그의 배열

  • 신뢰도: 신뢰도 점수(0-1)

  • createdAt: 메모리가 생성된 시간

  • updatedAt: 메모리가 마지막으로 업데이트된 시간

-
security - not tested
F
license - not found
-
quality - not tested

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/sdimitrov/mcp-memory'

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