Skip to main content
Glama

handoff-mcp

MCP 服务器,充当跨多个 LLM(Claude、Gemini、Copilot、Codex)的共享内存中心。任何进入项目的智能体都能立即理解其架构、模式和决策,并能从上一个 LLM 停止的地方无缝接手。

工具

工具

描述

create_or_get_project

初始化或获取项目

save_architecture

保存架构概览和技术栈

get_project_summary

完整的项目概览 — 非常适合作为首次调用

save_context_snapshot

在交接前保存工作状态

get_context_snapshot

获取上一个 LLM 的工作内容

list_sessions

列出所有已保存的会话

save_code_pattern

保存可重用的代码模式(如 JWT、FCM 等)

get_code_patterns

按类别/语言检索模式

save_architectural_decision

保存 ADR(架构决策记录,即为何做出某项决策)

get_decisions

检索架构决策

search_context

跨模式、决策和快照进行搜索

Related MCP server: Waymark

安装

要求: Bun

git clone https://github.com/Juan-Severiano/handoff-mcp
cd handoff-mcp
bun install

配置

将 /path/to/handoff-mcp 替换为您克隆仓库的绝对路径。

Claude Desktop

文件:~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "handoff-mcp": {
      "command": "bun",
      "args": ["/path/to/handoff-mcp/src/index.ts"]
    }
  }
}

Claude Code

claude mcp add handoff-mcp bun /path/to/handoff-mcp/src/index.ts

Gemini CLI

文件:~/.gemini/settings.json

{
  "mcpServers": {
    "handoff-mcp": {
      "command": "bun",
      "args": ["/path/to/handoff-mcp/src/index.ts"]
    }
  }
}

GitHub Copilot (VS Code)

文件:工作区中的 .vscode/mcp.json,或 VS Code 用户 settings.json:

{
  "servers": {
    "handoff-mcp": {
      "type": "stdio",
      "command": "bun",
      "args": ["/path/to/handoff-mcp/src/index.ts"]
    }
  }
}

OpenAI Codex CLI

文件:~/.codex/config.yaml

mcpServers:
  handoff-mcp:
    command: bun
    args:
      - /path/to/handoff-mcp/src/index.ts

数据库路径 (可选)

默认情况下,context.db 会在工作目录中创建。可通过环境变量覆盖:

{
  "mcpServers": {
    "handoff-mcp": {
      "command": "bun",
      "args": ["/path/to/handoff-mcp/src/index.ts"],
      "env": { "DB_PATH": "/your/shared/path/context.db" }
    }
  }
}

提示:将所有 LLM 指向同一个 DB_PATH,以便它们在不同工具间共享同一个数据库。

流程

Claude works on the project
→ create_or_get_project("my-app")
→ save_architecture({ description: "React Native + Spring Boot" })

Claude runs low on tokens
→ save_context_snapshot({
    llmModel: "claude-opus-4",
    taskDescription: "Implementing push notifications",
    recentChanges: "FCM handler done",
    nextSteps: "Wire up Foreground Service, test Android 16"
  })

Gemini takes over
→ get_project_summary("my-app")      # full context in one call
→ get_context_snapshot("my-app")     # picks up exactly where Claude stopped
→ continues...

开发

bun run dev      # watch mode
bun run inspect  # MCP Inspector
bun run build    # compile to dist/

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers