Time-MCP
Provides a time API endpoint that returns the current timestamp, which the MCP agent can query when handling time-related questions
Connects to OpenRouter (an OpenAI-compatible API) to access language models for generating responses to user queries
Offers a chat interface for users to interact with the MCP agent, allowing them to ask time-related and general questions
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Time-MCPwhat time is it in Tokyo right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
time-mcp
A minimal agentic AI system that answers time-related and general questions using a tool-augmented LLM pipeline.
Features
Flask API: Provides the current timestamp.
MCP Agent Server: Reasoning agent that detects user intent, calls tools (like the time API), engineers prompts, and interacts with an LLM via OpenRouter (OpenAI-compatible API).
Streamlit UI: Simple chat interface to talk to the AI agent.
Related MCP server: MCP: Multi-Agent Control Point
Setup
1. Clone and Install Dependencies
pip install -r requirements.txt2. Environment Variable
Set your OpenRouter API key (get one from https://openrouter.ai):
export OPENROUTER_API_KEY=sk-...your-key...3. Run the Servers
Open three terminals (or use background processes):
Terminal 1: Flask Time API
python flask_api.pyTerminal 2: MCP Agent Server
python mcp_server.pyTerminal 3: Streamlit UI
streamlit run streamlit_ui.pyThe Streamlit UI will open in your browser (default: http://localhost:8501)
Usage
Ask the agent any question in the Streamlit UI.
If you ask about the time (e.g., "What is the time?"), the agent will call the Flask API, fetch the current time, and craft a beautiful, natural response using the LLM.
For other questions, the agent will answer using the LLM only.
Architecture
[Streamlit UI] → [MCP Agent Server] → [Tools (e.g., Time API)]
↓
[LLM via OpenRouter]The MCP agent detects intent, calls tools as needed, engineers prompts, and sends them to the LLM.
Easily extensible to add more tools (just add to the MCPAgent class).
Customization
Add more tools: Implement new methods in
MCPAgentand updateself.tools.Improve intent detection: Extend
detect_intent()inMCPAgent.Change LLM model: Update the
modelfield incall_llm().
Requirements
Python 3.7+
See
requirements.txtfor dependencies.
Credits
Built using Flask, Streamlit, OpenRouter, and Python.
Inspired by agentic LLM design patterns.
This server cannot be deployed
Maintenance
Related MCP Connectors
Wall-clock awareness for LLM agents. Two tools: elapsed-time-between-turns + day rollover detection.
Current time, timezone conversion & date math for AI agents. On Cloudflare Workers.
A real clock for AI agents: current time, timezone conversion, and DST facts from the IANA tzdb.
Minimal chat-first app with durable threads, actions, and the app-agent loop
Related MCP Servers
- AlicenseBqualityDmaintenanceGiving LLMs Time Awareness Capabilities. Empower your LLMs with time awareness capabilities. Access current time, convert between timezones, and get timestamps effortlessly. Enhance your applications with precise time-related functionalities.61,863 npm72MIT
- FlicenseNot gradedqualityDmaintenanceA server that routes user questions to specialized agents (date, location, weather) or an LLM expert, with a simple Streamlit web interface for easy interaction.-
- AlicenseNot gradedqualityNot gradedmaintenanceProvides AI agents with precise, locale-aware date and time data across multiple timezones through a Model Context Protocol API built with TypeScript/Node.js.1-
- AlicenseAqualityDmaintenanceProvides accurate system time to LLM applications with multi-timezone support via a simple tool call.1MIT