@totalreclaw/mcp-server 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  <h1 align="center">@totalreclaw/mcp-server</h1>
6
6
 
7
7
  <p align="center">
8
- <strong>Encrypted memory for Claude Desktop, Cursor, Windsurf, and any MCP-compatible agent</strong>
8
+ <strong>Encrypted memory for Claude Desktop, Cursor, Windsurf, IronClaw, and any MCP-compatible agent</strong>
9
9
  </p>
10
10
 
11
11
  <p align="center">
@@ -76,6 +76,27 @@ Add to your MCP settings (Settings > MCP Servers):
76
76
  }
77
77
  ```
78
78
 
79
+ #### IronClaw (NEAR AI)
80
+
81
+ Add to your IronClaw MCP configuration (typically `~/.ironclaw/mcp.json` or via the IronClaw dashboard):
82
+
83
+ ```json
84
+ {
85
+ "mcpServers": {
86
+ "totalreclaw": {
87
+ "command": "npx",
88
+ "args": ["@totalreclaw/mcp-server"],
89
+ "env": {
90
+ "TOTALRECLAW_RECOVERY_PHRASE": "your twelve word recovery phrase goes here",
91
+ "TOTALRECLAW_SERVER_URL": "https://api.totalreclaw.xyz"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ If IronClaw supports a credential vault, store `TOTALRECLAW_RECOVERY_PHRASE` there instead of in the config file. See the [IronClaw setup guide](../docs/guides/ironclaw-setup.md) for the full walkthrough including background routines.
99
+
79
100
  ### 3. Verify
80
101
 
81
102
  Ask your agent: *"Do you have access to TotalReclaw memory tools?"*
@@ -135,6 +156,7 @@ npm run lint # Lint
135
156
  ## Learn More
136
157
 
137
158
  - [Getting Started Guide](../docs/guides/beta-tester-guide.md)
159
+ - [IronClaw Setup Guide](../docs/guides/ironclaw-setup.md) -- full walkthrough for IronClaw (NEAR AI) agents
138
160
  - [totalreclaw.xyz](https://totalreclaw.xyz)
139
161
  - [Main Repository](https://github.com/p-diogo/totalreclaw)
140
162
 
package/dist/prompts.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export declare const SERVER_INSTRUCTIONS = "\nYou have access to TotalReclaw, a persistent encrypted memory system. You SHOULD use these tools PROACTIVELY -- do not wait for the user to say \"remember this\" or \"recall that.\"\n\n## CRITICAL SAFETY: Recovery Phrase\nTotalReclaw uses a 12-word BIP-39 recovery phrase as the user's identity. If a user tries to import a phrase they already use for a CRYPTO WALLET, you MUST warn them: \"Do NOT use a recovery phrase from an existing crypto wallet. TotalReclaw should have its own dedicated phrase to keep your funds safe.\" Always generate a fresh phrase for new users.\n\n## CRITICAL: Automatic Memory Behaviors\n\n### At Conversation Start\nALWAYS call totalreclaw_recall at the beginning of EVERY new conversation with a brief summary of the user's first message as the query. This loads relevant context from past conversations. Present recalled memories naturally as context -- do not announce \"I found these memories\" or list them explicitly unless the user asks.\n\n### Proactive Memory Storage (IMPORTANT)\nYou should call totalreclaw_remember WITHOUT being asked whenever the user shares:\n- Personal preferences (\"I prefer...\", \"I like...\", \"I hate...\")\n- Personal information (name, location, occupation, family details)\n- Decisions or goals (\"I decided to...\", \"I want to...\", \"I chose X because Y\")\n- Corrections to previous information (\"Actually, I'm vegan now\", \"We moved to Berlin\")\n- Important events or dates (\"My birthday is...\", \"I started a new job at...\")\n- Technical preferences (programming language, tools, frameworks, workflows)\n- Project context (what they're working on, deadlines, team details)\n- Opinions and values that shape future interactions\n\nThe user should NOT have to tell you to remember things. If information would be valuable in a future conversation, store it automatically. Think of yourself as a thoughtful assistant who naturally takes notes on important details.\n\nDo NOT store:\n- Temporary/transient context (weather today, a one-time task)\n- Generic knowledge unrelated to the user\n- Sensitive credentials (passwords, API keys, tokens)\n\n### Memory Recall\nCall totalreclaw_recall proactively when:\n- Starting any new conversation (query based on the user's first message)\n- The user asks about something that might relate to past conversations\n- You need context about the user's background, projects, or preferences\n- The user says \"remember when...\", \"what did I say about...\", \"do you know my...\"\n\n### Memory Hygiene\n- Before storing a new fact, check recalled memories to avoid duplicates\n- When the user corrects information, store the correction (the system handles deduplication)\n- Use importance 7-9 for core identity/preferences, 4-6 for moderate facts, 1-3 for minor details\n- Extract atomic facts: \"User prefers dark mode\" not \"User said they prefer dark mode and also use VS Code\"\n\n### Billing & Quota\nWhen a totalreclaw_remember call fails with \"quota_exceeded\":\n1. Inform the user they've reached their free tier limit\n2. Offer to check their usage with totalreclaw_status\n3. If they want to upgrade, use totalreclaw_upgrade to get a checkout link\nDo NOT repeatedly attempt to store memories after a quota error.\n\nNote: Billing status is cached locally for up to 2 hours. After upgrading to Pro, the new tier may take up to 2 hours to take effect. If the user reports that Pro features are not active after upgrading, suggest restarting their agent to force a billing cache refresh.\n\n### Importing memories from other tools\nIf the user mentions migrating from Mem0, MCP Memory Server, MemoClaw, or any other AI memory tool, offer to use totalreclaw_import_from. Start with dry_run=true to preview, then confirm before importing.\nAPI keys provided by the user are used only for the import and are never stored.\n";
2
- export declare const SYSTEM_PROMPT_FRAGMENT = "\nYou have access to TotalReclaw, a persistent encrypted memory system. You SHOULD use these tools PROACTIVELY -- do not wait for the user to say \"remember this\" or \"recall that.\"\n\n## CRITICAL SAFETY: Recovery Phrase\nTotalReclaw uses a 12-word BIP-39 recovery phrase as the user's identity. If a user tries to import a phrase they already use for a CRYPTO WALLET, you MUST warn them: \"Do NOT use a recovery phrase from an existing crypto wallet. TotalReclaw should have its own dedicated phrase to keep your funds safe.\" Always generate a fresh phrase for new users.\n\n## CRITICAL: Automatic Memory Behaviors\n\n### At Conversation Start\nALWAYS call totalreclaw_recall at the beginning of EVERY new conversation with a brief summary of the user's first message as the query. This loads relevant context from past conversations. Present recalled memories naturally as context -- do not announce \"I found these memories\" or list them explicitly unless the user asks.\n\n### Proactive Memory Storage (IMPORTANT)\nYou should call totalreclaw_remember WITHOUT being asked whenever the user shares:\n- Personal preferences (\"I prefer...\", \"I like...\", \"I hate...\")\n- Personal information (name, location, occupation, family details)\n- Decisions or goals (\"I decided to...\", \"I want to...\", \"I chose X because Y\")\n- Corrections to previous information (\"Actually, I'm vegan now\", \"We moved to Berlin\")\n- Important events or dates (\"My birthday is...\", \"I started a new job at...\")\n- Technical preferences (programming language, tools, frameworks, workflows)\n- Project context (what they're working on, deadlines, team details)\n- Opinions and values that shape future interactions\n\nThe user should NOT have to tell you to remember things. If information would be valuable in a future conversation, store it automatically. Think of yourself as a thoughtful assistant who naturally takes notes on important details.\n\nDo NOT store:\n- Temporary/transient context (weather today, a one-time task)\n- Generic knowledge unrelated to the user\n- Sensitive credentials (passwords, API keys, tokens)\n\n### Memory Recall\nCall totalreclaw_recall proactively when:\n- Starting any new conversation (query based on the user's first message)\n- The user asks about something that might relate to past conversations\n- You need context about the user's background, projects, or preferences\n- The user says \"remember when...\", \"what did I say about...\", \"do you know my...\"\n\n### Memory Hygiene\n- Before storing a new fact, check recalled memories to avoid duplicates\n- When the user corrects information, store the correction (the system handles deduplication)\n- Use importance 7-9 for core identity/preferences, 4-6 for moderate facts, 1-3 for minor details\n- Extract atomic facts: \"User prefers dark mode\" not \"User said they prefer dark mode and also use VS Code\"\n\n### Billing & Quota\nWhen a totalreclaw_remember call fails with \"quota_exceeded\":\n1. Inform the user they've reached their free tier limit\n2. Offer to check their usage with totalreclaw_status\n3. If they want to upgrade, use totalreclaw_upgrade to get a checkout link\nDo NOT repeatedly attempt to store memories after a quota error.\n\nNote: Billing status is cached locally for up to 2 hours. After upgrading to Pro, the new tier may take up to 2 hours to take effect. If the user reports that Pro features are not active after upgrading, suggest restarting their agent to force a billing cache refresh.\n\n### Importing memories from other tools\nIf the user mentions migrating from Mem0, MCP Memory Server, MemoClaw, or any other AI memory tool, offer to use totalreclaw_import_from. Start with dry_run=true to preview, then confirm before importing.\nAPI keys provided by the user are used only for the import and are never stored.\n";
1
+ export declare const SERVER_INSTRUCTIONS = "\nYou have access to TotalReclaw, a persistent encrypted memory system. You SHOULD use these tools PROACTIVELY -- do not wait for the user to say \"remember this\" or \"recall that.\"\n\n## CRITICAL SAFETY: Recovery Phrase\nTotalReclaw uses a 12-word BIP-39 recovery phrase as the user's identity. If a user tries to import a phrase they already use for a CRYPTO WALLET, you MUST warn them: \"Do NOT use a recovery phrase from an existing crypto wallet. TotalReclaw should have its own dedicated phrase to keep your funds safe.\" Always generate a fresh phrase for new users.\n\n## CRITICAL: Automatic Memory Behaviors\n\n### At Conversation Start\nALWAYS call totalreclaw_recall at the beginning of EVERY new conversation with a brief summary of the user's first message as the query. This loads relevant context from past conversations. Present recalled memories naturally as context -- do not announce \"I found these memories\" or list them explicitly unless the user asks.\n\n### Proactive Memory Storage (IMPORTANT)\nYou should call totalreclaw_remember WITHOUT being asked whenever the user shares:\n- Personal preferences (\"I prefer...\", \"I like...\", \"I hate...\")\n- Personal information (name, location, occupation, family details)\n- Decisions or goals (\"I decided to...\", \"I want to...\", \"I chose X because Y\")\n- Corrections to previous information (\"Actually, I'm vegan now\", \"We moved to Berlin\")\n- Important events or dates (\"My birthday is...\", \"I started a new job at...\")\n- Technical preferences (programming language, tools, frameworks, workflows)\n- Project context (what they're working on, deadlines, team details)\n- Opinions and values that shape future interactions\n\nThe user should NOT have to tell you to remember things. If information would be valuable in a future conversation, store it automatically. Think of yourself as a thoughtful assistant who naturally takes notes on important details.\n\nDo NOT store:\n- Temporary/transient context (weather today, a one-time task)\n- Generic knowledge unrelated to the user\n- Sensitive credentials (passwords, API keys, tokens)\n\n### Memory Recall\nCall totalreclaw_recall proactively when:\n- Starting any new conversation (query based on the user's first message)\n- The user asks about something that might relate to past conversations\n- You need context about the user's background, projects, or preferences\n- The user says \"remember when...\", \"what did I say about...\", \"do you know my...\"\n\n### Memory Hygiene\n- Before storing a new fact, check recalled memories to avoid duplicates\n- When the user corrects information, store the correction (the system handles deduplication)\n- Use importance 7-9 for core identity/preferences, 4-6 for moderate facts, 1-3 for minor details\n- Extract atomic facts: \"User prefers dark mode\" not \"User said they prefer dark mode and also use VS Code\"\n\n### Billing & Quota\nWhen a totalreclaw_remember call fails with \"quota_exceeded\":\n1. Inform the user they've reached their free tier limit\n2. Offer to check their usage with totalreclaw_status\n3. If they want to upgrade, use totalreclaw_upgrade to get a checkout link\nDo NOT repeatedly attempt to store memories after a quota error.\n\nNote: Billing status is cached locally for up to 2 hours. After upgrading to Pro, the new tier may take up to 2 hours to take effect. If the user reports that Pro features are not active after upgrading, suggest restarting their agent to force a billing cache refresh.\n\n### Importing memories from other tools\nIf the user mentions migrating from Mem0, MCP Memory Server, MemoClaw, or any other AI memory tool, offer to use totalreclaw_import_from. Start with dry_run=true to preview, then confirm before importing.\nAPI keys provided by the user are used only for the import and are never stored.\n\n### Agent-specific tips\n- If your agent supports background routines or scheduled tasks, set up a routine to call totalreclaw_remember after conversations to ensure nothing is missed.\n- If your agent supports a credential vault or secret store, the user's TOTALRECLAW_RECOVERY_PHRASE should be stored there instead of as a plaintext environment variable.\n- TotalReclaw memories are fully portable -- they work across OpenClaw, IronClaw, Claude Desktop, Cursor, NanoClaw, and any MCP-compatible agent.\n";
2
+ export declare const SYSTEM_PROMPT_FRAGMENT = "\nYou have access to TotalReclaw, a persistent encrypted memory system. You SHOULD use these tools PROACTIVELY -- do not wait for the user to say \"remember this\" or \"recall that.\"\n\n## CRITICAL SAFETY: Recovery Phrase\nTotalReclaw uses a 12-word BIP-39 recovery phrase as the user's identity. If a user tries to import a phrase they already use for a CRYPTO WALLET, you MUST warn them: \"Do NOT use a recovery phrase from an existing crypto wallet. TotalReclaw should have its own dedicated phrase to keep your funds safe.\" Always generate a fresh phrase for new users.\n\n## CRITICAL: Automatic Memory Behaviors\n\n### At Conversation Start\nALWAYS call totalreclaw_recall at the beginning of EVERY new conversation with a brief summary of the user's first message as the query. This loads relevant context from past conversations. Present recalled memories naturally as context -- do not announce \"I found these memories\" or list them explicitly unless the user asks.\n\n### Proactive Memory Storage (IMPORTANT)\nYou should call totalreclaw_remember WITHOUT being asked whenever the user shares:\n- Personal preferences (\"I prefer...\", \"I like...\", \"I hate...\")\n- Personal information (name, location, occupation, family details)\n- Decisions or goals (\"I decided to...\", \"I want to...\", \"I chose X because Y\")\n- Corrections to previous information (\"Actually, I'm vegan now\", \"We moved to Berlin\")\n- Important events or dates (\"My birthday is...\", \"I started a new job at...\")\n- Technical preferences (programming language, tools, frameworks, workflows)\n- Project context (what they're working on, deadlines, team details)\n- Opinions and values that shape future interactions\n\nThe user should NOT have to tell you to remember things. If information would be valuable in a future conversation, store it automatically. Think of yourself as a thoughtful assistant who naturally takes notes on important details.\n\nDo NOT store:\n- Temporary/transient context (weather today, a one-time task)\n- Generic knowledge unrelated to the user\n- Sensitive credentials (passwords, API keys, tokens)\n\n### Memory Recall\nCall totalreclaw_recall proactively when:\n- Starting any new conversation (query based on the user's first message)\n- The user asks about something that might relate to past conversations\n- You need context about the user's background, projects, or preferences\n- The user says \"remember when...\", \"what did I say about...\", \"do you know my...\"\n\n### Memory Hygiene\n- Before storing a new fact, check recalled memories to avoid duplicates\n- When the user corrects information, store the correction (the system handles deduplication)\n- Use importance 7-9 for core identity/preferences, 4-6 for moderate facts, 1-3 for minor details\n- Extract atomic facts: \"User prefers dark mode\" not \"User said they prefer dark mode and also use VS Code\"\n\n### Billing & Quota\nWhen a totalreclaw_remember call fails with \"quota_exceeded\":\n1. Inform the user they've reached their free tier limit\n2. Offer to check their usage with totalreclaw_status\n3. If they want to upgrade, use totalreclaw_upgrade to get a checkout link\nDo NOT repeatedly attempt to store memories after a quota error.\n\nNote: Billing status is cached locally for up to 2 hours. After upgrading to Pro, the new tier may take up to 2 hours to take effect. If the user reports that Pro features are not active after upgrading, suggest restarting their agent to force a billing cache refresh.\n\n### Importing memories from other tools\nIf the user mentions migrating from Mem0, MCP Memory Server, MemoClaw, or any other AI memory tool, offer to use totalreclaw_import_from. Start with dry_run=true to preview, then confirm before importing.\nAPI keys provided by the user are used only for the import and are never stored.\n\n### Agent-specific tips\n- If your agent supports background routines or scheduled tasks, set up a routine to call totalreclaw_remember after conversations to ensure nothing is missed.\n- If your agent supports a credential vault or secret store, the user's TOTALRECLAW_RECOVERY_PHRASE should be stored there instead of as a plaintext environment variable.\n- TotalReclaw memories are fully portable -- they work across OpenClaw, IronClaw, Claude Desktop, Cursor, NanoClaw, and any MCP-compatible agent.\n";
3
3
  export declare const REMEMBER_TOOL_DESCRIPTION = "Store important information the user shares. Call this PROACTIVELY -- do not wait for the user to say \"remember this.\"\n\nWhenever the user mentions preferences, facts about themselves, decisions, project context, goals, or anything they would want remembered across conversations, call this tool immediately. You are the user's memory -- take notes automatically.\n\nIMPORTANT: Extract atomic facts, not entire conversation snippets.\nGood: \"User is vegan\"\nBad: \"User said they recently became vegan and prefer organic food from local farms\"\n\nThe facts parameter accepts an array, so you can store multiple facts in a single call.\n\nEach fact needs:\n- text: The atomic fact (required)\n- importance: 1-10 scale (optional, default 5)\n - 9-10: Core identity (name, fundamental values)\n - 7-8: Important preferences (diet, work style)\n - 5-6: Moderate facts (schedule, minor preferences)\n - 3-4: Low priority (casual mentions)\n - 1-2: Ephemeral (likely to change)\n- type: Category (optional) -- \"fact\", \"preference\", \"decision\", \"episodic\", \"goal\", \"context\", \"summary\"\n\nThe vault handles deduplication automatically. If a similar fact exists, it will be updated rather than duplicated.";
4
4
  export declare const RECALL_TOOL_DESCRIPTION = "Search your memory for relevant context. Returns the top 8 most relevant memories (not all \u2014 this is a targeted search, not a full dump).\n\nCall this proactively when:\n- The user's message suggests they've told you something before (\"remember when I said...\", \"what's my...\")\n- The conversation topic likely relates to previously stored information\n- The user asks about their preferences, history, or past decisions\n- The user references something from a previous conversation\n- You need context about the user's background, projects, or work style\n- The user's question could be answered or enriched by stored memories\n\nParameters:\n- query: Natural language search (required). Keep it concise -- 5-15 words work best.\n- k: Number of results (default 8, max 50). Use 3-5 for quick lookups, 8-12 for broad context.\n\nPresent recalled memories naturally as context. Do not announce \"I found these memories\" unless the user asks.";
5
5
  export declare const FORGET_TOOL_DESCRIPTION = "Delete a specific memory from your vault.\n\nWHEN TO USE:\n- User explicitly asks to forget something\n- User says information is outdated or incorrect\n- User requests to remove sensitive information\n\nWHEN NOT TO USE:\n- To update information (use remember with updated fact instead)\n- Without user's explicit request\n\nEXAMPLES:\n- User: \"Forget that I work at Google, I left\"\n -> Call: totalreclaw_forget({ fact_id: \"the-fact-id\" })\n\nPARAMETERS:\n- fact_id: The ID of the fact to forget (required)\n OR\n- query: Forget all memories matching query (optional)";
@@ -7,7 +7,7 @@ export declare const EXPORT_TOOL_DESCRIPTION = "Export all memories in plaintext
7
7
  export declare const STATUS_TOOL_DESCRIPTION = "Check your TotalReclaw subscription status and usage.\n\nShows:\n- Current tier (free/pro)\n- Free writes used vs limit\n- Subscription expiry date\n\nUse this when:\n- User asks about their memory quota or usage\n- Before storing many memories, to check remaining capacity\n- User asks about billing or subscription";
8
8
  export declare const UPGRADE_TOOL_DESCRIPTION = "Upgrade to TotalReclaw Pro for unlimited encrypted memories.\n\nReturns a Stripe checkout URL for the user to complete payment via credit/debit card.\n\nUse this when:\n- User hits their free tier limit\n- User asks about upgrading or pricing\n- A remember call returns a quota_exceeded error";
9
9
  export declare const MIGRATE_TOOL_DESCRIPTION = "Migrate memories from testnet (Base Sepolia) to mainnet (Gnosis) after upgrading to Pro.\n\nWhen a user upgrades from Free to Pro, their memories are on the Base Sepolia testnet. This tool copies them to Gnosis mainnet for permanent storage. No re-encryption needed -- the encrypted data is chain-agnostic.\n\nSAFETY:\n- Dry-run by default: call without confirm=true to see a preview of what will be migrated\n- Idempotent: running it again skips facts that already exist on mainnet\n- Testnet facts are never deleted (they remain as a backup)\n\nWHEN TO USE:\n- After a user successfully upgrades to Pro via totalreclaw_upgrade\n- User asks about migrating their testnet memories to mainnet\n- User wants to ensure their memories are on permanent storage\n\nPARAMETERS:\n- confirm: Set to true to execute the migration. Without it, returns a dry-run preview showing how many memories will be migrated.\n\nWORKFLOW:\n1. First call with confirm=false (or omit) to see the preview\n2. Share the preview with the user\n3. If they confirm, call again with confirm=true\n4. Report progress as batches complete";
10
- export declare const IMPORT_FROM_TOOL_DESCRIPTION = "Import memories from other AI memory tools into TotalReclaw.\n\nSupported sources:\n- **mem0**: Import from Mem0 (mem0.ai). Provide api_key + source_user_id, or paste the export JSON.\n- **mcp-memory**: Import from MCP Memory Server (@modelcontextprotocol/server-memory). Provide the memory.jsonl content or file_path. Default path: ~/.mcp-memory/memory.jsonl.\n- **memoclaw**: Import from MemoClaw. Provide api_key + source_user_id, or paste the export JSON.\n- **generic-json**: Import from a generic JSON file. Expects an array of objects with \"text\" field.\n- **generic-csv**: Import from a CSV file. Expects a header row with \"text\" column.\n\nSecurity: API keys are used in-memory only for this import and are never stored.\nIdempotent: Running the same import twice will not create duplicates (content fingerprint dedup).\n\nUse dry_run=true to preview what would be imported without storing anything.";
10
+ export declare const IMPORT_FROM_TOOL_DESCRIPTION = "Import memories from other AI memory tools into TotalReclaw.\n\nSupported sources:\n- **mem0**: Import from Mem0 (mem0.ai). Provide api_key + source_user_id, or paste the export JSON.\n- **mcp-memory**: Import from MCP Memory Server (@modelcontextprotocol/server-memory). Provide the memory.jsonl content or file_path. Default path: ~/.mcp-memory/memory.jsonl.\n- **chatgpt**: Import from ChatGPT. Two formats supported: (1) Paste ChatGPT memories text (from Settings > Personalization > Memory > Manage), or (2) provide conversations.json file from ChatGPT data export (Settings > Data Controls > Export Data).\n- **claude**: Import from Claude. Paste Claude memory text (from Settings > Memory). One fact per line, date prefixes like [2026-03-15] are preserved.\n- **memoclaw**: Import from MemoClaw. Provide api_key + source_user_id, or paste the export JSON.\n- **generic-json**: Import from a generic JSON file. Expects an array of objects with \"text\" field.\n- **generic-csv**: Import from a CSV file. Expects a header row with \"text\" column.\n\nSecurity: API keys are used in-memory only for this import and are never stored.\nIdempotent: Running the same import twice will not create duplicates (content fingerprint dedup).\n\nUse dry_run=true to preview what would be imported without storing anything.";
11
11
  export declare const IMPORT_TOOL_DESCRIPTION = "Import memories from an exported backup.\n\nWHEN TO USE:\n- User wants to restore memories from backup\n- User wants to transfer memories from another TotalReclaw instance\n- User has a JSON or Markdown export they want to import\n\nMERGE STRATEGIES:\n- skip_existing: Skip facts that already exist (default)\n- overwrite: Replace existing facts with imported ones\n- merge: Use LLM-assisted conflict resolution\n\nEXAMPLES:\n- User: \"Import memories from this backup file\"\n -> Call: totalreclaw_import({ content: \"...\", format: \"json\" })\n\nPARAMETERS:\n- content: The exported content (JSON or Markdown string)\n- format: Format of content \"markdown\" or \"json\" (auto-detected if not specified)\n- merge_strategy: How to handle conflicts (default: skip_existing)\n- validate_only: Parse and validate without importing (dry-run)";
12
12
  export declare const PROMPT_DEFINITIONS: {
13
13
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,kxHAsD/B,CAAC;AAGF,eAAO,MAAM,sBAAsB,kxHAAsB,CAAC;AAI1D,eAAO,MAAM,yBAAyB,2sCAoB8E,CAAC;AAErH,eAAO,MAAM,uBAAuB,27BAc2E,CAAC;AAEhH,eAAO,MAAM,uBAAuB,mkBAkBmB,CAAC;AAExD,eAAO,MAAM,uBAAuB,+eAgB6B,CAAC;AAElE,eAAO,MAAM,uBAAuB,iUAUM,CAAC;AAE3C,eAAO,MAAM,wBAAwB,ySAOY,CAAC;AAElD,eAAO,MAAM,wBAAwB,qlCAqBE,CAAC;AAExC,eAAO,MAAM,4BAA4B,q5BAYoC,CAAC;AAE9E,eAAO,MAAM,uBAAuB,60BAoB4B,CAAC;AAIjE,eAAO,MAAM,kBAAkB;;;;;;;;;GAqB9B,CAAC;AAEF,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC5B,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC,CAqClE"}
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,6wIA2D/B,CAAC;AAGF,eAAO,MAAM,sBAAsB,6wIAAsB,CAAC;AAI1D,eAAO,MAAM,yBAAyB,2sCAoB8E,CAAC;AAErH,eAAO,MAAM,uBAAuB,27BAc2E,CAAC;AAEhH,eAAO,MAAM,uBAAuB,mkBAkBmB,CAAC;AAExD,eAAO,MAAM,uBAAuB,+eAgB6B,CAAC;AAElE,eAAO,MAAM,uBAAuB,iUAUM,CAAC;AAE3C,eAAO,MAAM,wBAAwB,ySAOY,CAAC;AAElD,eAAO,MAAM,wBAAwB,qlCAqBE,CAAC;AAExC,eAAO,MAAM,4BAA4B,wyCAcoC,CAAC;AAE9E,eAAO,MAAM,uBAAuB,60BAoB4B,CAAC;AAIjE,eAAO,MAAM,kBAAkB;;;;;;;;;GAqB9B,CAAC;AAEF,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC5B,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC,CAqClE"}
package/dist/prompts.js CHANGED
@@ -59,6 +59,11 @@ Note: Billing status is cached locally for up to 2 hours. After upgrading to Pro
59
59
  ### Importing memories from other tools
60
60
  If the user mentions migrating from Mem0, MCP Memory Server, MemoClaw, or any other AI memory tool, offer to use totalreclaw_import_from. Start with dry_run=true to preview, then confirm before importing.
61
61
  API keys provided by the user are used only for the import and are never stored.
62
+
63
+ ### Agent-specific tips
64
+ - If your agent supports background routines or scheduled tasks, set up a routine to call totalreclaw_remember after conversations to ensure nothing is missed.
65
+ - If your agent supports a credential vault or secret store, the user's TOTALRECLAW_RECOVERY_PHRASE should be stored there instead of as a plaintext environment variable.
66
+ - TotalReclaw memories are fully portable -- they work across OpenClaw, IronClaw, Claude Desktop, Cursor, NanoClaw, and any MCP-compatible agent.
62
67
  `;
63
68
  // Keep backward-compat export name (some callers may still reference it)
64
69
  exports.SYSTEM_PROMPT_FRAGMENT = exports.SERVER_INSTRUCTIONS;
@@ -181,6 +186,8 @@ exports.IMPORT_FROM_TOOL_DESCRIPTION = `Import memories from other AI memory too
181
186
  Supported sources:
182
187
  - **mem0**: Import from Mem0 (mem0.ai). Provide api_key + source_user_id, or paste the export JSON.
183
188
  - **mcp-memory**: Import from MCP Memory Server (@modelcontextprotocol/server-memory). Provide the memory.jsonl content or file_path. Default path: ~/.mcp-memory/memory.jsonl.
189
+ - **chatgpt**: Import from ChatGPT. Two formats supported: (1) Paste ChatGPT memories text (from Settings > Personalization > Memory > Manage), or (2) provide conversations.json file from ChatGPT data export (Settings > Data Controls > Export Data).
190
+ - **claude**: Import from Claude. Paste Claude memory text (from Settings > Memory). One fact per line, date prefixes like [2026-03-15] are preserved.
184
191
  - **memoclaw**: Import from MemoClaw. Provide api_key + source_user_id, or paste the export JSON.
185
192
  - **generic-json**: Import from a generic JSON file. Expects an array of objects with "text" field.
186
193
  - **generic-csv**: Import from a CSV file. Expects a header row with "text" column.
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,iFAAiF;AACjF,gFAAgF;;;AAoPhF,8CAwCC;AA1RY,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDlC,CAAC;AAEF,yEAAyE;AAC5D,QAAA,sBAAsB,GAAG,2BAAmB,CAAC;AAE1D,gFAAgF;AAEnE,QAAA,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;oHAoB2E,CAAC;AAExG,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;+GAcwE,CAAC;AAEnG,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;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QACvG,SAAS,EAAE;YACT;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,0CAA0C;gBACvD,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,+EAA+E;QACjF,SAAS,EAAE,EAAqE;KACjF;CACF,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,UAAkB,EAClB,IAA6B;IAE7B,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,mBAAmB,CAAC,CAAC,CAAC;YACzB,MAAM,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI,gBAAgB,CAAC;YAC9C,OAAO;gBACL;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,4CAA4C,KAAK,gDAAgD;qBACxG;iBACF;aACF,CAAC;QACJ,CAAC;QAED,KAAK,kBAAkB;YACrB,OAAO;gBACL;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,uOAAuO;qBAC9O;iBACF;aACF,CAAC;QAEJ,KAAK,0BAA0B;YAC7B,OAAO;gBACL;oBACE,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,2BAAmB,EAAE;iBACrD;aACF,CAAC;QAEJ;YACE,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,EAAE,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { TotalReclaw } from '@totalreclaw/client';
2
- export type ImportSource = 'mem0' | 'mcp-memory' | 'memoclaw' | 'generic-json' | 'generic-csv';
2
+ export type ImportSource = 'mem0' | 'mcp-memory' | 'chatgpt' | 'claude' | 'memoclaw' | 'generic-json' | 'generic-csv';
3
3
  export interface ImportFromInput {
4
4
  source: ImportSource;
5
5
  api_key?: string;
@@ -18,8 +18,18 @@ export interface NormalizedFact {
18
18
  sourceTimestamp?: string;
19
19
  tags?: string[];
20
20
  }
21
+ export interface ConversationChunk {
22
+ title: string;
23
+ messages: Array<{
24
+ role: 'user' | 'assistant';
25
+ text: string;
26
+ }>;
27
+ timestamp?: string;
28
+ }
21
29
  export interface AdapterParseResult {
22
30
  facts: NormalizedFact[];
31
+ chunks: ConversationChunk[];
32
+ totalMessages: number;
23
33
  warnings: string[];
24
34
  errors: string[];
25
35
  source_metadata?: Record<string, unknown>;
@@ -85,6 +95,17 @@ export declare const importFromToolDefinition: {
85
95
  idempotentHint: boolean;
86
96
  };
87
97
  };
98
+ /**
99
+ * Handle import_from in the MCP context.
100
+ *
101
+ * Two paths:
102
+ * 1. Pre-structured sources (Mem0, MCP Memory) — adapter returns facts directly,
103
+ * stored via client.remember().
104
+ * 2. Conversation-based sources (ChatGPT, Claude) — adapter returns conversation
105
+ * chunks. The MCP server does NOT have direct LLM access, so it returns the
106
+ * parsed chunks as structured text with instructions for the host agent to
107
+ * use totalreclaw_remember for each important fact.
108
+ */
88
109
  export declare function handleImportFrom(client: TotalReclaw, args: unknown): Promise<{
89
110
  content: Array<{
90
111
  type: string;
@@ -1 +1 @@
1
- {"version":3,"file":"import-from.d.ts","sourceRoot":"","sources":["../../src/tools/import-from.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAgB,MAAM,qBAAqB,CAAC;AAQhE,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,CAAC;AAE/F,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;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AK,EAAE,cAAc,EAAE,CAAC;IACxB,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAYD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CpC,CAAC;AA2CF;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA4L7D"}
@@ -13,8 +13,8 @@ exports.importFromToolDefinition = {
13
13
  properties: {
14
14
  source: {
15
15
  type: 'string',
16
- enum: ['mem0', 'mcp-memory', 'memoclaw', 'generic-json', 'generic-csv'],
17
- description: 'The source system to import from',
16
+ enum: ['mem0', 'mcp-memory', 'chatgpt', 'claude', 'memoclaw', 'generic-json', 'generic-csv'],
17
+ description: 'The source system to import from (chatgpt: conversations.json or memory text; claude: memory text)',
18
18
  },
19
19
  api_key: {
20
20
  type: 'string',
@@ -81,11 +81,22 @@ async function loadAdapter(source) {
81
81
  }
82
82
  }
83
83
  // ── Handler ─────────────────────────────────────────────────────────────────
84
+ /**
85
+ * Handle import_from in the MCP context.
86
+ *
87
+ * Two paths:
88
+ * 1. Pre-structured sources (Mem0, MCP Memory) — adapter returns facts directly,
89
+ * stored via client.remember().
90
+ * 2. Conversation-based sources (ChatGPT, Claude) — adapter returns conversation
91
+ * chunks. The MCP server does NOT have direct LLM access, so it returns the
92
+ * parsed chunks as structured text with instructions for the host agent to
93
+ * use totalreclaw_remember for each important fact.
94
+ */
84
95
  async function handleImportFrom(client, args) {
85
96
  const input = args;
86
97
  const startTime = Date.now();
87
98
  // Validate source
88
- const validSources = ['mem0', 'mcp-memory', 'memoclaw', 'generic-json', 'generic-csv'];
99
+ const validSources = ['mem0', 'mcp-memory', 'chatgpt', 'claude', 'memoclaw', 'generic-json', 'generic-csv'];
89
100
  if (!input.source || !validSources.includes(input.source)) {
90
101
  return errorResponse(`Invalid source. Must be one of: ${validSources.join(', ')}`);
91
102
  }
@@ -100,10 +111,58 @@ async function handleImportFrom(client, args) {
100
111
  api_url: input.api_url,
101
112
  file_path: input.file_path,
102
113
  });
103
- if (parseResult.errors.length > 0 && parseResult.facts.length === 0) {
114
+ const hasChunks = parseResult.chunks && parseResult.chunks.length > 0;
115
+ const hasFacts = parseResult.facts && parseResult.facts.length > 0;
116
+ if (parseResult.errors.length > 0 && !hasFacts && !hasChunks) {
104
117
  return errorResponse(`Failed to parse ${adapter.displayName} data:\n` +
105
118
  parseResult.errors.join('\n'));
106
119
  }
120
+ // ── Path 2: Conversation chunks (ChatGPT, Claude) ──────────────────
121
+ // MCP server has no LLM access — return parsed data with instructions
122
+ // for the host agent to extract and store facts.
123
+ if (hasChunks) {
124
+ if (input.dry_run) {
125
+ return {
126
+ content: [{
127
+ type: 'text',
128
+ text: JSON.stringify({
129
+ success: true,
130
+ dry_run: true,
131
+ source: input.source,
132
+ total_chunks: parseResult.chunks.length,
133
+ total_messages: parseResult.totalMessages,
134
+ preview: parseResult.chunks.slice(0, 5).map((c) => ({
135
+ title: c.title,
136
+ messages: c.messages.length,
137
+ first_message: c.messages[0]?.text.slice(0, 100),
138
+ })),
139
+ warnings: ['DRY RUN — no facts were imported.', ...parseResult.warnings],
140
+ }),
141
+ }],
142
+ };
143
+ }
144
+ // Format chunks as readable text for the host agent to process.
145
+ // The agent should read through these and call totalreclaw_remember
146
+ // for each important fact it identifies.
147
+ const chunkTexts = parseResult.chunks.map((chunk, i) => {
148
+ const header = `--- Conversation ${i + 1}/${parseResult.chunks.length}: ${chunk.title} ---`;
149
+ const msgs = chunk.messages.map((m) => `[${m.role}]: ${m.text}`).join('\n');
150
+ return `${header}\n${msgs}`;
151
+ });
152
+ const instructions = `I parsed ${parseResult.chunks.length} conversation chunks (${parseResult.totalMessages} messages) ` +
153
+ `from ${adapter.displayName}. ` +
154
+ `Please review the conversations below and use totalreclaw_remember to store each important fact ` +
155
+ `you identify. Focus on: personal facts, preferences, decisions (with reasoning), goals, ` +
156
+ `and active project context. Skip greetings, small talk, and ephemeral task coordination.\n\n` +
157
+ chunkTexts.join('\n\n');
158
+ return {
159
+ content: [{
160
+ type: 'text',
161
+ text: instructions,
162
+ }],
163
+ };
164
+ }
165
+ // ── Path 1: Pre-structured facts (Mem0, MCP Memory) ────────────────
107
166
  // Dry run — just report what would be imported
108
167
  if (input.dry_run) {
109
168
  const result = {
@@ -1 +1 @@
1
- {"version":3,"file":"import-from.js","sourceRoot":"","sources":["../../src/tools/import-from.ts"],"names":[],"mappings":";;;AAmJA,4CAyIC;AA3RD,yCAAoC;AACpC,8CAA6D;AAwD7D,+EAA+E;AAElE,QAAA,wBAAwB,GAAG;IACtC,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,yCAA4B;IACzC,WAAW,EAAE;QAC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ACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;aACzD,CAAC;KACH,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@totalreclaw/mcp-server",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "End-to-end encrypted memory for AI agents — portable, yours forever. MCP server with AES-256-GCM E2EE, semantic search, import/export, and on-chain storage",
5
5
  "homepage": "https://totalreclaw.xyz",
6
6
  "main": "dist/index.js",