"""Date/time tools for MCP Streamable HTTP server."""

import argparse
import json
import logging
from datetime import datetime

import uvicorn
from fastmcp import FastMCP

from gui_provider import broadcast_html_sync, start_websocket_server

# Configure logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

srv_name="user"
mcp = FastMCP(name=srv_name)

from sentence_watcher import SentenceWatcher

watcher = SentenceWatcher("/root/jar/userFiles/files/public/styles/polca/S01")

@mcp.tool()
async def get_current_date() -> str:
    return datetime.now().strftime("%Y-%m-%d %H:%M:%S")


if __name__ == "__main__":
    print(f"claude mcp add --transport http {srv_name} http://localhost:8123/mcp/")
    uvicorn.run(mcp.http_app(transport="streamable-http"), host="localhost", port=8123)
    

