Skip to main content
Glama

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.txt

2. 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.py

Terminal 2: MCP Agent Server

python mcp_server.py

Terminal 3: Streamlit UI

streamlit run streamlit_ui.py

The 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 MCPAgent and update self.tools.

  • Improve intent detection: Extend detect_intent() in MCPAgent.

  • Change LLM model: Update the model field in call_llm().


Requirements

  • Python 3.7+

  • See requirements.txt for dependencies.


Credits

  • Built using Flask, Streamlit, OpenRouter, and Python.

  • Inspired by agentic LLM design patterns.

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Giving 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.
    6
    1,014
    69
    MIT
  • A
    license
    -
    quality
    -
    maintenance
    Provides 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
  • A
    license
    B
    quality
    D
    maintenance
    Provides current time information and timezone conversion capabilities using IANA timezone names with automatic system detection. It enables LLMs to fetch local or global times and convert specific timestamps between different regions.
    2
    2
    MIT

View all related MCP servers

Related MCP Connectors

  • Wall-clock awareness for LLM agents. Two tools: elapsed-time-between-turns + day rollover detection.

  • A real clock for AI agents: current time, timezone conversion, and DST facts from the IANA tzdb.

  • Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/suryawanshishantanu6/time-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server