Memory MCP Server 2702e111

MCP运维云端

提供方 win10ogod

运维云端 未标注 无需鉴权 社区 / 第三方 Claude DesktopClaudeCursor

一个提供动态短期和长期内存管理的模型上下文协议(MCP)服务器,支持中文语言处理。

一句话选型结论

按资料字段整理

Memory MCP Server 2702e111 属于运维云端类 MCP 服务器,传输方式未标注,无需鉴权,可直接接入 Claude Desktop、Claude、Cursor,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类运维云端 传输方式未标注 鉴权无需鉴权 部署方式本地部署
GitHub 星标 1 仓库热度,无公开仓库时显示未标注
工具数 21 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

运维云端
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量21暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

内存管理JavaScript本地部署中文处理动态记忆关键词提取时间衰减模型

安装与配置

未标注 无需鉴权
上游未给出传输方式
  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js 等运行时,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 21 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
云资源查询

查实例、存储、账单等云上资源状态。

部署与发布

把部署、重启、回滚这类操作接进对话。

监控与告警

拉取监控指标,异常时让模型帮你判断。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 21 个工具,覆盖面较广,能满足多种调用。
  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在运维云端场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Memory MCP Server 2702e111当前 21 未标注 本地部署 无 2026-05-17
lobehub 未标注 stdio · 本地进程 本地部署 有 2026-04-11
TrendRadar 未标注 stdio · 本地进程 本地部署 有 2026-04-13
Ui Tars Desktop 8a825770 未标注 stdio · 本地进程 本地部署 有 2026-05-17
ruflo 未标注 stdio · 本地进程 本地部署 有 2026-04-13
FastGPT 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

运维云端
字段来自项目仓库与公开索引,中文说明由本站标注
提供方win10ogod上游标注的维护方 win10ogod
分类运维云端本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

18.7 KB
来自项目仓库与上游目录的原文,未做删改

Memory MCP Server

A Model Context Protocol (MCP) server providing dynamic short-term and long-term memory management with Chinese language support.

Overview

This MCP server implements a sophisticated memory system extracted from the GentianAphrodite project, offering:

  • Short-term Memory: Keyword-based, time-decayed dynamic memory with relevance scoring
  • Long-term Memory: Trigger-based permanent memories with JS code execution for flexible activation
  • Chinese Language Support: Built-in jieba segmentation for optimal Chinese text processing
  • Multiple Conversations: Isolated memory spaces per conversation ID

Features

Short-term Memory

  • 🔍 Keyword Extraction: Uses TF-IDF with jieba for Chinese text
  • ⏰ Time Decay: Exponential time decay model for memory relevance
  • 📊 Relevance Scoring: Dynamic scoring based on keyword matching, time, and activation history
  • 🎲 Smart Selection: Three-tier selection (top relevant, next relevant, random flashback)
  • 🧹 Auto Cleanup: Automatic removal of old or irrelevant memories (configurable)
  • 🖼️ Image Memory: Optional image embeddings for visual similarity search

Long-term Memory

  • 🎯 Trigger Conditions: JavaScript code execution for flexible memory activation
  • 🔒 Sandboxed Execution: Using Node.js built-in vm module for secure JS code evaluation
  • 🎰 Random Recall: Serendipitous memory activation for context enrichment
  • 📝 Context Tracking: Records creation and update contexts
  • 🖼️ Multimodal Support: Images, audio, and custom embeddings

Data Optimization

  • 📉 Space Saving: 30-40% reduction in storage size
  • 🔄 Auto Deduplication: Removes duplicate keywords and images
  • ⏱️ Timestamp Normalization: Unified timestamp format (ISO 8601)
  • 🗜️ Smart Compression: Eliminates redundant attachments field

Performance & Reliability (NEW!)

  • ⚡ Query Caching: 30-50% faster searches with intelligent result caching
  • ⏱️ Timeout Protection: Prevents long-running operations from blocking the server
  • 🚦 Rate Limiting: Protects against API abuse (100 requests/minute per conversation)
  • 🛡️ Input Validation: Comprehensive sanitization and validation of all inputs
  • 📝 Structured Logging: JSON-formatted logs for easy parsing and monitoring
  • 📊 Performance Metrics: Real-time metrics collection (latency, error rates, cache hits)
  • 💚 Health Monitoring: Built-in health checks for proactive issue detection
  • 🔍 Audit Logging: Complete audit trail of all operations for compliance
  • 🔄 Graceful Shutdown: Ensures all pending writes complete before shutdown

New Features (NEW!)

  • 💾 Backup & Restore: Export and import entire memory databases
  • backup_memories: Create timestamped backups with metadata
  • restore_memories: Restore from backup with merge or overwrite modes
  • list_backups: Browse available backup files
  • delete_backup: Clean up old backups

  • 🔎 Advanced Search: Powerful search with flexible filtering

  • search_memories: Search with keywords, date ranges, score filters
  • analyze_memory_patterns: Statistical analysis and insights
  • Support for sorting by relevance, score, or timestamp
  • Search across short-term, long-term, or both memory types

  • 📈 System Monitoring: Real-time server monitoring tools

  • health_check: Get server health status and diagnostics
  • get_metrics: View performance metrics (P50/P95/P99 latency, error rates)
  • get_cache_stats: Monitor query cache hit rates

Installation```bash

Clone or download this directory

cd memory-mcp-server

Install dependencies

npm install

Make the server executable (Unix/Linux/Mac)

chmod +x src/index.js


## Usage

### With Claude Desktop

Add to your Claude Desktop configuration file:

**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json````json
{
  "mcpServers": {
    "memory": {
      "command": "node",
      "args": ["/absolute/path/to/memory-mcp-server/src/index.js"]
    }
  }
}

With Cursor or other MCP clients

Configure according to your client's MCP server setup instructions, pointing to src/index.js.

MCP Features

This server implements the full Model Context Protocol specification with:
- Tools: 13 tools for memory management
- Resources: 4 resources for system inspection
- Prompts: 4 prompt templates for common memory tasks

Available Tools

Short-term Memory Tools

add_short_term_memory

Add a new short-term memory from conversation messages.

Parameters:
- messages (array): Recent conversation messages with role and content
- conversation_id (string): Unique conversation identifier
- roleWeights (object, optional): Custom weights for different roles

Example:```json
{
"messages": [
{"role": "user", "content": "My birthday is July 17, 1990"},
{"role": "assistant", "content": "I'll remember that!"}
],
"conversation_id": "user_123",
"roleWeights": {
"user": 2.7,
"assistant": 2.0,
"system": 1.0
}
}


#### `search_short_term_memories`
Search for relevant memories based on current context.

**Parameters:**
- `recentMessages` (array): Recent messages to search against
- `conversation_id` (string): Current conversation ID
- `roleWeights` (object, optional): Role weights

**Returns:** Top relevant, next relevant, and random flashback memories

#### `delete_short_term_memories`
Delete memories matching a pattern.

**Parameters:**
- `pattern` (string): Keyword or regex pattern (e.g., "/pattern/i")
- `conversation_id` (string): Conversation ID

#### `get_memory_stats`
Get statistics about short-term memories.

#### `cleanup_memories`
Manually trigger memory cleanup (removes old/low-relevance memories).

#### `get_frequent_conversation`
Get the most frequently mentioned conversation ID.

### Long-term Memory Tools

#### `add_long_term_memory`
Add a permanent memory with a trigger condition.

**Parameters:**
- `name` (string): Unique memory name
- `prompt` (string): Memory content
- `trigger` (string): JavaScript code for activation condition
- `conversation_id` (string, optional): Conversation ID to store the memory under (defaults to "default")
- `createdContext` (string, optional): Context description
- `recentMessages` (array, optional): Auto-generate context from messages

**Trigger Examples:**```javascript
// Activate when "birthday" is mentioned
"match_keys(context.messages, ['birthday', '生日'], 'any')"

// Activate on specific date or when mentioned
"match_keys(context.messages, ['anniversary'], 'any') || (new Date().getMonth() === 6 && new Date().getDate() === 17)"

// Multiple keywords required
"match_keys_all(context.messages, ['project', 'deadline'], 'user')"

Available in trigger context:
- context.messages: Recent message array
- context.conversation_id: Current conversation ID
- context.participants: Participant information
- match_keys(messages, keywords, scope, depth): Match any keyword
- match_keys_all(messages, keywords, scope, depth): Match all keywords
- Date, Math, RegExp, JSON: Safe built-in objects

update_long_term_memory

Update an existing long-term memory.

Parameters:
- name (string): Memory name to update
- trigger (string, optional): New trigger condition
- prompt (string, optional): New content
- conversation_id (string, optional): Conversation ID that owns the memory
- updatedContext (string, optional): Update context

delete_long_term_memory

Delete a long-term memory by name.

Parameters:
- name (string): Memory name to delete
- conversation_id (string, optional): Conversation ID that owns the memory

list_long_term_memories

List all long-term memories with basic info.

Parameters:
- conversation_id (string, optional): Conversation ID to inspect (defaults to "default")

search_long_term_memories

Search and activate memories based on current context.

Parameters:
- messages (array): Recent conversation messages
- conversation_id (string): Current conversation ID
- participants (object, optional): Participant info

Returns: Activated memories (triggered) and random memories

get_memory_context

Get creation and update context of a specific memory.

Parameters:
- name (string): Memory name to inspect
- conversation_id (string, optional): Conversation ID that owns the memory

Available Resources

MCP resources allow AI to inspect the memory system state:

memory://stats/overview

System-wide overview and health status.

Returns:
- Total conversation count
- System health status
- Available features

memory://conversations/list

List all conversations with memory statistics.

Returns:
- Conversation IDs
- Short-term memory counts
- Long-term memory counts

memory://stats/conversation/{id}

Detailed statistics for a specific conversation.

Parameters:
- {id}: Conversation ID to inspect

Returns:
- Short-term memory: total, scores, age ranges
- Long-term memory: total, update counts, timestamps

memory://guide/best-practices

Comprehensive guide on using the memory system effectively.

Returns:
- Best practices for short-term and long-term memory
- Trigger condition examples
- Multimodal support guidelines
- Common usage patterns

Available Prompts

MCP prompts provide guided workflows for common tasks:

remember-user-info

Store important user information in long-term memory.

Arguments:
- info_type (required): Type of information (preference, birthday, fact, etc.)
- information (required): The information to remember
- conversation_id (optional): Target conversation ID

Guides AI to:
1. Create appropriate memory name
2. Generate relevant trigger conditions
3. Use add_long_term_memory tool

recall-context

Search for relevant memories based on current conversation.

Arguments:
- current_topic (required): Current topic or question
- conversation_id (optional): Conversation to search

Guides AI to:
1. Search short-term memories for recent context
2. Search long-term memories for permanent facts
3. Consider keyword relevance and time decay

create-reminder

Create a conditional reminder that activates based on context or date.

Arguments:
- reminder_content (required): What to remind about
- trigger_condition (required): When to trigger (keywords or date)
- conversation_id (optional): Target conversation

Guides AI to:
1. Convert natural language conditions to JavaScript
2. Create date-based or keyword-based triggers
3. Use add_long_term_memory with proper trigger

analyze-conversation

Analyze conversation history and suggest what should be remembered.

Arguments:
- conversation_id (required): Conversation to analyze

Guides AI to:
1. Get current memory statistics
2. Identify important information types
3. Categorize for short-term vs long-term storage
4. Create appropriate memory entries

Architecture```

memory-mcp-server/
├── src/
│ ├── index.js # MCP server entry point
│ ├── memory/
│ │ ├── short-term.js # Short-term memory logic
│ │ ├── long-term.js # Long-term memory logic
│ │ ├── storage.js # JSON file storage with caching
│ │ └── modalities.js # Multimodal attachment handling
│ ├── nlp/
│ │ ├── jieba.js # Chinese segmentation
│ │ └── keywords.js # Keyword matching
│ ├── triggers/
│ │ └── matcher.js # JS code execution sandbox (Node.js vm)
│ ├── tools/
│ │ ├── short-term-tools.js # Short-term MCP tools
│ │ └── long-term-tools.js # Long-term MCP tools
│ ├── resources/
│ │ └── index.js # MCP resources (stats, guides)
│ ├── prompts/
│ │ └── index.js # MCP prompts (workflows)
│ └── utils/
│ ├── lru-cache.js # LRU cache for managers
│ └── zod-to-json-schema.js
└── data/ # Memory storage (auto-created)
└── {conversation_id}/
├── short-term-memory.json
└── long-term-memory.json


## Memory Algorithms

### Short-term Memory Relevance```
relevance = keyword_match_score - time_penalty + memory_score

where:
  keyword_match_score = Σ(current_kw.weight + memory_kw.weight)
  time_penalty = 15 * (1 - e^(-time_diff * 2e-9))
  memory_score = accumulated score from past activations

Selection Strategy

  1. Top Relevant (max 2): Highest relevance scores
  2. Next Relevant (max 1): Next highest scores
  3. Random Flashback (max 2): Weighted random from remaining memories

Filtering:
- Excludes same-conversation memories from last 20 minutes
- Excludes memories within 10 minutes of any selected memory
- Ensures diversity in recalled memories

Cleanup Policy

  • Triggers every 24 hours
  • Removes memories older than 1 year
  • Removes low-relevance memories (score < -5)
  • Always keeps at least 512 memories

Development```bash

Run in development mode with auto-reload

npm run dev

Run normally

npm start


## Security

- **Sandboxed Execution**: Long-term memory triggers run in Node.js built-in `vm` module sandbox with timeout protection
- **No File System Access**: Trigger code cannot access filesystem (sandboxed)
- **No Network Access**: Trigger code cannot make network requests
- **Timeout Protection**: 1-second execution timeout prevents infinite loops
- **Secure Context**: Only safe built-in objects are exposed to trigger code

&gt; **Note**: The built-in `vm` module provides good isolation for most use cases. For maximum security in production environments, consider running the MCP server in a containerized environment with additional restrictions.

## Limitations

- Memory storage is file-based (JSON), suitable for moderate usage
- Trigger execution has 1-second timeout
- Manager instances cached with LRU (max 100 conversations, 30-min idle timeout)
- Chinese text processing optimized (may be less optimal for other languages)

## Performance Optimizations

- **Write Caching**: Delayed writes with 1-second batching to reduce disk I/O
- **Directory Caching**: Directory existence checks are cached to avoid repeated file system calls
- **LRU Manager Cache**: Automatic cleanup of inactive conversation managers prevents memory leaks
- **Retry Logic**: File operations automatically retry with exponential backoff on transient errors
- **Graceful Shutdown**: Pending writes are flushed and resources cleaned up on shutdown signals
- **Data Deduplication**: Automatic removal of duplicate images and keywords (30-40% space savings)
- **Timestamp Normalization**: Unified timestamp format eliminates redundancy

## Image Memory Features

The server includes optional image memory capabilities:

- **Image Modalities**: Store images with memories using embeddings, tags, and descriptions
- **Similarity Search**: Find visually similar memories using cosine similarity on embeddings
- **Auto Deduplication**: Automatically detect and remove duplicate images (URL or content hash)
- **Flexible Embeddings**: Support for CLIP, ResNet, or custom image embeddings
- **Base64 Support**: Handle both URLs and data URI images

**Example:**```javascript
import { createImageModality } from &#x27;./src/utils/image-processor.js&#x27;;

const imageMemory = createImageModality({
  uri: &#x27;https://example.com/photo.jpg&#x27;,
  embedding: [0.1, 0.2, 0.3, ...],  // 512-d vector from CLIP/etc
  tags: [&#x27;vacation&#x27;, &#x27;beach&#x27;],
  description: &#x27;Sunset at the beach&#x27;
});

// Use in memory creation
await addShortTermMemory(messages, conversationId, {
  modalities: [imageMemory]
});

See docs/IMAGE_MEMORY.md for detailed guide.

Data Optimization

Built-in data optimization reduces storage by 30-40%:

  • Timestamp Normalization: time_stamp/timeStamp/timestamp → timestamp (ISO 8601)
  • Remove Redundancy: attachments field removed (use modalities only)
  • Keyword Deduplication: Case-insensitive merge with max weight retention
  • Image Deduplication: Remove duplicate images based on URI or content hash

All optimizations are applied automatically during storage. See docs/DATA_OPTIMIZATION.md for details.

Performance Benchmarks

Performance improvements from the latest enhancements:

Feature Improvement Details
Query Caching 30-50% faster Caches 50 most recent queries for 5 minutes
Vector Similarity 40-60% faster Pre-computed magnitude caching
Rate Limiting Protection 100 requests/minute per conversation
Timeout Protection Reliability All operations timeout after 5-30s
Data Storage 30-40% smaller Deduplication and normalization
Health Checks Proactive Memory, error rate, cache monitoring
Audit Logging Complete All operations logged with timestamps

Test Results

Run the comprehensive test suite:```bash
node test-improvements.js


Expected output: **36 tests pass** covering:
- Query caching (4 tests)
- Timeout handling (3 tests)
- Rate limiting (5 tests)
- Input validation (8 tests)
- Structured logging (3 tests)
- Performance metrics (6 tests)
- Health checks (4 tests)
- Audit logging (3 tests)

## Architecture```
src/
├── memory/           # Core memory management
│   ├── short-term.js    # Dynamic keyword-based memory
│   ├── long-term.js     # Trigger-based permanent memory
│   └── storage.js       # JSON file persistence
├── tools/            # MCP tool implementations
│   ├── short-term-tools.js
│   ├── long-term-tools.js
│   ├── backup-tools.js     # NEW: Backup/restore
│   └── search-tools.js     # NEW: Advanced search
├── utils/            # Utility modules
│   ├── query-cache.js      # NEW: Query result caching
│   ├── timeout.js          # NEW: Timeout handling
│   ├── logger.js           # NEW: Structured logging
│   └── lru-cache.js        # LRU cache implementation
├── security/         # NEW: Security features
│   ├── rate-limiter.js     # API rate limiting
│   ├── input-validator.js  # Input sanitization
│   └── audit-log.js        # Audit trail logging
├── monitoring/       # NEW: Monitoring features
│   └── metrics.js          # Performance metrics
├── health/           # NEW: Health checks
│   └── index.js            # Health monitoring
├── resources/        # MCP resources
│   └── index.js
└── prompts/          # MCP prompts
    └── index.js

License

BSD-3-Clause license

Credits

Extracted and generalized from the GentianAphrodite project.

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Memory MCP Server 2702e111 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

Memory MCP Server 2702e111 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Memory MCP Server 2702e111 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Memory MCP Server 2702e111 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Memory MCP Server 2702e111 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Memory MCP Server 2702e111 能提供哪些能力?

资料显示约 21 个工具;能力标签包括 内存管理、JavaScript、Claude。具体工具清单以官方文档为准。

Memory MCP Server 2702e111 需要什么运行环境?

属于本地进程,需要在本机装好运行环境。

Memory MCP Server 2702e111 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。