Memory Box MCP Server

by amotivv
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

この MCP サーバーは、Memory Box インスタンスと対話するためのツールを提供し、Cline および Claude Desktop から直接セマンティック検索を使用して思い出を保存および検索できるようにします。

関連プロジェクト

この MCP サーバーは、ベクトル埋め込みを利用したセマンティック メモリの保存および検索システムであるMemory Boxと連携するように設計されています。

Memory Box は、この MCP サーバーが通信するバックエンド API を提供し、次のことが可能になります。

  • 意味検索のためにベクトル埋め込みで記憶を保存する
  • カスタマイズ可能なバケットに思い出を整理する
  • キーワードだけでなく意味に基づいて思い出を検索する
  • 詳細なコンテキストで記憶を思い出す
  • 意味的に関連する記憶を見つける
  • トラックメモリの処理ステータス

独自のインスタンスを設定する方法など、Memory Box の詳細については、 Memory Box の Web サイトをご覧ください。

特徴

  • 思い出を保存: フォーマットされた思い出をソース情報とメタデータとともにメモリボックスに保存します
  • 思い出を検索:セマンティック検索を使用して思い出を検索します
  • 思い出を取得: すべての思い出または特定のバケットから思い出を取得します
  • 関連する記憶を探す:意味的に類似した記憶を見つける
  • メモリの状態を確認する: メモリの処理状態を監視します
  • メモリのフォーマット: 構造化されたシステムプロンプトに従ってメモリをフォーマットします
  • 使用状況統計: 現在のプラン、使用状況メトリック、リソース制限を表示します

インストール

サーバーはClineで使用するためにインストールおよび設定されています。このMCPサーバーを使用するには、Memory Boxインスタンス(セルフホスト型またはmemorybox.amotivv.aiのホスト型)が稼働している必要があります。

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Memory Box MCP Server を自動的にインストールするには:

npx -y @smithery/cli install @amotivv/memory-box-mcp --client claude

セットアップを完了するには:

  1. 次の Cline MCP 設定ファイルを編集します。
    ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  2. Memory Box トークンをMEMORY_BOX_TOKEN環境変数に追加します。
    "memory-box-mcp": { "command": "node", "args": [ "<path-to-repository>/build/index.js" ], "env": { "MEMORY_BOX_API_URL": "https://memorybox.amotivv.ai", "MEMORY_BOX_TOKEN": "your-token-here", "DEFAULT_BUCKET": "General" }, "disabled": false, "autoApprove": [] }
  3. オプションで、 DEFAULT_BUCKET値を変更してデフォルトのバケットをカスタマイズできます。

使用法

設定が完了すると、Cline で次のツールを使用できるようになります。

メモリを節約

適切なフォーマットでメモリをメモリ ボックスに保存します。

Use the save_memory tool to save this information about vector databases: "Vector databases like pgvector store and query high-dimensional vectors for semantic search applications."

パラメータ:

  • text (必須): 保存するメモリの内容
  • bucket_id (オプション): メモリを保存するバケット (デフォルト: "General")
  • format (オプション):システムプロンプトに従ってメモリをフォーマットするかどうか(デフォルト:true)
  • type (オプション):フォーマットするメモリの種類(TECHNICAL、DECISION、SOLUTION、CONCEPT、REFERENCE、APPLICATION、FACT)(デフォルト:"TECHNICAL")
  • source_type (オプション): メモリソースの種類 (デフォルト: "llm_plugin")
  • reference_data (オプション): メモリソースとコンテキストに関する追加のメタデータ

思い出を探す

セマンティック検索を使用して思い出を検索します。

Use the search_memories tool to find information about "vector databases"

パラメータ:

  • query (必須): 検索クエリ
  • debug (オプション):結果にデバッグ情報を含める(デフォルト:false)

すべての思い出を手に入れる

すべての記憶を取り戻す:

Use the get_all_memories tool to show me all my saved memories

バケットメモリーズを入手

特定のバケットからメモリを取得します。

Use the get_bucket_memories tool to show me memories in the "Learning" bucket

パラメータ:

  • bucket_id (必須): メモリを取得するバケット

メモリのフォーマット

保存せずにメモリ システム プロンプトに従ってテキストをフォーマットします。

Use the format_memory tool to format this text: "Vector databases like pgvector store and query high-dimensional vectors for semantic search applications."

パラメータ:

  • text (必須): 書式設定するテキスト
  • type (オプション):メモリの種類(TECHNICAL、DECISION、SOLUTION、CONCEPT、REFERENCE、APPLICATION、FACT)(デフォルト:"TECHNICAL")

関連する思い出を取得する

特定の記憶と意味的に類似した記憶を見つけます。

Use the get_related_memories tool with memory ID 123

パラメータ:

  • memory_id (必須): 関連するメモリを検索するメモリのID
  • min_similarity (オプション):関連メモリの最小類似度しきい値(0.0〜1.0)(デフォルト:0.7)

メモリの状態を確認する

メモリの処理状態を確認します。

Use the check_memory_status tool with memory ID 123

パラメータ:

  • memory_id (必須): ステータスを確認するメモリのID

使用状況統計を取得する

ユーザーの使用状況統計とプラン情報を取得します。

Use the get_usage_stats tool to show me my current plan and usage metrics

このツールは次を返します:

  • 現在のプラン情報(例:無料、ベーシック、プロフェッショナル、レガシー)
  • ユーザーのステータスと制限の適用情報
  • 当月の使用状況指標(ストア操作、検索操作、API 呼び出し)
  • 人間が読める形式でのデータ処理量
  • プランに基づくリソース制限(該当する場合)
  • 種類別の業務内訳

この操作にはパラメータは必要ありません。

カスタマイズ

システムプロンプトのカスタマイズ

Memory Box MCPサーバーは、特定のガイドラインに従ってメモリをフォーマットするためにシステムプロンプトを使用します。このプロンプトをカスタマイズすることで、メモリのフォーマット方法を変更できます。

デフォルトのシステムプロンプト

デフォルトのシステム プロンプトには、さまざまなタイプのメモリのフォーマット ガイドラインが含まれています。

You are a helpful AI assistant. When storing memories with memory_plugin, follow these enhanced formatting guidelines: 1. STRUCTURE: Format memories based on the type of information: - TECHNICAL: "YYYY-MM-DD: TECHNICAL - [Brief topic]: [Concise explanation with specific details]" - DECISION: "YYYY-MM-DD: DECISION - [Brief topic]: [Decision made] because [rationale]. Alternatives considered: [options]." - SOLUTION: "YYYY-MM-DD: SOLUTION - [Problem summary]: [Implementation details that solved the issue]" - CONCEPT: "YYYY-MM-DD: CONCEPT - [Topic]: [Clear explanation of the concept with examples]" - REFERENCE: "YYYY-MM-DD: REFERENCE - [Topic]: [URL, tool name, or resource] for [specific purpose]" - APPLICATION: "YYYY-MM-DD: APPLICATION - [App name]: [User-friendly description] followed by [technical implementation details]" 2. FORMATTING GUIDELINES: - CREATE FOCUSED MEMORIES: Each memory should contain a single clear concept or topic - USE DIVERSE TERMINOLOGY: Include both technical terms AND user-friendly alternatives - INCLUDE SEARCHABLE KEYWORDS: Begin with common terms a user might search for - BALANCE DETAIL LEVELS: Include both high-level descriptions and key technical details - LENGTH: Keep memories between 50-150 words - ALWAYS include the current date in YYYY-MM-DD format 3. MEMORY STORAGE PARAMETERS: - Use the "text" parameter for your formatted memory content - Set "source_type" to "llm_plugin" - Include appropriate "reference_data" with source information and context 4. REFERENCE DATA STRUCTURE: - source.platform: Identify your platform (e.g., "claude_desktop", "cline") - source.type: Always set to "llm_plugin" - source.version: Optional version information - context.conversation_id: Include when available to link related conversation memories - context.message_id: Optional identifier for the specific message 5. SPECIAL FORMATS: - For user facts, preferences, or personal details: "YYYY-MM-DD: FACT: [User] [specific preference/attribute/information]" - For reference materials: Include specific details about where to find the information 6. RELATED MEMORIES: After finding memories with search, check if there are related memories using the get_related_memories tool with the memory_id from search results. Present these additional memories to provide the user with more context. 7. RETRIEVAL CONSIDERATION: Before storing an important memory, consider: "What search terms might someone use to find this information later?" and ensure those terms are included.

システムプロンプトをカスタマイズする方法

システムプロンプトをカスタマイズするには:

  1. 次の Cline MCP 設定ファイルを編集します。
    ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  2. カスタム システム プロンプトをSYSTEM_PROMPT環境変数に追加します。
    "memory-box-mcp": { "command": "node", "args": [ "<path-to-repository>/build/index.js" ], "env": { "MEMORY_BOX_API_URL": "https://your-memory-box-instance", "MEMORY_BOX_TOKEN": "your-token-here", "DEFAULT_BUCKET": "General", "SYSTEM_PROMPT": "Your custom system prompt here..." }, "disabled": false, "autoApprove": [] }
    <path-to-repository>/system-prompt-template.txtにテンプレート ファイルが用意されており、これをコピーして変更できます。
  3. 変更を適用するにはClineを再起動してください

システムプロンプトヘルパー

Memory Box MCP サーバーには、システム プロンプトを管理するためのヘルパー スクリプトが含まれています。

# View the current system prompt cd <path-to-repository> npm run prompt-helper -- view # Reset to the default system prompt cd <path-to-repository> npm run prompt-helper -- reset # Validate a custom system prompt cd <path-to-repository> npm run prompt-helper -- validate

その他の設定オプション

次の環境変数をカスタマイズすることもできます。

  • MEMORY_BOX_API_URL : Memory BoxインスタンスのURL
  • MEMORY_BOX_TOKEN : Memory Boxの認証トークン
  • DEFAULT_BUCKET : メモリを保存するときに使用するデフォルトのバケット

トラブルシューティング

問題が発生した場合:

  1. メモリーボックストークンが正しく設定されていることを確認してください
  2. Memory Boxインスタンスが実行中でアクセス可能であることを確認する
  3. Clineログでエラーメッセージを確認してください

発達

サーバーに変更を加えるには:

  1. <path-to-repository>/src/のソースコードを編集します。
  2. サーバーを再構築します。
    cd <path-to-repository> npm run build
  3. 変更を適用するにはClineを再起動してください

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Cline MCP 統合により、ユーザーは意味を理解しながらメモリを保存、検索、フォーマットすることができ、意味ベースの検索にベクトル埋め込みを使用して情報を保存および取得するツールが提供されます。

  1. Features
    1. Installation
      1. Installing via Smithery
    2. Usage
      1. Save Memory
      2. Search Memories
      3. Get All Memories
      4. Get Bucket Memories
      5. Format Memory
      6. Get Related Memories
      7. Check Memory Status
      8. Get Usage Stats
    3. Customization
      1. System Prompt Customization
      2. Other Configuration Options
    4. Troubleshooting
      1. Development
        ID: wtbejx9zwc