Skip to content

Never lose context again - persistent memory management system for AI-powered workflows across multiple tools

License

Notifications You must be signed in to change notification settings

moontmsai/work-memory-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Work Memory MCP Server

An integrated MCP (Model Context Protocol) server for managing work memories and sharing context between AI tools.

Project Purpose

Work Memory MCP is a memory management system that helps developers and knowledge workers maintain consistent work context while using multiple AI tools (Claude, Cursor AI, etc.). It systematically manages knowledge and work progress accumulated from individual AI conversation sessions, providing a continuous and efficient work environment.

Core Values

Persistence

While AI conversations disappear when sessions end, important work content and deliverables should be permanently preserved. Work Memory MCP safely stores all important work memories in a SQLite database, making them accessible at any time.

Consistency

You can share the same work context even when using multiple AI tools. Work started in Claude Desktop can be continued in Cursor AI or referenced from other tools, providing a consistent work environment.

Efficiency

There's no need to repeatedly explain already solved problems or organized information. Through an advanced search system, you can quickly find and reuse past work content, significantly improving work efficiency.

Organization

Rather than randomly scattered information, you can build a systematically organized knowledge base by project, importance level, and tags. Session-based management clearly separates and manages the context of each project.

Key Features

Memory Management

  • Store work content, deliverables, and learned information in structured format
  • Priority management through importance scores (0-100 points)
  • Multi-dimensional classification through tag system
  • Separate management of todos and general memories
  • Work progress management through completion status tracking

Session Management

  • Create independent work sessions by project
  • Automatic session context detection and connection
  • Session-specific work memory linking and tracking
  • Session lifecycle management (creation, activation, termination)

Advanced Search

  • Keyword-based full-text search
  • Filtering by project, importance, and session
  • Related keyword recommendation system
  • Search result highlighting and context provision
  • Search performance optimization and statistics

History Management

  • Track all work memory change history
  • Previous state restoration through version management system
  • Change comparison and analysis
  • Automatic backup and recovery features

System Optimization

  • Database performance monitoring
  • Automatic index management and optimization
  • Memory usage tracking
  • Batch operation processing system
  • Safe data cleanup features

Integrated Tool Configuration

Work Memory MCP consists of 5 integrated tools:

1. Memory (Memory Management)

Core tool responsible for creating, modifying, querying, and deleting work memories.

Key Functions:

  • add: Add new work memory
  • update: Modify existing work memory
  • list: Query work memory list (with filtering and paging support)
  • delete: Delete or archive work memory

Supported Data Types:

  • General memory: Learning content, ideas, reference materials
  • Todos: Tasks to be performed and their progress status
  • Project-based classification
  • Tag-based multi-dimensional classification
  • Importance scores (0-100 points)

2. Search (Search and Analysis)

Tool for efficiently finding and analyzing stored work memories.

Key Functions:

  • search: Keyword-based search
  • keywords: Related keyword analysis
  • stats: Search system statistics
  • optimize: Search index optimization

Search Features:

  • Full-text search
  • Multi-condition filtering
  • Importance-based sorting
  • Search result highlighting
  • Related keyword recommendations
  • Search performance statistics

3. Session (Session Management)

Tool for managing project-specific work sessions.

Key Functions:

  • create: Create new session
  • activate: Activate session
  • deactivate: Deactivate session
  • list: Query session list
  • status: Check current session status
  • detect: Automatic session detection

Session Management Features:

  • Independent workspace by project
  • Automatic session detection and connection
  • Session-specific work memory linking
  • Exclusive session mode (maintained for 30 minutes)
  • Session statistics and activity tracking

4. History (History Management)

Tool for managing change history and versions of work memories.

Key Functions:

  • changes: Query change history
  • versions: Query version list
  • restore: Restore previous version
  • list_versions: Full version history

Version Management Features:

  • Automatic version creation
  • Detailed change tracking
  • Version comparison functionality
  • Selective restoration capability
  • Version cleanup and optimization

5. System (System Management)

Tool responsible for server status monitoring and system optimization.

Key Functions:

  • status: Query server status
  • monitor: Real-time monitoring
  • optimize: Database optimization
  • batch: Batch operation processing
  • delete: Category-based data cleanup
  • diagnose: System diagnosis
  • analyze: Detailed analysis
  • repair: Automatic recovery

System Management Features:

  • Real-time performance monitoring
  • Automatic index management
  • Memory usage tracking
  • Database optimization
  • Safe data cleanup
  • System health diagnosis

Installation

1. System Requirements

  • Node.js 18.0.0 or higher
  • npm 8.0.0 or higher
  • Operating System: Windows, macOS, Linux

2. Clone and Install Project

git clone https://github.com/your-repo/work-memory-mcp.git
cd work-memory-mcp
npm install

3. Build Project

npm run build

4. Test Server Execution

npm start

Configuration

Claude Desktop Configuration (or cursor.ai)

To use Work Memory MCP in Claude Desktop, add the following to the configuration file:

Windows Configuration File Location:

%APPDATA%\Claude\claude_desktop_config.json

macOS Configuration File Location:

~/Library/Application Support/Claude/claude_desktop_config.json

Configuration File Content:

{
  "mcpServers": {
    "work-memory": {
      "command": "node",
      "args": ["/PATH/work-memory/dist/index.js"],
      "env": {
        "WORK_MEMORY_DIR": "/PATH/work-memory/data/",
        "LOG_LEVEL": "WARN",
        "NODE_ENV": "production"
      }
    }
  }
}

Environment Variable Configuration (Optional)

You can set the following environment variables:

# Log level setting (default: INFO)
LOG_LEVEL=WARN

# Database storage directory (default: ./work_memory)
WORK_MEMORY_DIR=/PATH/work-memory/data/

# Database filename (only applied when WORK_MEMORY_DIR is set, default: database.sqlite)
DB_FILENAME=database.sqlite

Note:

  • If WORK_MEMORY_DIR is not set, DB_FILENAME is ignored and fixed to 'database.sqlite'.
  • Cache memory usage (50MB) is currently hardcoded and cannot be set via environment variables.

Cursor AI Configuration

To use with Cursor AI, you can connect through MCP extensions or plugins. Refer to Cursor AI's MCP support documentation for detailed configuration methods.

Recommended User Configuration

For optimal use of Work Memory MCP, add the following configuration to your AI assistant's user preferences:

# [Execute once at session start]
0. When a session starts for the first time, execute the following:
   - Say "Searching for memories..."
   - Query the 3 latest work memories from work-memory mcp
   - Query the 3 highest priority incomplete todos
   - Brief the user on the retrieved work memories and todos

# [Smart Session Management]
1. When conversation content is determined to be related to a specific project, subject area, or ongoing work, automatically detect and activate related sessions.
   - Execute session_status detect_active when determined to be continuous work rather than simple Q&A
   - Auto-activate if related session exists, prepare new session if none exists
   - Once activated, maintain exclusive session for 30 minutes (extend with activity)
   - Change sessions only when switching to different subject areas
   - All related work automatically connects to the same session
   - Provide brief session overview

# [Repeated execution during general conversation]
2. During ongoing conversation, follow only these principles:
   - Judge importance of all responses (out of 100 points), store in work-memory mcp if 50 points or higher
   - Make judgments based only on existing memories, do not repeatedly query

Usage Examples

Basic Work Memory Addition

{
  "operation": "add",
  "content": "For React component optimization, useMemo and useCallback should be used appropriately. Especially effective when used with React.memo for components with frequent prop changes",
  "project": "frontend-optimization",
  "tags": ["React", "performance-optimization", "useMemo", "useCallback"],
  "importance_score": 8,
  "work_type": "memory"
}

Todo Addition and Management

{
  "operation": "add",
  "content": "Implement caching strategy for API response time improvement",
  "project": "backend-optimization",
  "tags": ["caching", "performance", "API"],
  "importance_score": 9,
  "work_type": "todo",
  "worked": "incomplete",
  "requirements": "Implement Redis caching layer, set TTL, establish cache invalidation strategy"
}

Advanced Search Usage

{
  "operation": "search",
  "query": "React performance optimization",
  "project": "frontend-optimization",
  "importance_min": 7,
  "highlight_matches": true,
  "include_content": true
}

Session-based Work

// Create new project session
{
  "operation": "create",
  "session_name": "Mobile App Refactoring",
  "description": "Performance improvement and code structure enhancement project for existing mobile app"
}

// Add work memory linked to session
{
  "operation": "add",
  "content": "Mobile app performance bottleneck analysis completed. Main issues require image loading and state management optimization",
  "project": "Mobile App Refactoring",
  "auto_link": true
}

System Management and Optimization

// Database optimization
{
  "operation": "optimize",
  "vacuum_type": "incremental",
  "analyze": true
}

// Clean up low importance tasks
{
  "operation": "delete",
  "category": "work_memories",
  "delete_criteria": {
    "max_importance_score": 3,
    "older_than_days": 30
  },
  "archive_only": true
}

Project Structure

work-memory-mcp/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ database/          # Database related (SQLite, schema, connections)
โ”‚   โ”œโ”€โ”€ tools/            # MCP tool implementations (5 integrated tools)
โ”‚   โ”‚   โ”œโ”€โ”€ memory.ts     # Memory management tool
โ”‚   โ”‚   โ”œโ”€โ”€ search.ts     # Search and analysis tool
โ”‚   โ”‚   โ”œโ”€โ”€ session.ts    # Session management tool
โ”‚   โ”‚   โ”œโ”€โ”€ history.ts    # History management tool
โ”‚   โ”‚   โ””โ”€โ”€ system.ts     # System management tool
โ”‚   โ”œโ”€โ”€ utils/            # Utility functions
โ”‚   โ”œโ”€โ”€ types/            # TypeScript type definitions
โ”‚   โ”œโ”€โ”€ session/          # Session management and termination handling
โ”‚   โ”œโ”€โ”€ progress/         # Progress tracking system
โ”‚   โ””โ”€โ”€ index.ts          # Server entry point
โ”œโ”€โ”€ tests/               # Test files
โ”œโ”€โ”€ docs/                # Documentation
โ”œโ”€โ”€ dist/                # Build output
โ””โ”€โ”€ work_memory/         # Database file storage directory

Database Structure

Work Memory MCP uses SQLite with the following table structure:

work_memories table

  • Stores main data for all work memories
  • Content, projects, tags, importance, work types, etc.

sessions table

  • Manages project session information
  • Session metadata and activity statistics

work_memory_history table

  • Tracks work memory change history
  • Version management and restoration support

search_keywords table

  • Keyword index for search optimization
  • Full-text search performance enhancement

project_index table

  • Project-specific metadata management
  • Project statistics and analysis

Performance and Optimization

Search Performance

  • Fast search through 16 composite indexes
  • Accuracy improvement through keyword weighting system
  • Repeated search optimization through LRU cache

Memory Management

  • LRU cache with maximum 500 entries, 50MB limit (hardcoded)
  • Automatic memory cleanup system
  • Progress tracking for large operations

Database Optimization

  • Automatic VACUUM and ANALYZE execution
  • Index coverage analysis and optimization
  • Atomic operation guarantee through transactions

Security and Safety

Data Security

  • Prevent external leakage through local SQLite database
  • SQL injection prevention through input validation
  • Safe file system access control

Data Integrity

  • Atomic operations through transactions
  • Automatic backup and recovery system
  • Data corruption detection and recovery

Protocol Compliance

  • Full compliance with MCP standard protocol
  • JSON-RPC compatibility guarantee
  • Communication stability through stdout protection

Development Environment

Development Mode Execution

npm run dev

Test Execution

# All tests
npm test

# Unit tests
npm run test:unit

# Integration tests
npm run test:integration

# Performance tests
npm run test:performance

# Coverage tests
npm run test:coverage

Code Quality Management

# Lint check
npm run lint

# Automatic lint fix
npm run lint:fix

Troubleshooting

Common Issues

MCP Server Connection Failure

# 1. Server restart
npm run build && npm start

# 2. Claude Desktop restart
# 3. Check configuration file path

Database Performance Degradation

{
  "operation": "optimize",
  "vacuum_type": "full",
  "analyze": true
}

Memory Usage Increase

{
  "operation": "delete",
  "category": "work_memories",
  "delete_criteria": {
    "max_importance_score": 2,
    "older_than_days": 60
  },
  "archive_only": true
}

Debug Mode

You can check detailed logs by setting environment variables:

LOG_LEVEL=debug npm start

License

MIT License - See LICENSE file for details.

Contributing

  1. Fork the project
  2. Create feature branch (git checkout -b feature/new-feature)
  3. Commit changes (git commit -am 'Add new feature')
  4. Push to branch (git push origin feature/new-feature)
  5. Create Pull Request

Support and Contact

โ˜• Support

If this project has been helpful, please support with a cup of coffee: https://coff.ee/moontmsai
Your support is a great help for continuous open source development. Buy Me A Coffee

Thank you for using Work Memory MCP. Let's work together to create a better AI collaboration environment!


Work Memory MCP Server (ํ•œ๊ธ€)

์—…๋ฌด ์ž‘์—… ๊ธฐ์–ต์„ ๊ด€๋ฆฌํ•˜๊ณ  AI ๋„๊ตฌ ๊ฐ„์— ์ปจํ…์ŠคํŠธ๋ฅผ ๊ณต์œ ํ•˜๊ธฐ ์œ„ํ•œ ํ†ตํ•ฉ MCP (Model Context Protocol) ์„œ๋ฒ„์ž…๋‹ˆ๋‹ค.

ํ”„๋กœ์ ํŠธ ๋ชฉ์ 

Work Memory MCP๋Š” ๊ฐœ๋ฐœ์ž์™€ ์ง€์‹ ์ž‘์—…์ž๊ฐ€ ์—ฌ๋Ÿฌ AI ๋„๊ตฌ(Claude, Cursor AI ๋“ฑ)๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด์„œ ์ผ๊ด€๋œ ์ž‘์—… ์ปจํ…์ŠคํŠธ๋ฅผ ์œ ์ง€ํ•  ์ˆ˜ ์žˆ๋„๋ก ๋„์™€์ฃผ๋Š” ๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ์ž…๋‹ˆ๋‹ค. ๊ฐ๊ฐ์˜ AI ๋Œ€ํ™” ์„ธ์…˜์—์„œ ์ถ•์ ๋œ ์ง€์‹๊ณผ ์ž‘์—… ์ง„ํ–‰ ์ƒํ™ฉ์„ ์ฒด๊ณ„์ ์œผ๋กœ ๊ด€๋ฆฌํ•˜์—ฌ, ์—ฐ์†์ ์ด๊ณ  ํšจ์œจ์ ์ธ ์ž‘์—… ํ™˜๊ฒฝ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

ํ•ต์‹ฌ ๊ฐ€์น˜

์ง€์†์„ฑ (Persistence)

AI์™€์˜ ๋Œ€ํ™”๋Š” ์„ธ์…˜์ด ๋๋‚˜๋ฉด ์‚ฌ๋ผ์ง€์ง€๋งŒ, ์ค‘์š”ํ•œ ์ž‘์—… ๋‚ด์šฉ๊ณผ ๊ฒฐ๊ณผ๋ฌผ์€ ์˜๊ตฌ์ ์œผ๋กœ ๋ณด์กด๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. Work Memory MCP๋Š” ๋ชจ๋“  ์ค‘์š”ํ•œ ์ž‘์—… ๊ธฐ์–ต์„ SQLite ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์•ˆ์ „ํ•˜๊ฒŒ ์ €์žฅํ•˜์—ฌ ์–ธ์ œ๋“ ์ง€ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.

์ผ๊ด€์„ฑ (Consistency)

์—ฌ๋Ÿฌ AI ๋„๊ตฌ๋ฅผ ์‚ฌ์šฉํ•˜๋”๋ผ๋„ ๋™์ผํ•œ ์ž‘์—… ์ปจํ…์ŠคํŠธ๋ฅผ ๊ณต์œ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Claude Desktop์—์„œ ์‹œ์ž‘ํ•œ ์ž‘์—…์„ Cursor AI์—์„œ ์ด์–ด๋ฐ›๊ฑฐ๋‚˜, ๋‹ค๋ฅธ ๋„๊ตฌ์—์„œ ์ฐธ์กฐํ•  ์ˆ˜ ์žˆ๋Š” ์ผ๊ด€๋œ ์ž‘์—… ํ™˜๊ฒฝ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

ํšจ์œจ์„ฑ (Efficiency)

์ด๋ฏธ ํ•ด๊ฒฐํ•œ ๋ฌธ์ œ๋‚˜ ์ •๋ฆฌํ•œ ์ •๋ณด๋ฅผ ๋ฐ˜๋ณต์ ์œผ๋กœ ์„ค๋ช…ํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. ๊ณ ๊ธ‰ ๊ฒ€์ƒ‰ ์‹œ์Šคํ…œ์„ ํ†ตํ•ด ๊ณผ๊ฑฐ์˜ ์ž‘์—… ๋‚ด์šฉ์„ ๋น ๋ฅด๊ฒŒ ์ฐพ์•„ ์žฌํ™œ์šฉํ•  ์ˆ˜ ์žˆ์–ด, ์ž‘์—… ํšจ์œจ์„ฑ์ด ํฌ๊ฒŒ ํ–ฅ์ƒ๋ฉ๋‹ˆ๋‹ค.

๊ตฌ์กฐํ™” (Organization)

๋ฌด์ž‘์œ„๋กœ ํฉ์–ด์ง„ ์ •๋ณด๊ฐ€ ์•„๋‹Œ, ํ”„๋กœ์ ํŠธ๋ณ„, ์ค‘์š”๋„๋ณ„, ํƒœ๊ทธ๋ณ„๋กœ ์ฒด๊ณ„์ ์œผ๋กœ ์ •๋ฆฌ๋œ ์ง€์‹ ๋ฒ ์ด์Šค๋ฅผ ๊ตฌ์ถ•ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์„ธ์…˜ ๊ธฐ๋ฐ˜ ๊ด€๋ฆฌ๋ฅผ ํ†ตํ•ด ๊ฐ ํ”„๋กœ์ ํŠธ์˜ ์ปจํ…์ŠคํŠธ๋ฅผ ๋ช…ํ™•ํ•˜๊ฒŒ ๋ถ„๋ฆฌํ•˜์—ฌ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

์ฃผ์š” ๊ธฐ๋Šฅ

๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ

  • ์ž‘์—… ๋‚ด์šฉ, ๊ฒฐ๊ณผ๋ฌผ, ํ•™์Šตํ•œ ๋‚ด์šฉ์„ ๊ตฌ์กฐํ™”๋œ ํ˜•ํƒœ๋กœ ์ €์žฅ
  • ์ค‘์š”๋„ ์ ์ˆ˜(0-100์ )๋ฅผ ํ†ตํ•œ ์šฐ์„ ์ˆœ์œ„ ๊ด€๋ฆฌ
  • ํƒœ๊ทธ ์‹œ์Šคํ…œ์œผ๋กœ ๋‹ค์ฐจ์›์  ๋ถ„๋ฅ˜
  • ํ• ์ผ(Todo)๊ณผ ์ผ๋ฐ˜ ๋ฉ”๋ชจ๋ฆฌ(Memory) ๊ตฌ๋ถ„ ๊ด€๋ฆฌ
  • ์™„๋ฃŒ ์ƒํƒœ ์ถ”์ ์„ ํ†ตํ•œ ์ž‘์—… ์ง„ํ–‰๋ฅ  ๊ด€๋ฆฌ

์„ธ์…˜ ๊ด€๋ฆฌ

  • ํ”„๋กœ์ ํŠธ๋ณ„ ๋…๋ฆฝ์ ์ธ ์ž‘์—… ์„ธ์…˜ ์ƒ์„ฑ
  • ์„ธ์…˜ ์ปจํ…์ŠคํŠธ ์ž๋™ ๊ฐ์ง€ ๋ฐ ์—ฐ๊ฒฐ
  • ์„ธ์…˜๋ณ„ ์ž‘์—… ๊ธฐ์–ต ์—ฐ๋™ ๋ฐ ์ถ”์ 
  • ์„ธ์…˜ ์ƒ๋ช…์ฃผ๊ธฐ ๊ด€๋ฆฌ (์ƒ์„ฑ, ํ™œ์„ฑํ™”, ์ข…๋ฃŒ)

๊ณ ๊ธ‰ ๊ฒ€์ƒ‰

  • ํ‚ค์›Œ๋“œ ๊ธฐ๋ฐ˜ ์ „๋ฌธ ๊ฒ€์ƒ‰
  • ํ”„๋กœ์ ํŠธ, ์ค‘์š”๋„, ์„ธ์…˜๋ณ„ ํ•„ํ„ฐ๋ง
  • ์—ฐ๊ด€ ํ‚ค์›Œ๋“œ ์ถ”์ฒœ ์‹œ์Šคํ…œ
  • ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ ํ•˜์ด๋ผ์ดํŠธ ๋ฐ ์ปจํ…์ŠคํŠธ ์ œ๊ณต
  • ๊ฒ€์ƒ‰ ์„ฑ๋Šฅ ์ตœ์ ํ™” ๋ฐ ํ†ต๊ณ„ ์ œ๊ณต

์ด๋ ฅ ๊ด€๋ฆฌ

  • ๋ชจ๋“  ์ž‘์—… ๊ธฐ์–ต ๋ณ€๊ฒฝ ์ด๋ ฅ ์ถ”์ 
  • ๋ฒ„์ „ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ์„ ํ†ตํ•œ ์ด์ „ ์ƒํƒœ ๋ณต์›
  • ๋ณ€๊ฒฝ ์‚ฌํ•ญ ๋น„๊ต ๋ฐ ๋ถ„์„
  • ์ž๋™ ๋ฐฑ์—… ๋ฐ ๋ณต๊ตฌ ๊ธฐ๋Šฅ

์‹œ์Šคํ…œ ์ตœ์ ํ™”

  • ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์„ฑ๋Šฅ ๋ชจ๋‹ˆํ„ฐ๋ง
  • ์ž๋™ ์ธ๋ฑ์Šค ๊ด€๋ฆฌ ๋ฐ ์ตœ์ ํ™”
  • ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰ ์ถ”์ 
  • ์ผ๊ด„ ์ž‘์—… ์ฒ˜๋ฆฌ ์‹œ์Šคํ…œ
  • ์•ˆ์ „ํ•œ ๋ฐ์ดํ„ฐ ์ •๋ฆฌ ๊ธฐ๋Šฅ

ํ†ตํ•ฉ ๋„๊ตฌ ๊ตฌ์„ฑ

Work Memory MCP๋Š” 5๊ฐœ์˜ ํ†ตํ•ฉ ๋„๊ตฌ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค:

1. Memory (๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ)

์ž‘์—… ๊ธฐ์–ต์˜ ์ƒ์„ฑ, ์ˆ˜์ •, ์กฐํšŒ, ์‚ญ์ œ๋ฅผ ๋‹ด๋‹นํ•˜๋Š” ํ•ต์‹ฌ ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.

์ฃผ์š” ๊ธฐ๋Šฅ:

  • add: ์ƒˆ๋กœ์šด ์ž‘์—… ๊ธฐ์–ต ์ถ”๊ฐ€
  • update: ๊ธฐ์กด ์ž‘์—… ๊ธฐ์–ต ์ˆ˜์ •
  • list: ์ž‘์—… ๊ธฐ์–ต ๋ชฉ๋ก ์กฐํšŒ (ํ•„ํ„ฐ๋ง ๋ฐ ํŽ˜์ด์ง• ์ง€์›)
  • delete: ์ž‘์—… ๊ธฐ์–ต ์‚ญ์ œ ๋˜๋Š” ์•„์นด์ด๋ธŒ

์ง€์›ํ•˜๋Š” ๋ฐ์ดํ„ฐ ์œ ํ˜•:

  • ์ผ๋ฐ˜ ๋ฉ”๋ชจ๋ฆฌ: ํ•™์Šต ๋‚ด์šฉ, ์•„์ด๋””์–ด, ์ฐธ๊ณ  ์ž๋ฃŒ
  • ํ• ์ผ: ์ˆ˜ํ–‰ํ•ด์•ผ ํ•  ์ž‘์—…๊ณผ ์ง„ํ–‰ ์ƒํƒœ
  • ํ”„๋กœ์ ํŠธ๋ณ„ ๋ถ„๋ฅ˜
  • ํƒœ๊ทธ ๊ธฐ๋ฐ˜ ๋‹ค์ฐจ์› ๋ถ„๋ฅ˜
  • ์ค‘์š”๋„ ์ ์ˆ˜ (0-100์ )

2. Search (๊ฒ€์ƒ‰ ๋ฐ ๋ถ„์„)

์ €์žฅ๋œ ์ž‘์—… ๊ธฐ์–ต์„ ํšจ์œจ์ ์œผ๋กœ ์ฐพ๊ณ  ๋ถ„์„ํ•˜๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.

์ฃผ์š” ๊ธฐ๋Šฅ:

  • search: ํ‚ค์›Œ๋“œ ๊ธฐ๋ฐ˜ ๊ฒ€์ƒ‰
  • keywords: ์—ฐ๊ด€ ํ‚ค์›Œ๋“œ ๋ถ„์„
  • stats: ๊ฒ€์ƒ‰ ์‹œ์Šคํ…œ ํ†ต๊ณ„
  • optimize: ๊ฒ€์ƒ‰ ์ธ๋ฑ์Šค ์ตœ์ ํ™”

๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ:

  • ์ „๋ฌธ ํ…์ŠคํŠธ ๊ฒ€์ƒ‰
  • ๋‹ค์ค‘ ์กฐ๊ฑด ํ•„ํ„ฐ๋ง
  • ์ค‘์š”๋„๋ณ„ ์ •๋ ฌ
  • ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ ํ•˜์ด๋ผ์ดํŠธ
  • ์—ฐ๊ด€ ํ‚ค์›Œ๋“œ ์ถ”์ฒœ
  • ๊ฒ€์ƒ‰ ์„ฑ๋Šฅ ํ†ต๊ณ„

3. Session (์„ธ์…˜ ๊ด€๋ฆฌ)

ํ”„๋กœ์ ํŠธ๋ณ„ ์ž‘์—… ์„ธ์…˜์„ ๊ด€๋ฆฌํ•˜๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.

์ฃผ์š” ๊ธฐ๋Šฅ:

  • create: ์ƒˆ ์„ธ์…˜ ์ƒ์„ฑ
  • activate: ์„ธ์…˜ ํ™œ์„ฑํ™”
  • deactivate: ์„ธ์…˜ ๋น„ํ™œ์„ฑํ™”
  • list: ์„ธ์…˜ ๋ชฉ๋ก ์กฐํšŒ
  • status: ํ˜„์žฌ ์„ธ์…˜ ์ƒํƒœ ํ™•์ธ
  • detect: ์ž๋™ ์„ธ์…˜ ๊ฐ์ง€

์„ธ์…˜ ๊ด€๋ฆฌ ํŠน์ง•:

  • ํ”„๋กœ์ ํŠธ๋ณ„ ๋…๋ฆฝ์ ์ธ ์ž‘์—… ๊ณต๊ฐ„
  • ์ž๋™ ์„ธ์…˜ ๊ฐ์ง€ ๋ฐ ์—ฐ๊ฒฐ
  • ์„ธ์…˜๋ณ„ ์ž‘์—… ๊ธฐ์–ต ์—ฐ๋™
  • ๋…์  ์„ธ์…˜ ๋ชจ๋“œ (30๋ถ„ ๋™์•ˆ ์œ ์ง€)
  • ์„ธ์…˜ ํ†ต๊ณ„ ๋ฐ ํ™œ๋™ ์ถ”์ 

4. History (์ด๋ ฅ ๊ด€๋ฆฌ)

์ž‘์—… ๊ธฐ์–ต์˜ ๋ณ€๊ฒฝ ์ด๋ ฅ๊ณผ ๋ฒ„์ „์„ ๊ด€๋ฆฌํ•˜๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.

์ฃผ์š” ๊ธฐ๋Šฅ:

  • changes: ๋ณ€๊ฒฝ ์ด๋ ฅ ์กฐํšŒ
  • versions: ๋ฒ„์ „ ๋ชฉ๋ก ์กฐํšŒ
  • restore: ์ด์ „ ๋ฒ„์ „ ๋ณต์›
  • list_versions: ์ „์ฒด ๋ฒ„์ „ ์ด๋ ฅ

๋ฒ„์ „ ๊ด€๋ฆฌ ํŠน์ง•:

  • ์ž๋™ ๋ฒ„์ „ ์ƒ์„ฑ
  • ๋ณ€๊ฒฝ ์‚ฌํ•ญ ์ƒ์„ธ ์ถ”์ 
  • ๋ฒ„์ „ ๊ฐ„ ๋น„๊ต ๊ธฐ๋Šฅ
  • ์„ ํƒ์  ๋ณต์› ๊ธฐ๋Šฅ
  • ๋ฒ„์ „ ์ •๋ฆฌ ๋ฐ ์ตœ์ ํ™”

5. System (์‹œ์Šคํ…œ ๊ด€๋ฆฌ)

์„œ๋ฒ„ ์ƒํƒœ ๋ชจ๋‹ˆํ„ฐ๋ง๊ณผ ์‹œ์Šคํ…œ ์ตœ์ ํ™”๋ฅผ ๋‹ด๋‹นํ•˜๋Š” ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.

์ฃผ์š” ๊ธฐ๋Šฅ:

  • status: ์„œ๋ฒ„ ์ƒํƒœ ์กฐํšŒ
  • monitor: ์‹ค์‹œ๊ฐ„ ๋ชจ๋‹ˆํ„ฐ๋ง
  • optimize: ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ตœ์ ํ™”
  • batch: ์ผ๊ด„ ์ž‘์—… ์ฒ˜๋ฆฌ
  • delete: ์นดํ…Œ๊ณ ๋ฆฌ๋ณ„ ๋ฐ์ดํ„ฐ ์ •๋ฆฌ
  • diagnose: ์‹œ์Šคํ…œ ์ง„๋‹จ
  • analyze: ์ƒ์„ธ ๋ถ„์„
  • repair: ์ž๋™ ๋ณต๊ตฌ

์‹œ์Šคํ…œ ๊ด€๋ฆฌ ํŠน์ง•:

  • ์‹ค์‹œ๊ฐ„ ์„ฑ๋Šฅ ๋ชจ๋‹ˆํ„ฐ๋ง
  • ์ž๋™ ์ธ๋ฑ์Šค ๊ด€๋ฆฌ
  • ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰ ์ถ”์ 
  • ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ตœ์ ํ™”
  • ์•ˆ์ „ํ•œ ๋ฐ์ดํ„ฐ ์ •๋ฆฌ
  • ์‹œ์Šคํ…œ ๊ฑด๊ฐ• ์ƒํƒœ ์ง„๋‹จ

์„ค์น˜ ๋ฐฉ๋ฒ•

1. ์‹œ์Šคํ…œ ์š”๊ตฌ์‚ฌํ•ญ

  • Node.js 18.0.0 ์ด์ƒ
  • npm 8.0.0 ์ด์ƒ
  • ์šด์˜์ฒด์ œ: Windows, macOS, Linux

2. ํ”„๋กœ์ ํŠธ ํด๋ก  ๋ฐ ์„ค์น˜

git clone https://github.com/your-repo/work-memory-mcp.git
cd work-memory-mcp
npm install

3. ํ”„๋กœ์ ํŠธ ๋นŒ๋“œ

npm run build

4. ์„œ๋ฒ„ ํ…Œ์ŠคํŠธ ์‹คํ–‰

npm start

์„ค์ • ๋ฐฉ๋ฒ•

Claude Desktop ์„ค์ • (๋˜๋Š” cursor.ai)

Claude Desktop์—์„œ Work Memory MCP๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ์„ค์ • ํŒŒ์ผ์— ๋‹ค์Œ์„ ์ถ”๊ฐ€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

Windows ์„ค์ • ํŒŒ์ผ ์œ„์น˜:

%APPDATA%\Claude\claude_desktop_config.json

macOS ์„ค์ • ํŒŒ์ผ ์œ„์น˜:

~/Library/Application Support/Claude/claude_desktop_config.json

์„ค์ • ํŒŒ์ผ ๋‚ด์šฉ:

{
  "mcpServers": {
    "work-memory": {
      "command": "node",
      "args": ["/PATH/work-memory/dist/index.js"],
      "env": {
        "WORK_MEMORY_DIR": "/PATH/work-memory/data/",
        "LOG_LEVEL": "WARN",
        "NODE_ENV": "production"
      }
    }
  }
}

ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ • (์„ ํƒ์‚ฌํ•ญ)

๋‹ค์Œ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋“ค์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

# ๋กœ๊ทธ ๋ ˆ๋ฒจ ์„ค์ • (๊ธฐ๋ณธ๊ฐ’: INFO)
LOG_LEVEL=WARN

# ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ €์žฅ ๋””๋ ‰ํ† ๋ฆฌ (๊ธฐ๋ณธ๊ฐ’: ./work_memory)
WORK_MEMORY_DIR=/PATH/work-memory/data/

# ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ํŒŒ์ผ๋ช… (WORK_MEMORY_DIR ์„ค์ •์‹œ์—๋งŒ ์ ์šฉ, ๊ธฐ๋ณธ๊ฐ’: database.sqlite)
DB_FILENAME=database.sqlite

์ฐธ๊ณ :

  • WORK_MEMORY_DIR์ด ์„ค์ •๋˜์ง€ ์•Š์œผ๋ฉด DB_FILENAME์€ ๋ฌด์‹œ๋˜๊ณ  'database.sqlite'๋กœ ๊ณ ์ •๋ฉ๋‹ˆ๋‹ค.
  • ์บ์‹œ ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰(50MB)์€ ํ˜„์žฌ ์ฝ”๋“œ์—์„œ ํ•˜๋“œ์ฝ”๋”ฉ๋˜์–ด ์žˆ์œผ๋ฉฐ, ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋กœ ์„ค์ •ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

Cursor AI ์„ค์ •

Cursor AI์—์„œ ์‚ฌ์šฉํ•˜๋ ค๋ฉด MCP ํ™•์žฅ์ด๋‚˜ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ํ†ตํ•ด ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ž์„ธํ•œ ์„ค์ • ๋ฐฉ๋ฒ•์€ Cursor AI์˜ MCP ์ง€์› ๋ฌธ์„œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

๊ถŒ์žฅ ์‚ฌ์šฉ์ž ์„ค์ •

Work Memory MCP๋ฅผ ์ตœ์ ์œผ๋กœ ํ™œ์šฉํ•˜๊ธฐ ์œ„ํ•ด AI ์–ด์‹œ์Šคํ„ดํŠธ์˜ ์‚ฌ์šฉ์ž ์„ค์ •์— ๋‹ค์Œ ๋‚ด์šฉ์„ ์ถ”๊ฐ€ํ•˜์„ธ์š”:

# [์„ธ์…˜ ์‹œ์ž‘ ์‹œ 1ํšŒ๋งŒ ์‹คํ–‰]
0. ์„ธ์…˜์ด ์ฒ˜์Œ ์‹œ์ž‘๋  ๋•Œ๋งŒ ๋‹ค์Œ์„ ์‹คํ–‰ํ•˜์„ธ์š”:
   - "๊ธฐ์–ต์„ ์ฐพ์•„๋ณด๋Š” ์ค‘..." ์ด๋ผ๊ณ  ๋งํ•ฉ๋‹ˆ๋‹ค.
   - work-memory mcp์—์„œ ์ตœ์‹  ์ž‘์—…๊ธฐ์–ต 3๊ฐœ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค.
   - ์ค‘์š”๋„ ๋†’์€ ๋ฏธ์™„๋ฃŒ ํ• ์ผ 3๊ฐœ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค.
   - ์กฐํšŒํ•œ ์ž‘์—…๊ธฐ์–ต๊ณผ ํ• ์ผ์€ ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ธŒ๋ฆฌํ•‘ํ•ฉ๋‹ˆ๋‹ค.

# [์Šค๋งˆํŠธ ์„ธ์…˜ ๊ด€๋ฆฌ]
1. ๋Œ€ํ™” ๋‚ด์šฉ์ด ํŠน์ • ํ”„๋กœ์ ํŠธ, ์ฃผ์ œ์˜์—ญ, ๋˜๋Š” ์ง€์†์  ์ž‘์—…์— ํ•ด๋‹นํ•œ๋‹ค๊ณ  ํŒ๋‹จ๋  ๋•Œ, ๊ด€๋ จ ์„ธ์…˜์„ ์ž๋™์œผ๋กœ ๊ฐ์ง€ํ•˜๊ณ  ํ™œ์„ฑํ™”ํ•œ๋‹ค.
   - ๋‹จ์ˆœ ์งˆ๋‹ต์ด ์•„๋‹Œ ์—ฐ์†์  ์ž‘์—…์œผ๋กœ ํŒ๋‹จ ์‹œ session_status detect_active ์‹คํ–‰
   - ๊ด€๋ จ ์„ธ์…˜ ์žˆ์œผ๋ฉด ์ž๋™ ํ™œ์„ฑํ™”, ์—†์œผ๋ฉด ์ƒˆ ์„ธ์…˜ ์ค€๋น„
   - ํ•œ๋ฒˆ ํ™œ์„ฑํ™”๋œ ์„ธ์…˜์€ 30๋ถ„ ๋™์•ˆ ๋…์  ์œ ์ง€ (ํ™œ๋™ ์‹œ ์—ฐ์žฅ)
   - ๋‹ค๋ฅธ ์ฃผ์ œ์˜์—ญ ์ „ํ™˜ ์‹œ์—๋งŒ ์„ธ์…˜ ๊ต์ฒด
   - ๋ชจ๋“  ๊ด€๋ จ ์ž‘์—…์ด ์ž๋™์œผ๋กœ ๊ฐ™์€ ์„ธ์…˜์— ์—ฐ๊ฒฐ
   - ์„ธ์…˜์— ๋Œ€ํ•ด ๊ฐ„๋‹จํžˆ ๋ธŒ๋ฆฌํ•‘

# [์ผ๋ฐ˜ ๋Œ€ํ™” ์ค‘ ๋ฐ˜๋ณต์ ์œผ๋กœ ์ˆ˜ํ–‰]
2. ๋Œ€ํ™”๊ฐ€ ์ง„ํ–‰๋˜๋Š” ๋™์•ˆ์—๋Š” ๋‹ค์Œ ์›์น™๋งŒ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค:
   - ๋ชจ๋“  ์‘๋‹ต์€ ์ค‘์š”๋„๋ฅผ ํŒ๋‹จํ•˜์—ฌ(100์  ๋งŒ์ ), 50์  ์ด์ƒ์ผ ๊ฒฝ์šฐ work-memory mcp์— ์ €์žฅํ•ฉ๋‹ˆ๋‹ค.
   - ๊ธฐ์กด ๊ธฐ์–ต์„ ๊ธฐ๋ฐ˜์œผ๋กœ๋งŒ ํŒ๋‹จํ•˜๊ณ  ๋ฐ˜๋ณต ์กฐํšŒํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์‚ฌ์šฉ ์˜ˆ์‹œ

๊ธฐ๋ณธ ์ž‘์—… ๊ธฐ์–ต ์ถ”๊ฐ€

{
  "operation": "add",
  "content": "React ์ปดํฌ๋„ŒํŠธ ์ตœ์ ํ™”๋ฅผ ์œ„ํ•ด useMemo์™€ useCallback์„ ์ ์ ˆํžˆ ์‚ฌ์šฉํ•ด์•ผ ํ•จ. ํŠนํžˆ props ๋ณ€๊ฒฝ์ด ์žฆ์€ ์ปดํฌ๋„ŒํŠธ์—์„œ๋Š” React.memo์™€ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๋ฉด ํšจ๊ณผ์ ",
  "project": "frontend-optimization",
  "tags": ["React", "์„ฑ๋Šฅ์ตœ์ ํ™”", "useMemo", "useCallback"],
  "importance_score": 8,
  "work_type": "memory"
}

ํ• ์ผ ์ถ”๊ฐ€ ๋ฐ ๊ด€๋ฆฌ

{
  "operation": "add",
  "content": "API ์‘๋‹ต ์‹œ๊ฐ„ ๊ฐœ์„ ์„ ์œ„ํ•œ ์บ์‹ฑ ์ „๋žต ๊ตฌํ˜„",
  "project": "backend-optimization",
  "tags": ["์บ์‹ฑ", "์„ฑ๋Šฅ", "API"],
  "importance_score": 9,
  "work_type": "todo",
  "worked": "๋ฏธ์™„๋ฃŒ",
  "requirements": "Redis ์บ์‹ฑ ๋ ˆ์ด์–ด ๊ตฌํ˜„, TTL ์„ค์ •, ์บ์‹œ ๋ฌดํšจํ™” ์ „๋žต ์ˆ˜๋ฆฝ"
}

๊ณ ๊ธ‰ ๊ฒ€์ƒ‰ ํ™œ์šฉ

{
  "operation": "search",
  "query": "React ์„ฑ๋Šฅ ์ตœ์ ํ™”",
  "project": "frontend-optimization",
  "importance_min": 7,
  "highlight_matches": true,
  "include_content": true
}

์„ธ์…˜ ๊ธฐ๋ฐ˜ ์ž‘์—…

// ์ƒˆ ํ”„๋กœ์ ํŠธ ์„ธ์…˜ ์ƒ์„ฑ
{
  "operation": "create",
  "session_name": "๋ชจ๋ฐ”์ผ ์•ฑ ๋ฆฌํŒฉํ† ๋ง",
  "description": "๊ธฐ์กด ๋ชจ๋ฐ”์ผ ์•ฑ์˜ ์„ฑ๋Šฅ ๊ฐœ์„  ๋ฐ ์ฝ”๋“œ ๊ตฌ์กฐ ๊ฐœ์„  ํ”„๋กœ์ ํŠธ"
}

// ์„ธ์…˜์— ์—ฐ๊ฒฐ๋œ ์ž‘์—… ๊ธฐ์–ต ์ถ”๊ฐ€
{
  "operation": "add",
  "content": "๋ชจ๋ฐ”์ผ ์•ฑ ์„ฑ๋Šฅ ๋ณ‘๋ชฉ ์ง€์  ๋ถ„์„ ์™„๋ฃŒ. ์ฃผ์š” ๋ฌธ์ œ๋Š” ์ด๋ฏธ์ง€ ๋กœ๋”ฉ๊ณผ ์ƒํƒœ ๊ด€๋ฆฌ ์ตœ์ ํ™” ํ•„์š”",
  "project": "๋ชจ๋ฐ”์ผ ์•ฑ ๋ฆฌํŒฉํ† ๋ง",
  "auto_link": true
}

์‹œ์Šคํ…œ ๊ด€๋ฆฌ ๋ฐ ์ตœ์ ํ™”

// ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ตœ์ ํ™”
{
  "operation": "optimize",
  "vacuum_type": "incremental",
  "analyze": true
}

// ๋‚ฎ์€ ์ค‘์š”๋„ ์ž‘์—… ์ •๋ฆฌ
{
  "operation": "delete",
  "category": "work_memories",
  "delete_criteria": {
    "max_importance_score": 3,
    "older_than_days": 30
  },
  "archive_only": true
}

ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ

work-memory-mcp/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ database/          # ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๊ด€๋ จ (SQLite, ์Šคํ‚ค๋งˆ, ์—ฐ๊ฒฐ)
โ”‚   โ”œโ”€โ”€ tools/            # MCP ๋„๊ตฌ ๊ตฌํ˜„ (5๊ฐœ ํ†ตํ•ฉ ๋„๊ตฌ)
โ”‚   โ”‚   โ”œโ”€โ”€ memory.ts     # ๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ ๋„๊ตฌ
โ”‚   โ”‚   โ”œโ”€โ”€ search.ts     # ๊ฒ€์ƒ‰ ๋ฐ ๋ถ„์„ ๋„๊ตฌ
โ”‚   โ”‚   โ”œโ”€โ”€ session.ts    # ์„ธ์…˜ ๊ด€๋ฆฌ ๋„๊ตฌ
โ”‚   โ”‚   โ”œโ”€โ”€ history.ts    # ์ด๋ ฅ ๊ด€๋ฆฌ ๋„๊ตฌ
โ”‚   โ”‚   โ””โ”€โ”€ system.ts     # ์‹œ์Šคํ…œ ๊ด€๋ฆฌ ๋„๊ตฌ
โ”‚   โ”œโ”€โ”€ utils/            # ์œ ํ‹ธ๋ฆฌํ‹ฐ ํ•จ์ˆ˜
โ”‚   โ”œโ”€โ”€ types/            # TypeScript ํƒ€์ž… ์ •์˜
โ”‚   โ”œโ”€โ”€ session/          # ์„ธ์…˜ ๊ด€๋ฆฌ ๋ฐ ์ข…๋ฃŒ ์ฒ˜๋ฆฌ
โ”‚   โ”œโ”€โ”€ progress/         # ์ง„ํ–‰๋ฅ  ์ถ”์  ์‹œ์Šคํ…œ
โ”‚   โ””โ”€โ”€ index.ts          # ์„œ๋ฒ„ ์—”ํŠธ๋ฆฌ ํฌ์ธํŠธ
โ”œโ”€โ”€ tests/               # ํ…Œ์ŠคํŠธ ํŒŒ์ผ
โ”œโ”€โ”€ docs/                # ๋ฌธ์„œ
โ”œโ”€โ”€ dist/                # ๋นŒ๋“œ ๊ฒฐ๊ณผ๋ฌผ
โ””โ”€โ”€ work_memory/         # ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ํŒŒ์ผ ์ €์žฅ ๋””๋ ‰ํ† ๋ฆฌ

๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๊ตฌ์กฐ

Work Memory MCP๋Š” SQLite๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ํ…Œ์ด๋ธ” ๊ตฌ์กฐ๋ฅผ ๊ฐ€์ง‘๋‹ˆ๋‹ค:

work_memories ํ…Œ์ด๋ธ”

  • ๋ชจ๋“  ์ž‘์—… ๊ธฐ์–ต์˜ ๋ฉ”์ธ ๋ฐ์ดํ„ฐ ์ €์žฅ
  • ๋‚ด์šฉ, ํ”„๋กœ์ ํŠธ, ํƒœ๊ทธ, ์ค‘์š”๋„, ์ž‘์—… ์œ ํ˜• ๋“ฑ

sessions ํ…Œ์ด๋ธ”

  • ํ”„๋กœ์ ํŠธ ์„ธ์…˜ ์ •๋ณด ๊ด€๋ฆฌ
  • ์„ธ์…˜๋ณ„ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ ๋ฐ ํ™œ๋™ ํ†ต๊ณ„

work_memory_history ํ…Œ์ด๋ธ”

  • ์ž‘์—… ๊ธฐ์–ต ๋ณ€๊ฒฝ ์ด๋ ฅ ์ถ”์ 
  • ๋ฒ„์ „ ๊ด€๋ฆฌ ๋ฐ ๋ณต์› ์ง€์›

search_keywords ํ…Œ์ด๋ธ”

  • ๊ฒ€์ƒ‰ ์ตœ์ ํ™”๋ฅผ ์œ„ํ•œ ํ‚ค์›Œ๋“œ ์ธ๋ฑ์Šค
  • ์ „๋ฌธ ๊ฒ€์ƒ‰ ์„ฑ๋Šฅ ํ–ฅ์ƒ

project_index ํ…Œ์ด๋ธ”

  • ํ”„๋กœ์ ํŠธ๋ณ„ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ ๊ด€๋ฆฌ
  • ํ”„๋กœ์ ํŠธ ํ†ต๊ณ„ ๋ฐ ๋ถ„์„

์„ฑ๋Šฅ ๋ฐ ์ตœ์ ํ™”

๊ฒ€์ƒ‰ ์„ฑ๋Šฅ

  • 16๊ฐœ์˜ ๋ณตํ•ฉ ์ธ๋ฑ์Šค๋ฅผ ํ†ตํ•œ ๋น ๋ฅธ ๊ฒ€์ƒ‰
  • ํ‚ค์›Œ๋“œ ๊ฐ€์ค‘์น˜ ์‹œ์Šคํ…œ์œผ๋กœ ์ •ํ™•๋„ ํ–ฅ์ƒ
  • LRU ์บ์‹œ๋ฅผ ํ†ตํ•œ ๋ฐ˜๋ณต ๊ฒ€์ƒ‰ ์ตœ์ ํ™”

๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ

  • ์ตœ๋Œ€ 500๊ฐœ ์—”ํŠธ๋ฆฌ, 50MB ์ œํ•œ์˜ LRU ์บ์‹œ (ํ•˜๋“œ์ฝ”๋”ฉ)
  • ์ž๋™ ๋ฉ”๋ชจ๋ฆฌ ์ •๋ฆฌ ์‹œ์Šคํ…œ
  • ๋Œ€์šฉ๋Ÿ‰ ์ž‘์—… ์‹œ ์ง„ํ–‰๋ฅ  ์ถ”์ 

๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ตœ์ ํ™”

  • ์ž๋™ VACUUM ๋ฐ ANALYZE ์‹คํ–‰
  • ์ธ๋ฑ์Šค ์ปค๋ฒ„๋ฆฌ์ง€ ๋ถ„์„ ๋ฐ ์ตœ์ ํ™”
  • ํŠธ๋žœ์žญ์…˜ ๊ธฐ๋ฐ˜ ์›์ž์  ์ž‘์—… ๋ณด์žฅ

๋ณด์•ˆ ๋ฐ ์•ˆ์ „์„ฑ

๋ฐ์ดํ„ฐ ๋ณด์•ˆ

  • ๋กœ์ปฌ SQLite ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋กœ ์™ธ๋ถ€ ์œ ์ถœ ๋ฐฉ์ง€
  • ์ž…๋ ฅ ๊ฒ€์ฆ์„ ํ†ตํ•œ SQL ์ธ์ ์…˜ ๋ฐฉ์ง€
  • ์•ˆ์ „ํ•œ ํŒŒ์ผ ์‹œ์Šคํ…œ ์ ‘๊ทผ ์ œ์–ด

๋ฐ์ดํ„ฐ ๋ฌด๊ฒฐ์„ฑ

  • ํŠธ๋žœ์žญ์…˜ ๊ธฐ๋ฐ˜ ์›์ž์  ์ž‘์—…
  • ์ž๋™ ๋ฐฑ์—… ๋ฐ ๋ณต๊ตฌ ์‹œ์Šคํ…œ
  • ๋ฐ์ดํ„ฐ ์†์ƒ ๊ฐ์ง€ ๋ฐ ๋ณต๊ตฌ

ํ”„๋กœํ† ์ฝœ ์ค€์ˆ˜

  • MCP ํ‘œ์ค€ ํ”„๋กœํ† ์ฝœ ์™„์ „ ์ค€์ˆ˜
  • JSON-RPC ํ˜ธํ™˜์„ฑ ๋ณด์žฅ
  • stdout ๋ณดํ˜ธ๋ฅผ ํ†ตํ•œ ํ†ต์‹  ์•ˆ์ •์„ฑ

๊ฐœ๋ฐœ ํ™˜๊ฒฝ

๊ฐœ๋ฐœ ๋ชจ๋“œ ์‹คํ–‰

npm run dev

ํ…Œ์ŠคํŠธ ์‹คํ–‰

# ์ „์ฒด ํ…Œ์ŠคํŠธ
npm test

# ๋‹จ์œ„ ํ…Œ์ŠคํŠธ
npm run test:unit

# ํ†ตํ•ฉ ํ…Œ์ŠคํŠธ
npm run test:integration

# ์„ฑ๋Šฅ ํ…Œ์ŠคํŠธ
npm run test:performance

# ์ปค๋ฒ„๋ฆฌ์ง€ ํ…Œ์ŠคํŠธ
npm run test:coverage

์ฝ”๋“œ ํ’ˆ์งˆ ๊ด€๋ฆฌ

# ๋ฆฐํŠธ ๊ฒ€์‚ฌ
npm run lint

# ๋ฆฐํŠธ ์ž๋™ ์ˆ˜์ •
npm run lint:fix

๋ฌธ์ œ ํ•ด๊ฒฐ

์ผ๋ฐ˜์ ์ธ ๋ฌธ์ œ

MCP ์„œ๋ฒ„ ์—ฐ๊ฒฐ ์‹คํŒจ

# 1. ์„œ๋ฒ„ ์žฌ์‹œ์ž‘
npm run build && npm start

# 2. Claude Desktop ์žฌ์‹œ์ž‘
# 3. ์„ค์ • ํŒŒ์ผ ๊ฒฝ๋กœ ํ™•์ธ

๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์„ฑ๋Šฅ ์ €ํ•˜

{
  "operation": "optimize",
  "vacuum_type": "full",
  "analyze": true
}

๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰ ์ฆ๊ฐ€

{
  "operation": "delete",
  "category": "work_memories",
  "delete_criteria": {
    "max_importance_score": 2,
    "older_than_days": 60
  },
  "archive_only": true
}

๋””๋ฒ„๊น… ๋ชจ๋“œ

ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•˜์—ฌ ์ƒ์„ธํ•œ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

LOG_LEVEL=debug npm start

๋ผ์ด์„ ์Šค

MIT License - ์ž์„ธํ•œ ๋‚ด์šฉ์€ LICENSE ํŒŒ์ผ์„ ์ฐธ์กฐํ•˜์„ธ์š”.

๊ธฐ์—ฌํ•˜๊ธฐ

  1. ํ”„๋กœ์ ํŠธ ํฌํฌ
  2. ๊ธฐ๋Šฅ ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ (git checkout -b feature/์ƒˆ๊ธฐ๋Šฅ)
  3. ๋ณ€๊ฒฝ์‚ฌํ•ญ ์ปค๋ฐ‹ (git commit -am '์ƒˆ ๊ธฐ๋Šฅ ์ถ”๊ฐ€')
  4. ๋ธŒ๋žœ์น˜์— ํ‘ธ์‹œ (git push origin feature/์ƒˆ๊ธฐ๋Šฅ)
  5. Pull Request ์ƒ์„ฑ

์ง€์› ๋ฐ ๋ฌธ์˜

โ˜• ํ›„์›ํ•˜๊ธฐ

์ด ํ”„๋กœ์ ํŠธ๊ฐ€ ๋„์›€์ด ๋˜์…จ๋‹ค๋ฉด, ์ปคํ”ผ ํ•œ ์ž”์œผ๋กœ ์‘์›ํ•ด์ฃผ์„ธ์š”: https://coff.ee/moontmsai
์—ฌ๋Ÿฌ๋ถ„์˜ ํ›„์›์ด ์ง€์†์ ์ธ ์˜คํ”ˆ์†Œ์Šค ๊ฐœ๋ฐœ์— ํฐ ํž˜์ด ๋ฉ๋‹ˆ๋‹ค. Buy Me A Coffee

Work Memory MCP๋ฅผ ์‚ฌ์šฉํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ๋” ๋‚˜์€ AI ํ˜‘์—… ํ™˜๊ฒฝ์„ ๋งŒ๋“ค์–ด๊ฐ€๋Š” ๋ฐ ํ•จ๊ป˜ํ•ด์ฃผ์„ธ์š”!