Purpose
mem_export exports LongMem data to JSON or Markdown format. Use this for:
- Backup: Export your entire memory for safekeeping
- Analysis: Get structured data for external tools
- Sharing: Create readable reports of coding sessions
- Archival: Export and save memories from completed projects
Parameters
Filter by project name (optional — omit for all projects)
Only include last N days (default: all, max: 365)
Export format:
json or markdownInclude raw tool_input and tool_output in export (increases size significantly)
Response Format
JSON Format (default)
Returns a summary of the exported data:exported_at: Timestamp of exportsessions: Array of coding sessionsobservations: Array of tool observationsuserObservations: Array of user-created notesconcepts: Array of extracted concepts
Markdown Format
Returns formatted markdown (truncated to 8000 chars in response):Usage Example
Export everything:Tips
- Large exports: Full exports can be large. Consider filtering by project or days
- include_raw: Only use
include_raw: truewhen you need complete tool input/output data - Markdown for humans: Use markdown format for readable reports and sharing
- JSON for tools: Use JSON format for programmatic analysis or backup
- Response truncation: Markdown responses are truncated in MCP responses. The full export is generated but only preview is shown
- Backup strategy: Export regularly by project to keep manageable snapshots
- Days parameter: Use days to limit scope — e.g., export last 7 days for weekly reviews