{"id":7399,"library":"mcp-server-time","title":"MCP Server Time","description":"mcp-server-time is a Model Context Protocol (MCP) server designed to provide robust tools for time queries and timezone conversions, primarily for integration with Large Language Models (LLMs). It implements the MCP specification, allowing LLMs to accurately retrieve current time information, perform date and time calculations, and handle timezone conversions. The current version is 2026.1.26, following a frequent, calendar-based release cadence.","status":"active","version":"2026.1.26","language":"en","source_language":"en","source_url":"https://github.com/cognitive-context-protocol/mcp-server-time","tags":["llm","mcp","model-context-protocol","time","timezone","server","fastapi","uvicorn"],"install":[{"cmd":"pip install mcp-server-time uvicorn[standard]","lang":"bash","label":"Install with uvicorn"}],"dependencies":[{"reason":"Required to run the FastAPI server application, not included by default.","package":"uvicorn[standard]","optional":false}],"imports":[{"note":"The `create_app` function is located within the `server` submodule, not directly under the top-level package.","wrong":"from mcp_server_time import create_app","symbol":"create_app","correct":"from mcp_server_time.server import create_app"}],"quickstart":{"code":"import uvicorn\nfrom mcp_server_time.server import create_app\n\n# Create the FastAPI application instance\napp = create_app()\n\n# Run the server programmatically\nif __name__ == '__main__':\n    # For production, consider using gunicorn or a process manager\n    uvicorn.run(app, host='0.0.0.0', port=8000)","lang":"python","description":"This quickstart demonstrates how to instantiate and run the MCP Time server using uvicorn. It creates a FastAPI application provided by the library and binds it to host 0.0.0.0 on port 8000, making it accessible for MCP clients."},"warnings":[{"fix":"Always install with `pip install mcp-server-time uvicorn[standard]`.","message":"The `uvicorn[standard]` package is a mandatory dependency for running the server locally or in development, but it's not a direct dependency of `mcp-server-time` itself. Ensure you install it alongside the library.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Change the port when running `uvicorn.run(app, host='0.0.0.0', port=8001)` or `uvicorn main:app --host 0.0.0.0 --port 8001`.","message":"The server uses a default port (8000). If this port is already in use by another application, the server will fail to start. This is a common issue for local development setups.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your consuming application understands and implements the Model Context Protocol to interact with this server. For direct time utilities in Python, use standard libraries like `datetime` or `zoneinfo`.","message":"This library provides an MCP *server*. It is designed to be consumed by an MCP-compliant client, typically an LLM agent. It does not offer a standalone Python client API for direct time utility in regular Python scripts.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Install uvicorn with `pip install uvicorn[standard]`.","cause":"Uvicorn, the ASGI server runner, was not installed.","error":"ModuleNotFoundError: No module named 'uvicorn'"},{"fix":"Change the port in your `uvicorn.run()` call or via the `--port` flag in the command line (e.g., `uvicorn main:app --host 0.0.0.0 --port 8001`).","cause":"The port the server is trying to bind to (default 8000) is already occupied by another process.","error":"RuntimeError: Address already in use"},{"fix":"Correct the import statement to `from mcp_server_time.server import create_app`.","cause":"Attempting to import `create_app` directly from the top-level `mcp_server_time` package instead of its specific submodule.","error":"AttributeError: module 'mcp_server_time' has no attribute 'create_app'"}]}