Hammer MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Hammer MCP draft a rectangle of 80x60 mm and extrude to 15 mm"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Hammer MCP
Hammer MCP is a standalone Model Context Protocol server for generating CAD files. It exposes DXF and OpenSCAD operations to MCP clients. Check CLI version for CLI interactions
Capabilities
DXF drafting, saving, and PNG previews.
OpenSCAD primitives, extrusion, Boolean operations, PNG rendering, and STL/3MF/OFF export.
Local Ollama planning for multi-step natural-language requests.
Guarded scripting with audit logging.
Related MCP server: OpenSCAD MCP Server
Install and run
python -m pip install -e ".[dev]"
hammer-cad-mcpFor an uninstalled checkout:
$env:PYTHONPATH = "src"
python -m hammer_cad_mcp.serverThe server uses MCP stdio transport and waits silently when started directly.
MCP client configuration
{
"mcpServers": {
"hammer-cad": {
"command": "python",
"args": ["-m", "hammer_cad_mcp.server"],
"cwd": "C:\\path\\to\\HammerMCP",
"env": {
"PYTHONPATH": "C:\\path\\to\\HammerMCP\\src"
}
}
}
}Natural-language planning defaults to local llama3:latest through Ollama.
Change the model or URL in config/config.json.
Test
python -m pytest -q
python scripts\mcp_smoke_test.pyGenerated files are written to output/.
Available Tools
23 toolsadd_dimensionC
Add a linear DXF dimension.
Inputs: point1 (required), point2 (required), dim_line_point (required). Returns: path, message, success, entity_id
boolean_differenceC
Subtract later OpenSCAD objects from the first.
Inputs: object_ids (required). Returns: path, message, success, entity_id
boolean_intersectionC
Intersect OpenSCAD objects.
Inputs: object_ids (required). Returns: path, message, success, entity_id
boolean_unionD
Union OpenSCAD objects.
Inputs: object_ids (required). Returns: path, message, success, entity_id
create_boxC
Create an OpenSCAD box.
Inputs: size (required), position. Returns: path, message, success, entity_id
create_cylinderC
Create an OpenSCAD cylinder.
Inputs: height (required), radius (required), position. Returns: path, message, success, entity_id
create_layerC
Create or update a DXF layer.
Inputs: name (required), color. Returns: path, message, success, entity_id
create_sphereC
Create an OpenSCAD sphere.
Inputs: radius (required), position. Returns: path, message, success, entity_id
draw_arcC
Draw a DXF arc using angles in degrees.
Inputs: center (required), radius (required), end_angle (required), start_angle (required), +2 more. Returns: path, message, success, entity_id
draw_circleC
Draw a DXF circle.
Inputs: center (required), radius (required), color, layer. Returns: path, message, success, entity_id
draw_hatchC
Add a hatch inside a closed polygon boundary.
Inputs: boundary (required), color, layer, scale, +1 more. Returns: path, message, success, entity_id
draw_lineD
Draw a DXF line.
Inputs: end (required), start (required), color, layer. Returns: path, message, success, entity_id
draw_polylineC
Draw a DXF lightweight polyline.
Inputs: points (required), color, layer, closed. Returns: path, message, success, entity_id
draw_rectangleC
Draw an axis-aligned DXF rectangle.
Inputs: corner1 (required), corner2 (required), color, layer. Returns: path, message, success, entity_id
draw_textC
Add single-line text to the DXF drawing.
Inputs: content (required), position (required), color, layer, +1 more. Returns: path, message, success, entity_id
execute_scriptC
Execute guarded ezdxf Python or append raw OpenSCAD code.
Inputs: code (required), tier (required), dry_run. Returns: code, tier, dry_run, message, +1 more
export_modelC
Export the current OpenSCAD model.
Inputs: format (required), output_path (required). Returns: path, message, success, entity_id
linear_extrudeC
Extrude a closed 2D polygon in OpenSCAD.
Inputs: height (required), profile_points (required). Returns: path, message, success, entity_id
process_commandC
Plan and execute a natural-language CAD request.
Inputs: text (required), context. Returns: result
render_preview_2dC
Render the current DXF drawing to PNG.
Inputs: output_path. Returns: path, message, success, entity_id
render_preview_3dC
Render the current OpenSCAD model to PNG.
Inputs: output_path. Returns: path, message, success, entity_id
save_drawingC
Save the current drawing as DXF.
Inputs: filename. Returns: path, message, success, entity_id
save_openscadC
Save the current OpenSCAD source without invoking the CLI.
Inputs: output_path. Returns: path, message, success, entity_id
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
All tools have clearly distinct purposes, separated by domain (DXF vs OpenSCAD) and operation type. No two tools appear to do the same thing; even similar-named tools like create_box and draw_rectangle target different axes (3D vs 2D).
Naming conventions are mixed: some use 'draw_', some 'create_', some 'boolean_', and others have no consistent prefix (e.g., linear_extrude, export_model). While readable, the lack of a uniform pattern makes it harder for an agent to predict tool names.
23 tools is slightly on the higher side but appropriate for a CAD server covering both 2D and 3D. Each tool serves a distinct purpose, and the count is justified by the need to handle primitives, operations, rendering, and file I/O.
The tool set covers basic shape creation, boolean operations, extrusion, rendering, and file saving. Minor gaps include lack of editing tools for existing objects (e.g., move, rotate) and more advanced DXF entities like splines, but core CAD workflows are supported.
Maintenance
Related MCP Connectors
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Text-to-CAD: build exact STEP or 3MF/STL on the server, each stated requirement measured.
DXF and PDF/X-4 for AI agents: structured facts, PNG renders, an interactive in-chat viewer.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables automated CAD operations via natural language, supporting both AutoCAD LT on Windows and headless DXF generation on any platform.8MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to create and manipulate 3D CAD models using OpenSCAD.428 npm1MIT
- AlicenseAqualityDmaintenanceEnables reading, analyzing, and editing CAD files (DXF and DWG) via natural language, including entity queries, layer management, and safe copy-based edits.171MIT
- AlicenseAqualityBmaintenanceEnables an AI assistant to conversationally control Autodesk AutoCAD, drawing, inspecting, and editing plans, and includes a cross-platform DXF engine that runs without AutoCAD on macOS and Linux. It exposes tools for rendering views as images, batching geometry, blocks, and structures, measuring and checking plans, and undoing whole batches.12MIT