mcp-server-chat-history

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

PyPI - Version Python

Install with UV in VS Code Install with UV in VS Code Insiders Run in Docker

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 user
  • get_chat: Fetch full chat by chat_id
  • search_chats: Search a user's chats by keyword
  • save_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

ToolParamsDescription
list_chatsuser_id:str, limit:int=10List a user’s recent chats
get_chatchat_id:strFetch full chat data
search_chatsuser_id:str, query:strSearch for a keyword
save_messagechat_id:str, role:str, message:strAppend a message to a chat

License

MIT

See for the entrypoint.