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
- 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.
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.
{
"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.
python -m pytest -q
python scripts\mcp_smoke_test.pyGenerated files are written to output/.