Integrations

  • 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

時間-MCP

ツール拡張 LLM パイプラインを使用して、時間関連および一般的な質問に答える最小限のエージェント AI システム。

特徴

  • Flask API : 現在のタイムスタンプを提供します。
  • MCP エージェント サーバー: ユーザーの意図を検出し、ツール (時間 API など) を呼び出し、エンジニアがプロンプトを表示し、OpenRouter (OpenAI 互換 API) を介して LLM と対話する推論エージェント。
  • Streamlit UI : AI エージェントと会話するためのシンプルなチャット インターフェイス。

設定

1. 依存関係のクローンとインストール

pip install -r requirements.txt

2. 環境変数

OpenRouter API キーを設定します ( https://openrouter.aiから取得します)。

export OPENROUTER_API_KEY=sk-...your-key...

3. サーバーを実行する

3 つのターミナルを開きます (またはバックグラウンド プロセスを使用します)。

ターミナル1: Flask Time API
python flask_api.py
ターミナル2: MCPエージェントサーバー
python mcp_server.py
ターミナル3: Streamlit UI
streamlit run streamlit_ui.py

Streamlit UI がブラウザで開きます (デフォルト: http://localhost:8501 )


使用法

  • Streamlit UI でエージェントに質問してください。
  • 時間について質問すると(例:「何時ですか?」)、エージェントは Flask API を呼び出して現在の時刻を取得し、LLM を使用して美しく自然な応答を作成します。
  • その他の質問については、エージェントは LLM のみを使用して回答します。

建築

[Streamlit UI] → [MCP Agent Server] → [Tools (e.g., Time API)] ↓ [LLM via OpenRouter]
  • MCP エージェントは意図を検出し、必要に応じてツールを呼び出し、エンジニアにプロンプトを出して、LLM に送信します。
  • 簡単に拡張してツールを追加できます (MCPAgent クラスに追加するだけです)。

カスタマイズ

  • ツールの追加: MCPAgentに新しいメソッドを実装し、 self.toolsを更新します。
  • インテント検出の改善MCPAgentdetect_intent()を拡張します。
  • LLM モデルの変更: call_llm()modelフィールドを更新します。

要件

  • Python 3.7以上
  • 依存関係についてはrequirements.txt参照してください。

クレジット

  • Flask、Streamlit、OpenRouter、Python を使用して構築されています。
  • エージェント LLM 設計パターンにインスピレーションを受けています。
-
security - not tested
F
license - not found
-
quality - not tested

時間 API ツールを呼び出して時間関連の質問に回答し、LLM を使用して一般的な質問にも回答するエージェント AI システム。シンプルなチャット インターフェースからアクセスできます。

  1. 特徴
    1. 設定
      1. 1. 依存関係のクローンとインストール
      2. 2. 環境変数
      3. 3. サーバーを実行する
    2. 使用法
      1. 建築
        1. カスタマイズ
          1. 要件
            1. クレジット

              Related MCP Servers

              • -
                security
                F
                license
                -
                quality
                Provides AI agents with comprehensive Twitter functionality through the Model Context Protocol standard, enabling reading tweets, posting content, managing interactions, and accessing timeline data with robust error handling.
                Last updated -
                4
                1
                JavaScript
                • Apple
              • -
                security
                A
                license
                -
                quality
                A lightweight, modular API service that provides useful tools like weather, date/time, calculator, search, email, and task management through a RESTful interface, designed for integration with AI agents and automated workflows.
                Last updated -
                Python
                MIT License
              • A
                security
                A
                license
                A
                quality
                Integrates with Harvest time tracking API, enabling AI assistants to manage time entries, projects, clients, and tasks through natural language commands.
                Last updated -
                11
                2
                Python
                MIT License
                • Apple
              • -
                security
                A
                license
                -
                quality
                An MCP server implementation that integrates AI assistants with Langfuse workspaces, allowing models to query LLM metrics by time range.
                Last updated -
                9
                JavaScript
                Apache 2.0

              View all related MCP servers

              ID: jxwei6bez4