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: recall
安裝與設定
先從官方匯出對話:
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
This server cannot be deployed
Maintenance
Related MCP Connectors
Read and search folders on your own computer with explicit consent. Files are never uploaded.
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
Safe folder access for ChatGPT and Claude: read, write and search files, risky tools opt-in.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables searching and browsing of Claude conversation history with hybrid search combining full-text, Spotlight, and optional vector embeddings.1024 PyPI1MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to search through its own past sessions using full-text search and resume them. Works offline with zero runtime dependencies.MIT
- AlicenseNot gradedqualityAmaintenanceEnables Claude to search locally indexed exported chat history and project docs, retrieving full messages and conversation IDs via full-text search.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to semantically search your entire local conversation history from Claude Desktop, ChatGPT and Claude Code, and to retrieve, browse, ingest and report on those conversations. All embeddings run locally, so no cloud, API keys, or data leave your machine.2MIT