An MCP (Model Context Protocol) server that integrates with ChronoLog, a scalable, high-performance distributed shared log store. This server exposes tools to manage interactions between LLM's and User's, making it easy to capture and retrieve events in a structured format.
The MCP server provides a unified architecture for both real-time capturing of conversation (prompts and responses) and long-term playback of structured event sequences using custom tools, along with additional features such as automated generation and storage of session summaries. MCP servers allow teams to rapidly spin up domain-specific logging interfaces—whether for R&D notebooks, mental-health tracking, or real-time chat systems—without reinventing the I/O layer.
The MCP server isn’t limited to a single LLM or user session, multiple clients and LLM instances can connect simultaneously, read from one another’s chronicles, and share context in real time.
- start_chronolog: Creates a chronicle and acquires a story handle.
- record_interaction: Appends log events to the active story.
- stop_chronolog: Releases the story and disconnects the client.
- retrieve_interaction: Returns the logs or messages from the past.
- Python 3.11
- py_chronolog_client Python package
- mcp-server package
python-dotenv
for environment variable management- Command-line runner
uv
(install withpip install uv
) - .env file in the src folder for the client.
For ChronoLog Installation and Deployment, refer to ChronoLog Setup.
A command-line client that connects to the ChronoLog MCP server, uses Google Gemini as the LLM, and automatically records every user ↔ assistant exchange back into ChronoLog.
With the Custom MCP Client you do not need to invoke the record_interaction tool as it automatically invokes the tool and stores each conversation between the user and assistant in real time.
.env example
GEMINI_API_KEY=sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXX
-
Clone the repository
git clone https://github.com/sohamvsonar/ChronoMCP.git
-
Install UV runner
pip install uv
-
Running the Client
uv run client.py
- Start Chronolog
- Have Conversation
- Retrieve Interaction
- Stop Chronolog
You can connect the mcp server with any of the open source MCP Clients such as Microsoft Visual Studio Copilot, Claude AI, Windsurf,etc. Simply add the configuration below to your Clients settings.json and start the server, the tools will automatically get loaded in your client.
Add the following to your settings.json
file on Claude or any other client:
{
"chronolog-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/the/directory",
"run",
"server.py"
]
}
}
Some Samples from Visual Studio Copilot:
Run the MCP server or client to register the ChronoLog tools:
By default, the server listens for MCP tool invocations and exposes:
-
start_chronolog()
- Description: Connects to ChronoLog, creates a chronicle, and acquires a story handle.
- Returns: Confirmation message with chronicle and story identifiers.
-
record_interaction(event: str)
- Description: Logs the given event string of user message and LLM output message to the acquired story.
- Args:
event
(str): The event name or message to record.
- Returns: Confirmation of event logging.
-
stop_chronolog()
- Description: Releases the story handle and disconnects from ChronoLog.
- Returns: Confirmation of clean shutdown.
-
retrieve_interaction()
- Description: Extracts only the records from a specified chronicle and story, writes them to a timestamped text file. Supports both raw nanosecond timestamps and human-readable dates (e.g. “yesterday”, “2025-04-30”).
- Returns: Generated text file (e.g. records_LLM_conversation_20250502123045.txt), or an error message if the reader fails or finds no record
- Use Case samples:
- Prompt "retrieve our interaction from yesterday and add it with the session chat to make a summary."
- Prompt "retrieve yesterday's interaction with chronicle name research and story name systems"
ChronoMCP/
├── assets # Images
├── README.md # ← This file
├── docs # ChronoLog Installation and deployment guide
├── pyproject.toml # Python package config
├── uv.lock # Dependency lock file
└── src/
└── chronomcp/
├── server.py # ChronoLog MCP Server
├── capabilities/ # MCP Capabilities (start, record, retrieve, stop)
│ ├── start_handler.py
│ ├── record_handler.py
│ ├── stop_handler.py
│ └── retrieve_handler.py
├── util/
│ ├── config.py # Chronolog client config
│ └── helpers.py # Time parsing and reader function
└── reader_script/ # reader emulator
├── build
├── reader.cpp
├── CMakeLists.txt
└── HDF5ArchiveReadingAgent.h
We’re actively working on additional improvements (search, summaries, analytics, etc.). Contributions and feature requests are welcome!