Skip to main content
Glama

xigua-MCP

by xiguaxiaome
camera_tool.cpython-310.pyc1.32 kB
o )�9h�@sNddlZddlmZddlZejjdd�ddlZdejd<defdd �ZdS) �N)�FastMCPzutf-8)�encoding�OFF�OPENCV_LOG_LEVEL�mcpcCs |��ddtdtfdd��}dS)N�� show_time�returnc Ssd}zzSt�d�}|��sddd�WW|dur|��SSt|d�D]}|��\}}|s/nt�d|�t�d�d @td �krBnq#t� �d d d�WW|durV|��SSt y�}z|durf|��dt |�d�WYd}~W|dur||��SSd}~ww|dur�|��ww) uT 打开摄像头并显示画面(简化版,避免编码问题) NrFu摄像头不可用)�success�result� ZCamera�d���qTu摄像头已关闭) �cv2Z VideoCaptureZisOpened�release�range�readZimshowZwaitKey�ordZdestroyAllWindows� Exception�str)r�cap�_�ret�frame�e�r�'E:\mcp\xiaozhi-mcp\tools\camera_tool.py� open_camera sB   ��  �  �� ��� �z*register_camera_tools.<locals>.open_camera)r)�tool�int�dict)rrrrr�register_camera_tools sr") r�mcp.server.fastmcpr�sys�stdout� reconfigure�os�environr"rrrr�<module>s  

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiguaxiaome/xigua-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server