An integrated MCP (Model Context Protocol) server for managing work memories and sharing context between AI tools.
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.
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.
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.
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.
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.
- 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
- 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)
- 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
- Track all work memory change history
- Previous state restoration through version management system
- Change comparison and analysis
- Automatic backup and recovery features
- Database performance monitoring
- Automatic index management and optimization
- Memory usage tracking
- Batch operation processing system
- Safe data cleanup features
Work Memory MCP consists of 5 integrated tools:
Core tool responsible for creating, modifying, querying, and deleting work memories.
Key Functions:
add
: Add new work memoryupdate
: Modify existing work memorylist
: 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)
Tool for efficiently finding and analyzing stored work memories.
Key Functions:
search
: Keyword-based searchkeywords
: Related keyword analysisstats
: Search system statisticsoptimize
: Search index optimization
Search Features:
- Full-text search
- Multi-condition filtering
- Importance-based sorting
- Search result highlighting
- Related keyword recommendations
- Search performance statistics
Tool for managing project-specific work sessions.
Key Functions:
create
: Create new sessionactivate
: Activate sessiondeactivate
: Deactivate sessionlist
: Query session liststatus
: Check current session statusdetect
: 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
Tool for managing change history and versions of work memories.
Key Functions:
changes
: Query change historyversions
: Query version listrestore
: Restore previous versionlist_versions
: Full version history
Version Management Features:
- Automatic version creation
- Detailed change tracking
- Version comparison functionality
- Selective restoration capability
- Version cleanup and optimization
Tool responsible for server status monitoring and system optimization.
Key Functions:
status
: Query server statusmonitor
: Real-time monitoringoptimize
: Database optimizationbatch
: Batch operation processingdelete
: Category-based data cleanupdiagnose
: System diagnosisanalyze
: Detailed analysisrepair
: Automatic recovery
System Management Features:
- Real-time performance monitoring
- Automatic index management
- Memory usage tracking
- Database optimization
- Safe data cleanup
- System health diagnosis
- Node.js 18.0.0 or higher
- npm 8.0.0 or higher
- Operating System: Windows, macOS, Linux
git clone https://github.com/your-repo/work-memory-mcp.git
cd work-memory-mcp
npm install
npm run build
npm start
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"
}
}
}
}
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.
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.
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
{
"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"
}
{
"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"
}
{
"operation": "search",
"query": "React performance optimization",
"project": "frontend-optimization",
"importance_min": 7,
"highlight_matches": true,
"include_content": true
}
// 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
}
// 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
}
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
Work Memory MCP uses SQLite with the following table structure:
- Stores main data for all work memories
- Content, projects, tags, importance, work types, etc.
- Manages project session information
- Session metadata and activity statistics
- Tracks work memory change history
- Version management and restoration support
- Keyword index for search optimization
- Full-text search performance enhancement
- Project-specific metadata management
- Project statistics and analysis
- Fast search through 16 composite indexes
- Accuracy improvement through keyword weighting system
- Repeated search optimization through LRU cache
- LRU cache with maximum 500 entries, 50MB limit (hardcoded)
- Automatic memory cleanup system
- Progress tracking for large operations
- Automatic VACUUM and ANALYZE execution
- Index coverage analysis and optimization
- Atomic operation guarantee through transactions
- Prevent external leakage through local SQLite database
- SQL injection prevention through input validation
- Safe file system access control
- Atomic operations through transactions
- Automatic backup and recovery system
- Data corruption detection and recovery
- Full compliance with MCP standard protocol
- JSON-RPC compatibility guarantee
- Communication stability through stdout protection
npm run dev
# 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
# Lint check
npm run lint
# Automatic lint fix
npm run lint:fix
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
}
You can check detailed logs by setting environment variables:
LOG_LEVEL=debug npm start
MIT License - See LICENSE file for details.
- Fork the project
- Create feature branch (
git checkout -b feature/new-feature
) - Commit changes (
git commit -am 'Add new feature'
) - Push to branch (
git push origin feature/new-feature
) - Create Pull Request
- Email: [email protected]
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.
Thank you for using Work Memory MCP. Let's work together to create a better AI collaboration environment!
์ ๋ฌด ์์ ๊ธฐ์ต์ ๊ด๋ฆฌํ๊ณ AI ๋๊ตฌ ๊ฐ์ ์ปจํ ์คํธ๋ฅผ ๊ณต์ ํ๊ธฐ ์ํ ํตํฉ MCP (Model Context Protocol) ์๋ฒ์ ๋๋ค.
Work Memory MCP๋ ๊ฐ๋ฐ์์ ์ง์ ์์ ์๊ฐ ์ฌ๋ฌ AI ๋๊ตฌ(Claude, Cursor AI ๋ฑ)๋ฅผ ์ฌ์ฉํ๋ฉด์ ์ผ๊ด๋ ์์ ์ปจํ ์คํธ๋ฅผ ์ ์งํ ์ ์๋๋ก ๋์์ฃผ๋ ๋ฉ๋ชจ๋ฆฌ ๊ด๋ฆฌ ์์คํ ์ ๋๋ค. ๊ฐ๊ฐ์ AI ๋ํ ์ธ์ ์์ ์ถ์ ๋ ์ง์๊ณผ ์์ ์งํ ์ํฉ์ ์ฒด๊ณ์ ์ผ๋ก ๊ด๋ฆฌํ์ฌ, ์ฐ์์ ์ด๊ณ ํจ์จ์ ์ธ ์์ ํ๊ฒฝ์ ์ ๊ณตํฉ๋๋ค.
AI์์ ๋ํ๋ ์ธ์ ์ด ๋๋๋ฉด ์ฌ๋ผ์ง์ง๋ง, ์ค์ํ ์์ ๋ด์ฉ๊ณผ ๊ฒฐ๊ณผ๋ฌผ์ ์๊ตฌ์ ์ผ๋ก ๋ณด์กด๋์ด์ผ ํฉ๋๋ค. Work Memory MCP๋ ๋ชจ๋ ์ค์ํ ์์ ๊ธฐ์ต์ SQLite ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์์ ํ๊ฒ ์ ์ฅํ์ฌ ์ธ์ ๋ ์ง ์ ๊ทผํ ์ ์๋๋ก ํฉ๋๋ค.
์ฌ๋ฌ AI ๋๊ตฌ๋ฅผ ์ฌ์ฉํ๋๋ผ๋ ๋์ผํ ์์ ์ปจํ ์คํธ๋ฅผ ๊ณต์ ํ ์ ์์ต๋๋ค. Claude Desktop์์ ์์ํ ์์ ์ Cursor AI์์ ์ด์ด๋ฐ๊ฑฐ๋, ๋ค๋ฅธ ๋๊ตฌ์์ ์ฐธ์กฐํ ์ ์๋ ์ผ๊ด๋ ์์ ํ๊ฒฝ์ ์ ๊ณตํฉ๋๋ค.
์ด๋ฏธ ํด๊ฒฐํ ๋ฌธ์ ๋ ์ ๋ฆฌํ ์ ๋ณด๋ฅผ ๋ฐ๋ณต์ ์ผ๋ก ์ค๋ช ํ ํ์๊ฐ ์์ต๋๋ค. ๊ณ ๊ธ ๊ฒ์ ์์คํ ์ ํตํด ๊ณผ๊ฑฐ์ ์์ ๋ด์ฉ์ ๋น ๋ฅด๊ฒ ์ฐพ์ ์ฌํ์ฉํ ์ ์์ด, ์์ ํจ์จ์ฑ์ด ํฌ๊ฒ ํฅ์๋ฉ๋๋ค.
๋ฌด์์๋ก ํฉ์ด์ง ์ ๋ณด๊ฐ ์๋, ํ๋ก์ ํธ๋ณ, ์ค์๋๋ณ, ํ๊ทธ๋ณ๋ก ์ฒด๊ณ์ ์ผ๋ก ์ ๋ฆฌ๋ ์ง์ ๋ฒ ์ด์ค๋ฅผ ๊ตฌ์ถํ ์ ์์ต๋๋ค. ์ธ์ ๊ธฐ๋ฐ ๊ด๋ฆฌ๋ฅผ ํตํด ๊ฐ ํ๋ก์ ํธ์ ์ปจํ ์คํธ๋ฅผ ๋ช ํํ๊ฒ ๋ถ๋ฆฌํ์ฌ ๊ด๋ฆฌํฉ๋๋ค.
- ์์ ๋ด์ฉ, ๊ฒฐ๊ณผ๋ฌผ, ํ์ตํ ๋ด์ฉ์ ๊ตฌ์กฐํ๋ ํํ๋ก ์ ์ฅ
- ์ค์๋ ์ ์(0-100์ )๋ฅผ ํตํ ์ฐ์ ์์ ๊ด๋ฆฌ
- ํ๊ทธ ์์คํ ์ผ๋ก ๋ค์ฐจ์์ ๋ถ๋ฅ
- ํ ์ผ(Todo)๊ณผ ์ผ๋ฐ ๋ฉ๋ชจ๋ฆฌ(Memory) ๊ตฌ๋ถ ๊ด๋ฆฌ
- ์๋ฃ ์ํ ์ถ์ ์ ํตํ ์์ ์งํ๋ฅ ๊ด๋ฆฌ
- ํ๋ก์ ํธ๋ณ ๋ ๋ฆฝ์ ์ธ ์์ ์ธ์ ์์ฑ
- ์ธ์ ์ปจํ ์คํธ ์๋ ๊ฐ์ง ๋ฐ ์ฐ๊ฒฐ
- ์ธ์ ๋ณ ์์ ๊ธฐ์ต ์ฐ๋ ๋ฐ ์ถ์
- ์ธ์ ์๋ช ์ฃผ๊ธฐ ๊ด๋ฆฌ (์์ฑ, ํ์ฑํ, ์ข ๋ฃ)
- ํค์๋ ๊ธฐ๋ฐ ์ ๋ฌธ ๊ฒ์
- ํ๋ก์ ํธ, ์ค์๋, ์ธ์ ๋ณ ํํฐ๋ง
- ์ฐ๊ด ํค์๋ ์ถ์ฒ ์์คํ
- ๊ฒ์ ๊ฒฐ๊ณผ ํ์ด๋ผ์ดํธ ๋ฐ ์ปจํ ์คํธ ์ ๊ณต
- ๊ฒ์ ์ฑ๋ฅ ์ต์ ํ ๋ฐ ํต๊ณ ์ ๊ณต
- ๋ชจ๋ ์์ ๊ธฐ์ต ๋ณ๊ฒฝ ์ด๋ ฅ ์ถ์
- ๋ฒ์ ๊ด๋ฆฌ ์์คํ ์ ํตํ ์ด์ ์ํ ๋ณต์
- ๋ณ๊ฒฝ ์ฌํญ ๋น๊ต ๋ฐ ๋ถ์
- ์๋ ๋ฐฑ์ ๋ฐ ๋ณต๊ตฌ ๊ธฐ๋ฅ
- ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ฑ๋ฅ ๋ชจ๋ํฐ๋ง
- ์๋ ์ธ๋ฑ์ค ๊ด๋ฆฌ ๋ฐ ์ต์ ํ
- ๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ๋ ์ถ์
- ์ผ๊ด ์์ ์ฒ๋ฆฌ ์์คํ
- ์์ ํ ๋ฐ์ดํฐ ์ ๋ฆฌ ๊ธฐ๋ฅ
Work Memory MCP๋ 5๊ฐ์ ํตํฉ ๋๊ตฌ๋ก ๊ตฌ์ฑ๋์ด ์์ต๋๋ค:
์์ ๊ธฐ์ต์ ์์ฑ, ์์ , ์กฐํ, ์ญ์ ๋ฅผ ๋ด๋นํ๋ ํต์ฌ ๋๊ตฌ์ ๋๋ค.
์ฃผ์ ๊ธฐ๋ฅ:
add
: ์๋ก์ด ์์ ๊ธฐ์ต ์ถ๊ฐupdate
: ๊ธฐ์กด ์์ ๊ธฐ์ต ์์ list
: ์์ ๊ธฐ์ต ๋ชฉ๋ก ์กฐํ (ํํฐ๋ง ๋ฐ ํ์ด์ง ์ง์)delete
: ์์ ๊ธฐ์ต ์ญ์ ๋๋ ์์นด์ด๋ธ
์ง์ํ๋ ๋ฐ์ดํฐ ์ ํ:
- ์ผ๋ฐ ๋ฉ๋ชจ๋ฆฌ: ํ์ต ๋ด์ฉ, ์์ด๋์ด, ์ฐธ๊ณ ์๋ฃ
- ํ ์ผ: ์ํํด์ผ ํ ์์ ๊ณผ ์งํ ์ํ
- ํ๋ก์ ํธ๋ณ ๋ถ๋ฅ
- ํ๊ทธ ๊ธฐ๋ฐ ๋ค์ฐจ์ ๋ถ๋ฅ
- ์ค์๋ ์ ์ (0-100์ )
์ ์ฅ๋ ์์ ๊ธฐ์ต์ ํจ์จ์ ์ผ๋ก ์ฐพ๊ณ ๋ถ์ํ๋ ๋๊ตฌ์ ๋๋ค.
์ฃผ์ ๊ธฐ๋ฅ:
search
: ํค์๋ ๊ธฐ๋ฐ ๊ฒ์keywords
: ์ฐ๊ด ํค์๋ ๋ถ์stats
: ๊ฒ์ ์์คํ ํต๊ณoptimize
: ๊ฒ์ ์ธ๋ฑ์ค ์ต์ ํ
๊ฒ์ ๊ธฐ๋ฅ:
- ์ ๋ฌธ ํ ์คํธ ๊ฒ์
- ๋ค์ค ์กฐ๊ฑด ํํฐ๋ง
- ์ค์๋๋ณ ์ ๋ ฌ
- ๊ฒ์ ๊ฒฐ๊ณผ ํ์ด๋ผ์ดํธ
- ์ฐ๊ด ํค์๋ ์ถ์ฒ
- ๊ฒ์ ์ฑ๋ฅ ํต๊ณ
ํ๋ก์ ํธ๋ณ ์์ ์ธ์ ์ ๊ด๋ฆฌํ๋ ๋๊ตฌ์ ๋๋ค.
์ฃผ์ ๊ธฐ๋ฅ:
create
: ์ ์ธ์ ์์ฑactivate
: ์ธ์ ํ์ฑํdeactivate
: ์ธ์ ๋นํ์ฑํlist
: ์ธ์ ๋ชฉ๋ก ์กฐํstatus
: ํ์ฌ ์ธ์ ์ํ ํ์ธdetect
: ์๋ ์ธ์ ๊ฐ์ง
์ธ์ ๊ด๋ฆฌ ํน์ง:
- ํ๋ก์ ํธ๋ณ ๋ ๋ฆฝ์ ์ธ ์์ ๊ณต๊ฐ
- ์๋ ์ธ์ ๊ฐ์ง ๋ฐ ์ฐ๊ฒฐ
- ์ธ์ ๋ณ ์์ ๊ธฐ์ต ์ฐ๋
- ๋ ์ ์ธ์ ๋ชจ๋ (30๋ถ ๋์ ์ ์ง)
- ์ธ์ ํต๊ณ ๋ฐ ํ๋ ์ถ์
์์ ๊ธฐ์ต์ ๋ณ๊ฒฝ ์ด๋ ฅ๊ณผ ๋ฒ์ ์ ๊ด๋ฆฌํ๋ ๋๊ตฌ์ ๋๋ค.
์ฃผ์ ๊ธฐ๋ฅ:
changes
: ๋ณ๊ฒฝ ์ด๋ ฅ ์กฐํversions
: ๋ฒ์ ๋ชฉ๋ก ์กฐํrestore
: ์ด์ ๋ฒ์ ๋ณต์list_versions
: ์ ์ฒด ๋ฒ์ ์ด๋ ฅ
๋ฒ์ ๊ด๋ฆฌ ํน์ง:
- ์๋ ๋ฒ์ ์์ฑ
- ๋ณ๊ฒฝ ์ฌํญ ์์ธ ์ถ์
- ๋ฒ์ ๊ฐ ๋น๊ต ๊ธฐ๋ฅ
- ์ ํ์ ๋ณต์ ๊ธฐ๋ฅ
- ๋ฒ์ ์ ๋ฆฌ ๋ฐ ์ต์ ํ
์๋ฒ ์ํ ๋ชจ๋ํฐ๋ง๊ณผ ์์คํ ์ต์ ํ๋ฅผ ๋ด๋นํ๋ ๋๊ตฌ์ ๋๋ค.
์ฃผ์ ๊ธฐ๋ฅ:
status
: ์๋ฒ ์ํ ์กฐํmonitor
: ์ค์๊ฐ ๋ชจ๋ํฐ๋งoptimize
: ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ต์ ํbatch
: ์ผ๊ด ์์ ์ฒ๋ฆฌdelete
: ์นดํ ๊ณ ๋ฆฌ๋ณ ๋ฐ์ดํฐ ์ ๋ฆฌdiagnose
: ์์คํ ์ง๋จanalyze
: ์์ธ ๋ถ์repair
: ์๋ ๋ณต๊ตฌ
์์คํ ๊ด๋ฆฌ ํน์ง:
- ์ค์๊ฐ ์ฑ๋ฅ ๋ชจ๋ํฐ๋ง
- ์๋ ์ธ๋ฑ์ค ๊ด๋ฆฌ
- ๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ๋ ์ถ์
- ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ต์ ํ
- ์์ ํ ๋ฐ์ดํฐ ์ ๋ฆฌ
- ์์คํ ๊ฑด๊ฐ ์ํ ์ง๋จ
- Node.js 18.0.0 ์ด์
- npm 8.0.0 ์ด์
- ์ด์์ฒด์ : Windows, macOS, Linux
git clone https://github.com/your-repo/work-memory-mcp.git
cd work-memory-mcp
npm install
npm run build
npm start
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์์ ์ฌ์ฉํ๋ ค๋ฉด 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๋ฅผ ์ฌ์ฉํ์ฌ ๋ค์๊ณผ ๊ฐ์ ํ ์ด๋ธ ๊ตฌ์กฐ๋ฅผ ๊ฐ์ง๋๋ค:
- ๋ชจ๋ ์์ ๊ธฐ์ต์ ๋ฉ์ธ ๋ฐ์ดํฐ ์ ์ฅ
- ๋ด์ฉ, ํ๋ก์ ํธ, ํ๊ทธ, ์ค์๋, ์์ ์ ํ ๋ฑ
- ํ๋ก์ ํธ ์ธ์ ์ ๋ณด ๊ด๋ฆฌ
- ์ธ์ ๋ณ ๋ฉํ๋ฐ์ดํฐ ๋ฐ ํ๋ ํต๊ณ
- ์์ ๊ธฐ์ต ๋ณ๊ฒฝ ์ด๋ ฅ ์ถ์
- ๋ฒ์ ๊ด๋ฆฌ ๋ฐ ๋ณต์ ์ง์
- ๊ฒ์ ์ต์ ํ๋ฅผ ์ํ ํค์๋ ์ธ๋ฑ์ค
- ์ ๋ฌธ ๊ฒ์ ์ฑ๋ฅ ํฅ์
- ํ๋ก์ ํธ๋ณ ๋ฉํ๋ฐ์ดํฐ ๊ด๋ฆฌ
- ํ๋ก์ ํธ ํต๊ณ ๋ฐ ๋ถ์
- 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 ํ์ผ์ ์ฐธ์กฐํ์ธ์.
- ํ๋ก์ ํธ ํฌํฌ
- ๊ธฐ๋ฅ ๋ธ๋์น ์์ฑ (
git checkout -b feature/์๊ธฐ๋ฅ
) - ๋ณ๊ฒฝ์ฌํญ ์ปค๋ฐ (
git commit -am '์ ๊ธฐ๋ฅ ์ถ๊ฐ'
) - ๋ธ๋์น์ ํธ์ (
git push origin feature/์๊ธฐ๋ฅ
) - Pull Request ์์ฑ
- ์ด๋ฉ์ผ: [email protected]
์ด ํ๋ก์ ํธ๊ฐ ๋์์ด ๋์
จ๋ค๋ฉด, ์ปคํผ ํ ์์ผ๋ก ์์ํด์ฃผ์ธ์: https://coff.ee/moontmsai
์ฌ๋ฌ๋ถ์ ํ์์ด ์ง์์ ์ธ ์คํ์์ค ๊ฐ๋ฐ์ ํฐ ํ์ด ๋ฉ๋๋ค.
Work Memory MCP๋ฅผ ์ฌ์ฉํด์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค. ๋ ๋์ AI ํ์ ํ๊ฒฝ์ ๋ง๋ค์ด๊ฐ๋ ๋ฐ ํจ๊ปํด์ฃผ์ธ์!