mcp-server-chat-history
1
MCP Server Chat History provides access to chat histories and enables search functionalities for agentic LLMs and clients. Key features include listing, fetching, and searching chats, as well as saving messages to chats.
MCP Server Chat History
A Model Context Protocol server that provides chat history access and search for agentic LLMs and clients.
Features
list_chats
: List recent chats for a userget_chat
: Fetch full chat by chat_idsearch_chats
: Search a user's chats by keywordsave_message
: Append a message to a chat
Quickstart
Install (pip or uv)
pip install mcp-server-chat-history
python -m mcp_server_chat_history
or
uv pip install mcp-server-chat-history
uv run -m mcp_server_chat_history
Docker
docker build -t mcp/chat-history .
docker run -it --rm -p 3000:3000 -v /absolute/path/to/chats:/chats mcp/chat-history
Configuration
Set QODO_CHATLOGS_DIR
for your chat logs (default: /chats
in Docker, $HOME/all_qodo_chatlogs
otherwise):
export QODO_CHATLOGS_DIR=/path/to/your/chatlogs
Usage
After starting the server, connect from your MCP client and call the provided tools.
Available Tools
Tool | Params | Description |
---|---|---|
list_chats | user_id:str, limit:int=10 | List a user’s recent chats |
get_chat | chat_id:str | Fetch full chat data |
search_chats | user_id:str, query:str | Search for a keyword |
save_message | chat_id:str, role:str, message:str | Append a message to a chat |
License
MIT
See for the entrypoint.