Skip to main content
Glama
README.md
# 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.

## Install and run

```powershell
python -m pip install -e ".[dev]"
hammer-cad-mcp
```

For an uninstalled checkout:

```powershell
$env:PYTHONPATH = "src"
python -m hammer_cad_mcp.server
```

The server uses MCP stdio transport and waits silently when started directly.

## MCP client configuration

```json
{
  "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

```powershell
python -m pytest -q
python scripts\mcp_smoke_test.py
```

Generated files are written to `output/`.


TDQS

C2.7/5.0

Scored across 23 tools

Disambiguation5/5

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 Consistency3/5

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.

Tool Count4/5

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.

Completeness4/5

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

ActivityStale
ResponsivenessNo issues