sync-hub
sync-hub
一个本地小守护进程(仅限 macOS —— launchd、~/Library/...),用于将本地 AI 对话历史(Claude Code、Codex CLI、Claude Cowork、Antigravity、Claude.ai/ChatGPT 导入)逐字集中到单一 SQLite 数据库中,并通过以下方式暴露:
Web 仪表板(项目树、全文搜索、聊天视图、同步覆盖范围、未关联会话的分类);
MCP 服务器,Claude Code、Codex 和 Antigravity 可直接查询,以获取另一工具的确切上下文,绝不摘要或重建——始终是原始文本。
绝不猜测:工作目录与任何已知项目都不匹配的会话会进入“未分配”桶,可见且可分类,而不是通过启发式方法进行关联。
为什么
在相同项目上使用多种 AI 工具,每次切换工具都会丢失上下文。sync-hub 不会向工具同步任何内容(它从不触碰其他工具的原生存储)——它只读取本地已有的内容,并让任何通过 MCP 连接的工具都能查询。
Related MCP server: flightlog
安装
前提条件:macOS、Node.js ≥ 20(better-sqlite3 对较新版本有预构建——常规情况下无需编译工具)。
git clone <url-de-ce-repo>
cd sync-hub
npm install
npm run build
./scripts/install_service.sh # installe un service launchd macOS (démarre à la connexion)仪表板服务在 http://127.0.0.1:4000 上提供(默认仅限本地)。
卸载:./scripts/uninstall_service.sh。
环境变量(均为可选)
变量 | 默认值 | 用途 |
|
| 扫描以发现项目的根目录 |
|
| SQLite 数据库和日志的位置 |
|
| 批量导出文件夹(ChatGPT、Claude.ai) |
|
| 仪表板/API 端口 |
|
| 监听接口(默认保持本地) |
连接 MCP 服务器
# Claude Code
claude mcp add sync-hub -s user -- node <repo>/dist/server/mcp-entry.js
# Codex — dans ~/.codex/config.toml
[mcp_servers.sync-hub]
command = "node"
args = ["<repo>/dist/server/mcp-entry.js"]暴露的工具:
逐字读取:
get_project_timeline、get_thread、search_transcripts线程间连续性:
link_threads、unlink_thread、get_thread_link_updates(仅增量)项目管理(与仪表板相同的操作):
list_projects、list_threads、rename_project、merge_projects、assign_thread_to_project、archive_thread、archive_project
导入 Claude.ai / ChatGPT 导出
将导出文件放入 imports/claude/ 或 imports/chatgpt/,然后重新扫描(仪表板上的“重新扫描”按钮,或 POST /api/sync/rescan)。
开发
npm run dev # client (Vite) + serveur (tsx watch) en parallèle
npm test # suite de tests (vitest)
npm run lint # typecheck架构
src/core/db.ts— SQLite 模式 + 数据访问。src/core/registry.ts— 项目 ↔ 会话解析(仅精确匹配,绝无启发式)。src/core/adapters/— 每个来源一个适配器(Claude Code、Codex、Cowork、Antigravity、批量导出)。src/core/watch.ts— 实时监视新会话。src/core/mcp-server.ts— MCP 服务器。src/server/— REST API + WebSocket(Fastify)。src/client/— 仪表板(React + Vite + Tailwind)。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA single MCP server that gives Claude, ChatGPT, Codex, and any MCP-compatible AI access to the same personal context via two tools: context_get and context_log.1MIT
- AlicenseAqualityDmaintenanceAn MCP server that indexes Claude Code conversation history into SQLite, enabling full-text search across past sessions for context recovery and cross-agent observability.103MIT
- AlicenseNot gradedqualityBmaintenanceCapture, index, and search your Claude Code conversation history. Provides an MCP server for Claude Code to query its own past conversations.11MIT
- FlicenseNot gradedqualityCmaintenanceCollects session JSONL from Codex and Claude Code into local SQLite memory, exposed through MCP with tools for memory context, search, get, put, forget, sleep, and status.
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
One memory, every AI: Claude, ChatGPT, Perplexity, Gemini, Cursor, OpenClaw, Hermes, any MCP client.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/robjo82/sync-hub'
If you have feedback or need assistance with the MCP directory API, please join our Discord server