IoEHub MCP Time Server logo

IoEHub MCP Time Server

by ioehub

The IoEHub MCP Time Server is a robust server that provides the current Unix timestamp. It implements the Model Context Protocol (MCP) to provide time information for AI models that don't have access to the current time.

View on GitHub

Last updated: N/A

��#� �I�o�E�H�u�b� �M�C�P� �T�i�m�e� �S�e�r�v�e�r� � � � �A� �r�o�b�u�s�t� �M�C�P� �(�M�o�d�e�l� �C�o�n�t�e�x�t� �P�r�o�t�o�c�o�l�)� �T�i�m�e� �S�e�r�v�e�r� �t�h�a�t� �p�r�o�v�i�d�e�s� �t�h�e� �c�u�r�r�e�n�t� �U�n�i�x� �t�i�m�e�s�t�a�m�p�.� �T�h�i�s� �s�e�r�v�e�r� �i�m�p�l�e�m�e�n�t�s� �t�h�e� �M�C�P� �p�r�o�t�o�c�o�l� �t�o� �p�r�o�v�i�d�e� �t�i�m�e� �i�n�f�o�r�m�a�t�i�o�n� �f�o�r� �A�I� �m�o�d�e�l�s� �t�h�a�t� �d�o�n�'�t� �h�a�v�e� �a�c�c�e�s�s� �t�o� �t�h�e� �c�u�r�r�e�n�t� �t�i�m�e�.� � � � �#�#� �F�e�a�t�u�r�e�s� � � � �-� ��E�x�t�r�e�m�e� �R�e�l�i�a�b�i�l�i�t�y��:� �D�e�s�i�g�n�e�d� �t�o� �s�t�a�y� �r�u�n�n�i�n�g� �e�v�e�n� �w�h�e�n� �s�t�d�i�n�/�s�t�d�o�u�t� �c�o�n�n�e�c�t�i�o�n�s� �a�r�e� �c�l�o�s�e�d� � �-� ��C�o�m�p�r�e�h�e�n�s�i�v�e� �L�o�g�g�i�n�g��:� �L�o�g�s� �t�o� �b�o�t�h� �s�t�d�e�r�r� �a�n�d� �f�i�l�e� �f�o�r� �t�r�o�u�b�l�e�s�h�o�o�t�i�n�g� � �-� ��S�e�l�f�-�H�e�a�l�i�n�g��:� �R�e�s�i�s�t�s� �t�e�r�m�i�n�a�t�i�o�n� �a�t�t�e�m�p�t�s� �a�n�d� �m�a�i�n�t�a�i�n�s� �a�v�a�i�l�a�b�i�l�i�t�y� � �-� ��R�i�c�h� �T�i�m�e� �I�n�f�o�r�m�a�t�i�o�n��:� �P�r�o�v�i�d�e�s� �t�i�m�e� �d�a�t�a� �i�n� �m�u�l�t�i�p�l�e� �f�o�r�m�a�t�s� � �-� ��M�C�P� �P�r�o�t�o�c�o�l� �C�o�m�p�l�i�a�n�t��:� �F�u�l�l�y� �c�o�m�p�a�t�i�b�l�e� �w�i�t�h� �C�l�a�u�d�e�,� �C�u�r�s�o�r� �a�n�d� �o�t�h�e�r� �M�C�P� �c�l�i�e�n�t�s� � � � �#�#� �I�n�s�t�a�l�l�a�t�i�o�n� �a�n�d� �U�s�a�g�e� � � � �T�h�e�r�e� �a�r�e� �s�e�v�e�r�a�l� �w�a�y�s� �t�o� �s�t�a�r�t� �t�h�e� �s�e�r�v�e�r�:� � � � �#�#�#� �M�e�t�h�o�d� �1�:� �U�s�i�n�g� �t�h�e� �b�a�t�c�h� �f�i�l�e� �(�R�e�c�o�m�m�e�n�d�e�d� �f�o�r� �W�i�n�d�o�w�s�)� � � � ��b�a�s�h� � �s�t�a�r�t�-�m�c�p�-�s�e�r�v�e�r�.�b�a�t� � �� � � � �T�h�i�s� �w�i�l�l� �s�t�a�r�t� �t�h�e� �s�e�r�v�e�r� �i�n� �b�a�c�k�g�r�o�u�n�d� �m�o�d�e�,� �a�l�l�o�w�i�n�g� �i�t� �t�o� �r�u�n� �i�n�d�e�p�e�n�d�e�n�t�l�y�.� � � � �#�#�#� �M�e�t�h�o�d� �2�:� �D�i�r�e�c�t� �n�o�d�e� �c�o�m�m�a�n�d� � � � ��b�a�s�h� � �n�o�d�e� �i�o�e�h�u�b�-�t�i�m�e�.�j�s� � �� � � � �#�#�#� �M�e�t�h�o�d� �3�:� �U�s�i�n�g� �n�p�m� � � � ��b�a�s�h� � �n�p�m� �i�n�s�t�a�l�l� � �n�p�m� �s�t�a�r�t� � �� � � � �#�#� �P�r�o�t�o�c�o�l� �S�u�p�p�o�r�t� � � � �T�h�i�s� �s�e�r�v�e�r� �i�m�p�l�e�m�e�n�t�s� �t�h�e� �M�o�d�e�l� �C�o�n�t�e�x�t� �P�r�o�t�o�c�o�l� �(�M�C�P�)� �a�n�d� �s�u�p�p�o�r�t�s� �t�h�e� �f�o�l�l�o�w�i�n�g� �m�e�t�h�o�d�s�:� � � � �-� ��i�n�i�t�i�a�l�i�z�e��:� �I�n�i�t�i�a�l�i�z�e� �t�h�e� �s�e�r�v�e�r� �w�i�t�h� �c�a�p�a�b�i�l�i�t�i�e�s� � �-� ��g�e�t�T�i�m�e��:� �G�e�t� �t�h�e� �c�u�r�r�e�n�t� �t�i�m�e� �i�n� �v�a�r�i�o�u�s� �f�o�r�m�a�t�s� � �-� ��s�h�u�t�d�o�w�n��:� �G�r�a�c�e�f�u�l�l�y� �s�h�u�t� �d�o�w�n� �t�h�e� �s�e�r�v�e�r� �(�s�e�r�v�e�r� �a�c�t�u�a�l�l�y� �s�t�a�y�s� �r�u�n�n�i�n�g�)� � � � �#�#� �T�i�m�e� �R�e�s�p�o�n�s�e� �F�o�r�m�a�t� � � � �T�h�e� �s�e�r�v�e�r� �p�r�o�v�i�d�e�s� �t�i�m�e� �i�n�f�o�r�m�a�t�i�o�n� �i�n� �t�h�e� �f�o�l�l�o�w�i�n�g� �f�o�r�m�a�t�s�:� � � � ��j�s�o�n� � �{� � � � �"�u�n�i�x�_�t�i�m�e�"�:� �1�7�1�3�2�5�8�1�8�0�,� � � � �"�u�n�i�x�_�m�s�"�:� �1�7�1�3�2�5�8�1�8�0�1�2�3�,� � � � �"�h�u�m�a�n�_�r�e�a�d�a�b�l�e�"�:� �"�2�0�2�4�-�0�4�-�1�6�T�0�9�:�3�6�:�2�0�.�0�0�0�Z�"�,� � � � �"�f�o�r�m�a�t�t�e�d�"�:� �"�4�/�1�6�/�2�0�2�4�,� �5�:�3�6�:�2�0� �P�M�"�,� � � � �"�u�t�c�"�:� �"�T�u�e�,� �1�6� �A�p�r� �2�0�2�4� �0�9�:�3�6�:�2�0� �G�M�T�"�,� � � � �"�d�a�t�e�_�o�n�l�y�"�:� �"�T�u�e� �A�p�r� �1�6� �2�0�2�4�"�,� � � � �"�t�i�m�e�_�o�n�l�y�"�:� �"�0�9�:�3�6�:�2�0� �G�M�T�+�0�0�0�0� �(�C�o�o�r�d�i�n�a�t�e�d� �U�n�i�v�e�r�s�a�l� �T�i�m�e�)�"� � �}� � �� � � � �#�#� �L�o�g�g�i�n�g� � � � �L�o�g�s� �a�r�e� �w�r�i�t�t�e�n� �t�o� �b�o�t�h� �s�t�d�e�r�r� �a�n�d� �t�o� �a� �l�o�g� �f�i�l�e� �i�n� �t�h�e� ��l�o�g�s�� �d�i�r�e�c�t�o�r�y�.� �E�a�c�h� �s�e�r�v�e�r� �i�n�s�t�a�n�c�e� �c�r�e�a�t�e�s� �a� �n�e�w� �l�o�g� �f�i�l�e� �w�i�t�h� �a� �t�i�m�e�s�t�a�m�p�,� �m�a�k�i�n�g� �i�t� �e�a�s�y� �t�o� �t�r�o�u�b�l�e�s�h�o�o�t� �i�s�s�u�e�s�.� � � � �#�#� �I�n�t�e�g�r�a�t�i�o�n� �w�i�t�h� �A�I� �P�l�a�t�f�o�r�m�s� � � � �#�#�#� �M�C�P� �C�o�n�f�i�g�u�r�a�t�i�o�n� � � � �A�d�d� �t�h�e� �t�i�m�e� �s�e�r�v�e�r� �t�o� �y�o�u�r� �M�C�P� �c�o�n�f�i�g�u�r�a�t�i�o�n� �u�s�i�n�g� �t�h�e� �f�o�l�l�o�w�i�n�g� �J�S�O�N� �f�o�r�m�a�t�:� � � � ��j�s�o�n� � �{� � � � �"�m�c�p�S�e�r�v�e�r�s�"�:� �{� � � � � � �"�I�o�E�H�u�b�M�c�p�T�i�m�e�S�e�r�v�e�r�"�:� �{� � � � � � � � �"�c�o�m�m�a�n�d�"�:� �"�c�m�d�"�,� � � � � � � � �"�a�r�g�s�"�:� �[� � � � � � � � � � �"�/�c�"�,� � � � � � � � � � �"�C�:�\�\�p�a�t�h�\�\�t�o�\�\�y�o�u�r�\�\�i�o�e�h�u�b�-�m�c�p�-�t�i�m�e�-�s�e�r�v�e�r�\�\�s�t�a�r�t�-�m�c�p�-�s�e�r�v�e�r�.�b�a�t�"� � � � � � � � �]� � � � � � �}� � � � �}� � �}� � �� � � � �F�o�r� �U�n�i�x�/�L�i�n�u�x�/�m�a�c�O�S� �e�n�v�i�r�o�n�m�e�n�t�s�:� � � � ��j�s�o�n� � �{� � � � �"�m�c�p�S�e�r�v�e�r�s�"�:� �{� � � � � � �"�I�o�E�H�u�b�M�c�p�T�i�m�e�S�e�r�v�e�r�"�:� �{� � � � � � � � �"�c�o�m�m�a�n�d�"�:� �"�n�o�d�e�"�,� � � � � � � � �"�a�r�g�s�"�:� �[� � � � � � � � � � �"�/�p�a�t�h�/�t�o�/�y�o�u�r�/�i�o�e�h�u�b�-�m�c�p�-�t�i�m�e�-�s�e�r�v�e�r�/�i�o�e�h�u�b�-�t�i�m�e�.�j�s�"� � � � � � � � �]� � � � � � �}� � � � �}� � �}� � �� � � � �#�#�#� �U�s�i�n�g� �w�i�t�h� �C�l�a�u�d�e� � � � �C�l�a�u�d�e� �A�I� �d�o�e�s�n�'�t� �h�a�v�e� �d�i�r�e�c�t� �a�c�c�e�s�s� �t�o� �t�h�e� �c�u�r�r�e�n�t� �t�i�m�e�.� �T�o� �i�n�t�e�g�r�a�t�e� �t�h�e� �I�o�E�H�u�b� �M�C�P� �T�i�m�e� �S�e�r�v�e�r� �w�i�t�h� �C�l�a�u�d�e�:� � � � �1�.� �S�e�t� �u�p� �t�h�e� �I�o�E�H�u�b� �M�C�P� �T�i�m�e� �S�e�r�v�e�r� �i�n� �y�o�u�r� �M�C�P� �c�o�n�f�i�g�u�r�a�t�i�o�n�:� � � � ��j�s�o�n� � �{� � � � �"�m�c�p�S�e�r�v�e�r�s�"�:� �{� � � � � � �"�I�o�E�H�u�b�M�c�p�T�i�m�e�S�e�r�v�e�r�"�:� �{� � � � � � � � �"�c�o�m�m�a�n�d�"�:� �"�c�m�d�"�,� � � � � � � � �"�a�r�g�s�"�:� �[� � � � � � � � � � �"�/�c�"�,� � � � � � � � � � �"�C�:�\�\�p�a�t�h�\�\�t�o�\�\�y�o�u�r�\�\�i�o�e�h�u�b�-�m�c�p�-�t�i�m�e�-�s�e�r�v�e�r�\�\�s�t�a�r�t�-�m�c�p�-�s�e�r�v�e�r�.�b�a�t�"� � � � � � � � �]� � � � � � �}� � � � �}� � �}� � �� � � � �2�.� �C�l�a�u�d�e� �w�i�l�l� �a�u�t�o�m�a�t�i�c�a�l�l�y� �g�a�i�n� �a�c�c�e�s�s� �t�o� �t�h�e� �t�i�m�e� �s�e�r�v�e�r� �v�i�a� �t�h�e� �M�C�P� �p�r�o�t�o�c�o�l�.� �Y�o�u� �c�a�n� �a�c�c�e�s�s� �t�i�m�e� �i�n�f�o�r�m�a�t�i�o�n� �d�i�r�e�c�t�l�y� �t�h�r�o�u�g�h� �f�u�n�c�t�i�o�n� �c�a�l�l�s�:� � � � �� � �I� �n�e�e�d� �t�o� �g�e�t� �t�h�e� �c�u�r�r�e�n�t� �t�i�m�e�.� � �� � � � �#�#�#� �U�s�i�n�g� �w�i�t�h� �C�u�r�s�o�r� � � � �C�u�r�s�o�r� �I�D�E� �c�a�n� �b�e�n�e�f�i�t� �f�r�o�m� �t�h�e� �I�o�E�H�u�b� �M�C�P� �T�i�m�e� �S�e�r�v�e�r� �w�h�e�n� �w�o�r�k�i�n�g� �w�i�t�h� �A�I�-�a�s�s�i�s�t�e�d� �c�o�d�i�n�g� �t�h�a�t� �r�e�q�u�i�r�e�s� �t�i�m�e�s�t�a�m�p�s�:� � � � �1�.� �C�o�n�f�i�g�u�r�e� �t�h�e� �I�o�E�H�u�b� �M�C�P� �T�i�m�e� �S�e�r�v�e�r� �i�n� �y�o�u�r� �p�r�o�j�e�c�t� �s�e�t�t�i�n�g�s�:� � � � ��j�s�o�n� � �{� � � � �"�m�c�p�S�e�r�v�e�r�s�"�:� �{� � � � � � �"�I�o�E�H�u�b�M�c�p�T�i�m�e�S�e�r�v�e�r�"�:� �{� � � � � � � � �"�c�o�m�m�a�n�d�"�:� �"�c�m�d�"�,� � � � � � � � �"�a�r�g�s�"�:� �[� � � � � � � � � � �"�/�c�"�,� � � � � � � � � � �"�C�:�\�\�p�a�t�h�\�\�t�o�\�\�y�o�u�r�\�\�i�o�e�h�u�b�-�m�c�p�-�t�i�m�e�-�s�e�r�v�e�r�\�\�s�t�a�r�t�-�m�c�p�-�s�e�r�v�e�r�.�b�a�t�"� � � � � � � � �]� � � � � � �}� � � � �}� � �}� � �� � � � �2�.� �C�u�r�s�o�r� �w�i�l�l� �a�u�t�o�m�a�t�i�c�a�l�l�y� �h�a�v�e� �a�c�c�e�s�s� �t�o� �t�h�e� �c�u�r�r�e�n�t� �t�i�m�e� �i�n�f�o�r�m�a�t�i�o�n� �t�h�r�o�u�g�h� �t�h�e� �M�C�P� �p�r�o�t�o�c�o�l�.� � � � �#�#� �T�r�o�u�b�l�e�s�h�o�o�t�i�n�g� � � � �I�f� �y�o�u� �e�n�c�o�u�n�t�e�r� �i�s�s�u�e�s�:� � � � �1�.� �C�h�e�c�k� �t�h�e� �l�o�g� �f�i�l�e�s� �i�n� �t�h�e� ��l�o�g�s�� �d�i�r�e�c�t�o�r�y� � �2�.� �E�n�s�u�r�e� �n�o� �o�t�h�e�r� �N�o�d�e�.�j�s� �p�r�o�c�e�s�s�e�s� �a�r�e� �r�u�n�n�i�n�g� �t�h�a�t� �m�i�g�h�t� �c�o�n�f�l�i�c�t� � �3�.� �M�a�k�e� �s�u�r�e� �y�o�u�r� �M�C�P� �c�o�n�f�i�g�u�r�a�t�i�o�n� �p�o�i�n�t�s� �t�o� �t�h�e� �c�o�r�r�e�c�t� �f�i�l�e� �p�a�t�h�s� � �