SM

sdimitrov/mcp-memory

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

64 stars 8 forks 품질 56 트렌드 0

sdimitrov/mcp-memory는 MCP 서버 후보가 https://github.com/sdimitrov/mcp-memory.에서 수입됩니다

개요

sdimitrov/mcp-memory는 MCP 서버 후보가 https://github.com/sdimitrov/mcp-memory.에서 수입됩니다

개요(AI 번역)

이 서버는 효율적인 벡터 유사성 검색을 위한 pgvector로 PostgreSQL에 의해 구동되는 mem0 원리를 사용하여 AI 조수를위한 장기 기억 기능을 구현합니다.

특징

  • 벡터 유사성 검색을 위한 pgvector로 PostgreSQL
  • BERT를 이용한 자동 embedding 발생
  • 메모리 작동을위한 RESTful API
  • Semantic 검색 기능
  • 다양한 종류의 기억 지원 (학습, 체험 등)
  • 태그 기반 메모리 retrieval
  • 기억을 위한 신뢰
  • 실시간 업데이트에 대한 Server-Sent Events (SSE)
  • Cursor MCP 프로토콜 호환

필수품

  1. 설치되는 pgvector 연장을 가진 PostgreSQL 14+:

  2. 노드.js 16+

설치

  1. 의존성 설치:

  2. 환경 변수 구성: 복사 .env.sample 에 .env 과 값을 조정:

예제 .env 구성:

  1. 데이터베이스를 초기화:

  2. 서버 시작:

auto-reload를 가진 발달을 위해:

Cursor 사용

Cursor의 MCP Server 추가

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

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

MCP Memory Server

This server implements long-term memory capabilities for AI assistants using mem0 principles, powered by PostgreSQL with pgvector for efficient vector similarity search.

Features

  • PostgreSQL with pgvector for vector similarity search
  • Automatic embedding generation using BERT
  • RESTful API for memory operations
  • Semantic search capabilities
  • Support for different types of memories (learnings, experiences, etc.)
  • Tag-based memory retrieval
  • Confidence scoring for memories
  • Server-Sent Events (SSE) for real-time updates
  • Cursor MCP protocol compatible

Prerequisites

  1. PostgreSQL 14+ with pgvector extension installed:
# In your PostgreSQL instance:
CREATE EXTENSION vector;
  1. Node.js 16+

Setup

  1. Install dependencies:
npm install
  1. Configure environment variables: Copy .env.sample to .env and adjust the values:
cp .env.sample .env

Example .env configurations:

# 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. Initialize the database:
npm run prisma:migrate
  1. Start the server:
npm start

For development with auto-reload:

npm run dev

Using with Cursor

Adding the MCP Server in Cursor

To add the memory server to Cursor, you need to modify your MCP configuration file located at ~/.cursor/mcp.json. Add the following configuration to the mcpServers object:

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

Replace /path/to/your/memory with the actual path to your memory server installation.

For example, if you cloned the repository to /Users/username/workspace/memory, your configuration would look like:

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

The server will be automatically started by Cursor when needed. You can verify it’s working by:

  1. Opening Cursor
  2. The memory server will be started automatically when Cursor launches
  3. You can check the server status by visiting http://localhost:3333/mcp/v1/health

Available MCP Endpoints

SSE Connection

  • Endpoint: GET /mcp/v1/sse
  • Query Parameters:
    • subscribe: Comma-separated list of events to subscribe to (optional)
  • Events:
    • connected: Sent on initial connection
    • memory.created: Sent when new memories are created
    • memory.updated: Sent when existing memories are updated

Memory Operations

  1. Create Memory
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"
  },
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

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