Work Memory MCP Server

by moontmsai

Not rated
GitHub

About

Manages work memories and shares context between AI tools using a local SQLite database.

Details

Author
moontmsai
Categories
Productivity, AI, Other, Knowledge Base

Claude Desktop Configuration (or cursor.ai)

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

%APPDATA%\Claude\claude_desktop_config.json
~/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" } } } }

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

- 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

# 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
# 1. Server restart npm run build && npm start # 2. Claude Desktop restart # 3. Check configuration file path
{ "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 }

You can check detailed logs by setting environment variables:

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

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) 구분 관리
- 완료 상태 추적을 통한 작업 진행률 관리

- 프로젝트별 독립적인 작업 세션 생성
- 세션 컨텍스트 자동 감지 및 연결
- 세션별 작업 기억 연동 및 추적
- 세션 생명주기 관리 (생성, 활성화, 종료)

- 키워드 기반 전문 검색
- 프로젝트, 중요도, 세션별 필터링
- 연관 키워드 추천 시스템
- 검색 결과 하이라이트 및 컨텍스트 제공
- 검색 성능 최적화 및 통계 제공

Manages work memories and shares context between AI tools using a local SQLite database.

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.

- 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

- 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.

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

- 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.

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

- 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.

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

- 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.

- 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

- 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

Claude Desktop Configuration (or cursor.ai)

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

%APPDATA%\Claude\claude_desktop_config.json
~/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" } } } }

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

- 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

# 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
# 1. Server restart npm run build && npm start # 2. Claude Desktop restart # 3. Check configuration file path
{ "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 }

You can check detailed logs by setting environment variables:

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

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) 구분 관리
- 완료 상태 추적을 통한 작업 진행률 관리

- 프로젝트별 독립적인 작업 세션 생성
- 세션 컨텍스트 자동 감지 및 연결
- 세션별 작업 기억 연동 및 추적
- 세션 생명주기 관리 (생성, 활성화, 종료)

- 키워드 기반 전문 검색
- 프로젝트, 중요도, 세션별 필터링
- 연관 키워드 추천 시스템
- 검색 결과 하이라이트 및 컨텍스트 제공
- 검색 성능 최적화 및 통계 제공

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.