CoolFace
Apppublic

X-R-1-8/onshape-cad-mcp

sourceHugging Faceupdated 20d agoView on Hugging Face
0likes
app.cpython-314.pyc45 linesDownload Raw Back to __pycache__
1+
26�jG3���Rt^RIHt^RIt^RIt^RIHt]PP^]	!]!]44PR,44^RIt
^RIt^RIHt]!R4]P$!]P&RRR	R5.RR7]!R
4^RIt^RIHt]!RR7]P4n]P8RRl4t]
P<!RR7;_uu_4t]
P@!R4]
PB!RRR7t"]
PF!RRR7t$]"PK]]$R7]
P@!R4RRR4]&R 8Xdj]PORRR!7wt(t)t*]PV!4t+]+PXFt-](PXP^]-4K!	]P]4R#R# ]dt]!R]24RtAELERtAii;i ]d!RR4tEL\i;i +'giL�;i)"a%Hugging Face Space entrypoint for Onshape MCP.6Uses standard Gradio launch with FastMCP SSE routes injected at startup.7Provides:81. Model Context Protocol SSE stream at `/sse` for ChatGPT, Claude, and Cursor92. FastMCP message receiver at `/messages/`103. Live interactive dashboard on Gradio11)�annotationsN)�Path�src)�TransportSecuritySettingsz)[startup] Checking Playwright Chromium...z-m�12playwright�install�chromiumT)�checkz([startup] Playwright Chromium installed.z#[startup] Playwright install note: c�*�]tRt^ t]RRl4tRtR#)�spacesNc	��V'dV#R#)c��V#�N�)�fs&�deploy_hf/app.py�<lambda>�spaces.GPU.<locals>.<lambda>%s��Q�r)�fn�kwargss&,r�GPU�13spaces.GPU!s����	��rrr)�__name__�14__module__�__qualname__�__firstlineno__�staticmethodr�__static_attributes__rrrrr s��	�	�15�	rr)�mcpF)�enable_dns_rebinding_protectionc��V^8�dQhRR/#)��return�strr)�formats"r�__annotate__r&/s��r�r�c�rrc��R#)ud✅ Onshape MCP Server is ACTIVE and ready to receive CAD commands from ChatGPT, Claude, and Cursor.rrrr�check_statusr(.s��qrzOnshape CAD MCP Server)�titleu�16    # 📐 Onshape CAD MCP Server17    **Zero-Setup 3D CAD Modeling for AI Agents**18    19    This server connects **ChatGPT**, **Claude**, and **Cursor** to Onshape via the Model Context Protocol (MCP).20 21    ---22 23    ### 🔗 Connection Endpoint24    Copy this SSE endpoint into ChatGPT's **New Plugin / Server URL** dialog:25    ```text26    https://x-r-1-8-onshape-cad-mcp.hf.space/sse27    ```28    zTest Server Engine�primary)�variantz
Engine Status)�label�interactive)r�outputsu�29    ### 🛠️ Available Features:30    * 35+ full CAD sketch tools (lines, arcs, splines, fillets, trims, mirrors, offsets, constraints)31    * Automated browser canvas automation32    * Zero token cost deterministic CAD execution33    �__main__)�prevent_thread_lock�ssr_mode)/�__doc__�34__future__r�os�sys�pathlibr�path�insertr$�__file__�parent�gradio�gr�35subprocess�mcp.server.transport_securityr�print�run�36executable�	Exception�er�ImportError�onshape_mcp.serverr�settings�transport_securityrr(�Blocks�demo�Markdown�Button�37status_btn�Textbox�38status_out�clickr�launch�app�	local_url�	share_url�sse_app�routes�route�block_threadrrr�<module>rXs����#�	�39��������3�t�H�~�,�,�u�4�5�6���C�5�	�405�6��N�N�C�N�N�D�,�	�:�N�VZ�[�	�414�5���#�#<�\a�"b��������r��r��Y�Y�-�.�.�$��K�K�
�
	����/��C�J����/�u�E�J�����j��9��K�K��	�'/�6�z�� $����u�� U��C��I��k�k�m�G������42�43���!�U�#� �������i�5�	�/��s�443�4�4��5��45������(/�.�s7�3F?�G�%A G7�?G�G�G�G4�3G4�7H