�
G��g� � �H � d dl Z d dlZd dlZd dlmZ d� Zedk( r e� yy)� N)�
HttpMcpServerc � � t j d�� } | j dd�� | j dt d�� | j d d
d�� | j d
dd�� | j � }t
j j |j � s t d� t j d� t |j |j �� }|j |j |j �� y )Nz"Start HTTP-4-MCP middleware server)�descriptionz--hostzServer host address)�helpz--portzServer port)�typer z--configzconfig/config.jsonzGlobal config file path)�defaultr z--apiszconfig/apis.jsonzAPI config file pathz%Error: API config file does not exist� )�config_path� apis_path)�host�port)�argparse�ArgumentParser�add_argument�int�
parse_args�os�path�exists�apis�print�sys�exitr �config�runr r
)�parser�args�servers �$E:\data\mcp-server\http-4-mcp\run.py�mainr s� � �
�
$�
$�1U�
V�F�
����'<��=�
����s���?�
���
�,@�G`��a�
����*<�CY��Z�����D� �7�7�>�>�$�)�)�$�
�5�6������ �t�{�{�d�i�i�
H�F�
�J�J�D�I�I�D�I�I�J�.� �__main__)r r r �
mcp_serverr r �__name__� r! r �<module>r&