mcp-server-chat-history
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-chat-historysearch my past conversations for the regex question I asked last year"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-chat-history
把你的 ChatGPT / Claude 匯出檔變成 MCP server。設定好之後,Claude 可以直接用工具呼叫搜尋、翻閱你過去和 AI 的全部對話——「我去年問過怎麼寫 regex」這種問題,讓 AI 自己去翻。
本機執行,只讀取你指定的檔案,没有網路請求。
提供的工具
工具 | 說明 |
| 全文搜尋所有對話,回傳命中片段(可只搜你送出的訊息) |
| 列出對話標題、時間、訊息數 |
| 依標題讀出完整對話內容 |
支援 ChatGPT 與 Claude 官方匯出的 conversations.json,自動偵測格式。
Related MCP server: cowork-history
安裝與設定
先從官方匯出對話:
ChatGPT:設定 → Data controls → Export data
Claude:設定 → Privacy → Export data
解壓縮後記下 conversations.json 的路徑,然後擇一設定:
Claude Code
claude mcp add chat-history -- uvx --from "git+https://github.com/ilovecat1005/mcp-server-chat-history" mcp-server-chat-history --file /path/to/conversations.jsonClaude Desktop(claude_desktop_config.json)
{
"mcpServers": {
"chat-history": {
"command": "uvx",
"args": [
"--from", "git+https://github.com/ilovecat1005/mcp-server-chat-history",
"mcp-server-chat-history",
"--file", "/path/to/conversations.json"
]
}
}
}需要先裝好 uv。不想用 uv 的話,pipx install "mcp-server-chat-history @ git+https://github.com/ilovecat1005/mcp-server-chat-history" 之後把 command 換成 mcp-server-chat-history 也可以。
已知限制
匯出檔是快照:新對話不會自動出現,重新匯出後重啟 server 即可
大型匯出檔(幾萬則訊息)啟動解析約需數秒
只支援官方匯出格式
開發
python3 -m unittest discover -s tests -v原始碼結構:history.py 是純邏輯(解析、搜尋),server.py 只是把三個函式接上 MCP 協定。
授權
MIT
Related MCP Connectors
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Give Claude only the Google Drive files you choose. Every action logged.
Search and read your Laxis meeting transcripts, AI summaries, and participants from Claude.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables Claude Code to search and retrieve past chat history from Claude.ai exports and Claude Code sessions, allowing the AI to reference previous conversations and decisions.MIT
- AlicenseBqualityCmaintenanceEnables searching and browsing of Claude conversation history with hybrid search combining full-text, Spotlight, and optional vector embeddings.101MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to search through its own past sessions using full-text search and resume them. Works offline with zero runtime dependencies.MIT
- AlicenseNot gradedqualityBmaintenanceProvides Claude with read-only access to your WhatsApp chat history entirely on your local machine, enabling natural language search, summarization, and retrieval of messages without sending data to the cloud.6 npmMIT