CAD-Query MCP Server
Enables conversational 3D modeling by providing CAD-Query functionality to validate parametric 3D models against criteria and export to STL/STEP formats for 3D printing and CAD applications.
README
CAD-Query MCP Server
A Model Context Protocol (MCP) server that provides CAD generation and verification tools for Claude Code. This server enables conversational 3D modeling by exposing CAD-Query functionality through MCP tools.
Features
verify_cad_query- Validates CAD-Query generated models against criteriagenerate_cad_query- (Stub implementation) Generates CAD-Query Python scripts from descriptions- CAD-Query Integration - Full CAD-Query support for parametric 3D modeling
- STL/STEP Export - Direct export to 3D printing and CAD formats
- Visual Feedback - SVG generation for model inspection
Installation
# Install dependencies
uv sync
# For development with CAD verification capabilities
uv sync --extra cad
# Test the server
uv run python tests/test_server.py
# Run with MCP Inspector (interactive testing)
uv run mcp dev server.py
Claude Desktop Configuration
Add this to your Claude Desktop configuration file:
macOS
Location: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows
Location: %APPDATA%/Claude/claude_desktop_config.json
Configuration
{
"mcpServers": {
"cadquery-server": {
"command": "python",
"args": ["/path/to/cadquery-mcp-server/server.py"],
"env": {}
}
}
}
MCP Tools
verify_cad_query
Validates a CAD-Query generated model against specified criteria.
Parameters:
file_path(string): Path to the CAD-Query Python fileverification_criteria(string): Description of what to verify
Example:
{
"file_path": "models/coffee_mug.py",
"verification_criteria": "coffee mug with handle, 10cm height, 8cm diameter"
}
Returns:
{
"status": "PASS" | "FAIL",
"message": "Description of result",
"file_path": "Path to verified file",
"criteria": "Verification criteria used",
"details": "Additional verification details"
}
generate_cad_query (Stub Implementation)
Generates CAD-Query Python scripts from natural language descriptions.
NOTE: Currently returns a stub response indicating the feature is not yet implemented.
Parameters:
description(string): Natural language description of the desired 3D modelparameters(string, optional): Specific dimensions or constraints
Example:
{
"description": "Create a coffee mug with a handle, 10cm tall and 8cm diameter",
"parameters": "height=100mm, diameter=80mm, handle_width=15mm"
}
Returns:
{
"status": "NOT_IMPLEMENTED",
"message": "CAD code generation is not yet implemented",
"description": "Input description",
"parameters": "Input parameters",
"details": "Additional information"
}
CAD-Query Script Requirements
All CAD-Query scripts must end with show_object(result):
import cadquery as cq
result = cq.Workplane("XY").box(10, 10, 10)
show_object(result) # Required for processing
Development
Testing
# Test server functionality
uv run python tests/test_server.py
# Interactive testing with MCP Inspector
uv run mcp dev server.py
# Run evaluations
uv run python evaluations/evaluate_verify.py
Extending the Server
The current verify_cad_query implementation is a basic validator. You can enhance it to:
- Parse and validate CAD-Query syntax
- Execute model generation and catch errors
- Analyze resulting geometry dimensions
- Check for specific features and constraints
- Generate detailed validation reports
Dev tools
# formatting
uvx rff format
# running the MCP server
npx @modelcontextprotocol/inspector \
uv \
--directory $(pwd) \
run \
server.py
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.