Time Aware Server
БесплатноНе проверенProvides a time_now tool to retrieve the current time, enabling time-sensitive queries in AI agents.
Описание
Provides a time_now tool to retrieve the current time, enabling time-sensitive queries in AI agents.
README
Make your AI agents time-aware with this simple and efficient Model Context Protocol (MCP) server! This server provides a fundamental building block for time-sensitive AI applications by offering a tool to get the current time.
Built with Python and FastMCP, it's lightweight, easy to integrate, and ready to be extended with more sophisticated time-related functionalities.
✨ Key Features
time_nowTool: Instantly retrieve the current time in ISO 8601 format (e.g., "16:30:00").- MCP Native: Seamlessly integrates with MCP clients like Claude for Desktop, enabling AI agents to access real-time information.
- Lightweight & Fast: Minimal overhead, ensuring quick responses.
- Easily Extensible: A clean foundation to add more time-related tools (e.g., time zone conversions, date calculations, countdowns).
- Docker Ready: Includes a Dockerfile for easy containerization and deployment (see Docker usage section below).
- Python Powered: Leverages the robustness and flexibility of Python using FastMCP.
Prerequisites
- Python 3.10 or higher
piporuvfor package management
Usage with docker
{
"mcpServers": {
"time_server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"harshpreet931/time_server"
]
}
}
}
Setup and Installation
Clone the repository (or download the files):
# If this were a git repo already: # git clone <repository-url> # cd time-aware-mcp-serverCreate a virtual environment (recommended): Using
venv:python -m venv .venv source .venv/bin/activate # On Windows: .\.venv\Scripts\activateOr using
uv:uv venv source .venv/bin/activate # On Windows: .\.venv\Scripts\activateInstall dependencies: Using
pip:pip install "mcp[cli]"Or using
uv:uv add "mcp[cli]"(You can also create a
requirements.txtfile withmcp[cli]and runpip install -r requirements.txtoruv pip install -r requirements.txt)Run the server:
python time_server.pyOr using
uv:uv run time_server.py
Configure MCP Client (Example: Claude for Desktop)
To use this server with an MCP client like Claude for Desktop, you need to add its configuration to the client's settings file.
Locate your Claude for Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json(e.g.,C:\Users\<YourUser>\AppData\Roaming\Claude\claude_desktop_config.json) - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
Add the server configuration to the
mcpServersobject. Replace/absolute/path/to/with the actual absolute path to yourtime_server.pyfile.{ "mcpServers": { "time_server": { "command": "python", "args": [ "/absolute/path/to/time_server.py" ] } // Add other servers here if you have them } }Important: Ensure the path to
time_server.pyis correct. If you are running the server from within a virtual environment, thepythoncommand should ideally point to the Python interpreter in that virtual environment, or you should ensure themcplibrary is globally accessible if not using a venv path in the command. For simplicity, the example usespython, assuming it's in your PATH and can find themcplibrary.
Usage
Once the server is running and the MCP client is configured, you can ask the AI agent to use the time_now tool.
Example Interaction:
User to AI Agent: "What time is it now?" or "Can you get the current time using the time_now tool?"
AI Agent (after using the time_now tool):
The tool will return the current time, for example: "16:30:00" (depending on the actual current time).
Error Handling:
The time_now tool does not take any input parameters, so specific input validation errors are not applicable to the tool itself. General server or MCP communication errors would be handled by the MCP framework or the client.
Contributing
Contributions are welcome! If you'd like to add more time-related tools or improve existing functionality, please feel free to fork the repository, make your changes, and submit a pull request.
When contributing, please ensure:
- Code is well-documented.
- New tools are tested.
- You follow the existing coding style.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Установка Time Aware Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/harshpreet931/time-aware-agentsFAQ
Time Aware Server MCP бесплатный?
Да, Time Aware Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Time Aware Server?
Нет, Time Aware Server работает без API-ключей и переменных окружения.
Time Aware Server — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Time Aware Server в Claude Desktop, Claude Code или Cursor?
Открой Time Aware Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Time Aware Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
