mcpField
T
time-mcp

time-mcp

Local
github.com/suryawanshishantanu6Productivity0Updated 77w ago

About time-mcp

time-mcp is a question-answering system combining a time API, an MCP agent server, and a Streamlit chat interface. It routes time questions to the API and handles other questions with an LLM through OpenRouter.

Key features

  1. 01Fetch current time through a Flask API
  2. 02Detect intent and call tools as needed
  3. 03Call an LLM through OpenRouter
  4. 04Offer a Streamlit chat interface

Use cases

  1. 01Ask for the current time in chat
  2. 02Use an LLM to answer general questions
  3. 03Extend the agent with additional tools

MCP support

Its MCP agent server calls tools such as the time API and uses their results in LLM responses; the project also includes a Streamlit chat interface.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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.

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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.