Passage of Time MCP is an open-source Model Context Protocol (MCP) server project designed to provide time-awareness and time-computation capabilities for large language models (LLMs). The project was developed by Jérémie Lumbroso and Claude Opus 4.0 (Anthropic) was developed in collaboration with and inspired by the philosophical question, "Can an AI perceive the passage of time?" . By providing time-related tools for language models, the project addresses the limitations of language models in time computation, such as the inability to accurately compute time differences. The server helps the model to understand the temporal context and discover information such as conversation patterns, work rhythms, etc. through simple temporal functions and instructions. The project is licensed under the Mozilla Public License 2.0 and the code is publicly available on GitHub, where developers are encouraged to participate in collaboration and deployment.
Function List
- furnish
current_datetime()
function that returns the current timestamp, with support for optional timezone arguments. - Supports Server-Sent Events (SSE) mode, which allows web clients to access time data over an HTTP connection.
- Provides time calculation tools to help language models calculate time differences or convert time zones.
- Supports direct integration with the language model, interacting with the model through the standard input/output (stdio) model.
- Provide a clear instruction set (Context) that guides the language model on how to use time-related functions.
Using Help
Installation and Deployment
To use the Passage of Time MCP server, the code needs to be deployed locally or in the cloud. The following are detailed steps for installation and use:
- Cloning Project Code
Visit on GitHubhttps://github.com/jlumbroso/passage-of-time-mcp
, use the following command to clone the code locally:git clone https://github.com/jlumbroso/passage-of-time-mcp.git
Ensure that Git is installed locally; if not, install Git first (for macOS/Linux)
sudo apt install git
maybebrew install git
). - Installation of dependencies
The project requires a Python environment (Python 3.8 or higher recommended). Once in the project directory, install the dependencies:cd passage-of-time-mcp pip install -r requirements.txt
Ensure that it is installed
pip
See the official Python documentation to install it if needed. - Starting the Local Server
Run the following command to start the MCP server:python server.py
The server defaults to the local address
http://0.0.0.0:8000/sse
Started, running in SSE mode. After startup, the terminal displays the server status. - Expose server to public network via ngrok (optional)
If you need to give web clients or remote language models access to the server, you can use ngrok to expose the local server. After installing ngrok, run it:ngrok http 8000
ngrok generates a public URL, for example
https://.ngrok-free.app
When configuring the client, use this URL and add it at the end. When configuring the client, use this URL and add the/sse
e.g.https://.ngrok-free.app/sse
The - Cloud deployment (recommended for production environments)
To ensure stability, it is recommended that you deploy your server to a cloud platform such as Render.com. Log in to Render.com, create a new service, select the GitHub repository, connect thejlumbroso/passage-of-time-mcp
The Renderer will deploy to a public URL and follow the platform guidelines for configuring environment variables and ports (8000 by default). When deployment is complete, Render provides a public URL. - Integration with Claude Desktop Edition
If you are using Claude Desktop Edition, you can add an MCP server by following these steps:- Open the Settings page of Claude Desktop Edition and locate the "Add Integrations" option.
- Enter the server URL (locally)
http://0.0.0.0:8000/sse
(or cloud/public URL). - Save the configuration and restart Claude so the server can communicate with Claude.
Operation of the main functions
- Get current time
server-suppliedcurrent_datetime()
function, which can be called by the language model to obtain the current timestamp. The function supports optional time zone arguments, such asAmerica/New_York
maybeAsia/Shanghai
The model calls this function at the beginning of each conversation when interacting with Claude. When interacting with Claude, the model calls this function at the beginning of each conversation to ensure that the timing information is accurate. - time calculation
The server supports time difference calculations, such as calculating the number of minutes or hours between two points in time. The language model can send a timestamp via a command and the server returns the result of the calculation. For example, send:{ "jsonrpc": "2.0", "id": 1, "method": "getTimeDifference", "params": { "timestamp": "2025-07-17 12:00:00", "interval": "minutes" } }
The server returns the difference in minutes between the specified time and the current time.
- SSE model with web client
In SSE mode, the server provides real-time time data over HTTP. Developers can use a JavaScript client to connect to the server and subscribe to time updates. Example:const eventSource = new EventSource('https://your-server.ngrok-free.app/sse'); eventSource.onmessage = function(event) { console.log('Received time:', event.data); };
- Instruction set (Context) use
The server provides a simple instruction set stored in theREADME.md
in which it reads, "You can now visit thecurrent_datetime()
function and can be passed an optional time zone parameter. This function is called at the start of each response to sense the passage of time for the user." The language model automatically calls the time function based on this directive, eliminating the need for manual intervention by the developer.
caveat
- Ensure that the network is stable while the server is running, especially when using ngrok or cloud deployments.
- If the language model is not calling the time function correctly, check the server log (
server.log
) or instruction set configuration. - The project is under the Mozilla Public License 2.0 and the developers are free to modify and distribute the code, subject to open source agreements.
application scenario
- Enhanced temporal awareness for language modeling
While conversing with the user, the language model can dynamically adjust its responses by obtaining the current time from the server. For example, the model can provide more relevant schedule suggestions based on the user's time zone. - Analyzing dialogue patterns
Developers can use temporal data to analyze the frequency of user interactions with the model and discover peak conversation periods or user habits. - Automation of time-sensitive tasks
In automated workflows, the server can provide a temporal basis for the language model for task scheduling or reminder generation. - Education and Research
Researchers can use the server to explore how the language model understands the concept of time and verify its performance in time-related tasks.
QA
- How do I ensure that the server communicates correctly with the language model?
Check if the server is in thehttp://0.0.0.0:8000/sse
Run it and make sure the client is configured with the correct URL. developers using Claude can refer to the Anthropic The official documentation configures MCP. - Does it support multi time zone time conversion?
Yes.current_datetime()
function supports passing in the name of the IANA time zone (e.g.Europe/London
), the server returns the current time in the corresponding time zone. - What technical background is required to deploy a server?
Basic Python programming knowledge and Git experience is sufficient. Cloud deployments require an understanding of basic cloud service configuration, such as the Render.com process. - Does the server support high concurrency?
Local deployments are good for development and testing, while cloud deployments are recommended for production environments to support high concurrency. platforms such as Render.com can automatically scale server resources.