Context Travel MCP

Context Travel MCP

Enables Claude agents to checkpoint their context state and reset back to saved points with handoff messages, maintaining clean context windows during complex tasks by avoiding fragmented summaries from compactions.

Category
访问服务器

README

Context Travel MCP

An MCP server that gives Claude agents conscious control over their context lifecycle through "time travel"—the ability to checkpoint their mental state and later reset back to it with a message to their future self.

Why?

After multiple compactions, agents become confused by fragmented summaries. The "golden window" is right after orientation when understanding is complete and context is clean. This MCP lets agents:

  1. Checkpoint that golden state
  2. Work on complex tasks
  3. Reset back to the checkpoint with a handoff note
  4. Continue fresh, with full fidelity

Installation

# Run directly with npx
npx -y github:simen/mcp-memento

# Or install globally
npm install -g github:simen/mcp-memento

Claude Code Configuration

Add to your MCP settings (~/.claude/settings.json or project settings):

{
  "mcpServers": {
    "memento": {
      "command": "npx",
      "args": ["-y", "github:simen/mcp-memento"]
    }
  }
}

Tools

checkpoint_context

Save your current context state as a named checkpoint.

checkpoint_context(name: "oriented", note?: "Understood the auth system")

When to use:

  • After fully understanding a codebase or task
  • Before starting a large, context-heavy operation
  • When you feel sharp and well-oriented

reset_to_checkpoint

Reset context to a checkpoint, injecting a handoff message to your future self.

reset_to_checkpoint(
  name: "oriented",
  message_to_self: "Bug fixed in auth/refresh.ts:142. Next: implement caching layer."
)

The message_to_self should include:

  • What was accomplished since the checkpoint
  • Key findings and decisions
  • Clear next steps
  • Critical details (file paths, variable names, gotchas)

list_checkpoints

Show available checkpoints for the current session.

get_context_stats

Get statistics about your current context window health:

  • Turn counts
  • Estimated tokens
  • Compaction events
  • Health indicator

delete_checkpoint

Remove a checkpoint you no longer need.

System Prompt Integration

Add to your agent's system prompt:

## Context Time Travel

You have tools for managing your own context window:

- `checkpoint_context(name)` — Save your current mental state
- `reset_to_checkpoint(name, message_to_self)` — Jump back with a note to yourself
- `list_checkpoints()` — See available restore points
- `get_context_stats()` — Check context health

**Good checkpoint moments:**
- After fully understanding a task or codebase
- Before starting a large exploration or refactor
- When you feel well-oriented and productive

**When to reset:**
- Context feels cluttered with old explorations
- You've completed a major task and want fresh space
- You notice confusion from summarized context

**Writing message_to_self:**
Write as if briefing a colleague taking over. Include what you did, key decisions, and specific next steps.

Session Discovery

The MCP discovers the current session via (in order):

  1. CLAUDE_SESSION_ID environment variable
  2. ~/.claude/debug/latest symlink
  3. Most recent .jsonl in the PWD-based project directory

Environment Variables

Variable Description
CLAUDE_SESSION_ID Explicit session ID
CLAUDE_PROJECTS_DIR Override projects directory (default: ~/.claude/projects)
CLAUDE_CHECKPOINTS_DIR Override checkpoints directory (default: ~/.claude/checkpoints)

How It Works

Claude Code stores sessions as JSONL files at ~/.claude/projects/<escaped-cwd>/<session-id>.jsonl. Each line is a JSON object representing a message, tool use, or summary.

Checkpoint = copy the session file Reset = restore the file + append handoff message Handoff = synthetic user message injected after restore

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选