MCP ExplorerExplorer

Cadquery Mcp

@Senthil185on a year ago
1 MIT
FreeCommunity
AI Systems
CadQuery MCP is a server for remote 3D modeling using CadQuery's API.

Overview

What is Cadquery Mcp

CadQuery MCP is a server implementation that connects CadQuery’s parametric 3D modeling capabilities with a server architecture, allowing programmatic control via a standardized API.

Use cases

Use cases include creating custom 3D models for prototypes, automating design processes, integrating with visual editors for enhanced modeling, and exporting designs for 3D printing or manufacturing.

How to use

To use CadQuery MCP, install the required dependencies (Python 3.7+, CadQuery, and FastMCP), clone the repository, and configure the server settings in a JSON format. You can then interact with the server to perform various CAD operations.

Key features

Key features include the ability to create and manage multiple workspaces, generate primitive shapes, perform boolean operations, apply fillets and chamfers, export models in various formats (STL, STEP), execute CadQuery scripts, and integrate with CQ-Editor for visual feedback.

Where to use

CadQuery MCP can be used in fields such as mechanical engineering, product design, architecture, and any domain requiring parametric 3D modeling and CAD operations.

Content

CadQuery MCP Server

A Model-Code-Parameter (MCP) server implementation for CadQuery, providing a bridge between CadQuery’s parametric 3D modeling capabilities and a server architecture for programmatic control.

Overview

CadQuery MCP is a server that enables interaction with CadQuery through a standardized API, allowing remote control of 3D modeling operations. It leverages the Model-Code-Parameter (MCP) architecture to provide a consistent interface for CAD operations.

Key Features:

  • Create and manage multiple workspaces for organizing models
  • Create primitive shapes (boxes, cylinders, spheres)
  • Perform boolean operations (union, subtract, intersect)
  • Apply fillets and chamfers to edges
  • Export models to various formats (STL, STEP)
  • Execute arbitrary CadQuery scripts
  • Integration with CQ-Editor for visual feedback

Installation

Prerequisites

  • Python 3.7+
  • CadQuery: pip install cadquery
  • FastMCP: pip install mcp

Installation steps

# Clone the repository
git clone https://github.com/yourusername/cadquery-mcp.git
cd cadquery-mcp


Configuration

{
  "mcpServers": {
    "freecad": {
      "command": "C:/Users/--/envs/cadquery/python.exe",
      "args": [
        ":/--/cadquery_fastmcp.py"
      ]
    }
  }
}

Architecture

The CadQuery MCP server consists of two main components:

  1. CadQuery MCP Server (cadquery_fastmcp.py):

    • Main server implementation that exposes CadQuery functionality
    • Manages workspaces and objects
    • Handles import/export operations
  2. CQ-Editor Bridge (cq_editor_bridge.py):

    • Bridge to integrate with CQ-Editor for visual editing
    • Manages the CQ-Editor process
    • Synchronizes objects between the server and the editor

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Acknowledgments

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers