Skip to main content
Glama
CDT AutoCAD Provider

CDT AutoCAD Provider

README.md
# CDT-AutoCAD

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Python 3.11 | 3.12](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue.svg)](pyproject.toml)
[![MCP Protocol](https://img.shields.io/badge/MCP-Standard-orange.svg)](https://modelcontextprotocol.io)
[![Platform: Windows](https://img.shields.io/badge/platform-Windows%20x64%20%7C%20Linux%20(ezdxf)-lightgrey.svg)](docs/COMPATIBILITY.md)
[![Tools](https://img.shields.io/badge/tools-87%20callable-green.svg)](docs/TOOL_GUIDE.md)

Generic AutoCAD execution provider for Model Context Protocol (MCP) clients. It owns native CAD execution,
state verification and recovery; engineering design rules belong to CDT_Engineer.

Provider `0.4.3` · Contract `autocad-generic-v1` · 87 public tools.
Native acceptance is scoped to AutoCAD 2027 full on Windows x64. The headless DXF
lane has separate capabilities; other AutoCAD versions need their own acceptance.

---

## Quickstart / MCP Client Configuration

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "cdt-autocad": {
      "command": "uvx",
      "args": ["cdt-autocad-provider"],
      "env": {
        "CDT_AUTOCAD_BACKEND": "com",
        "CDT_AUTOCAD_COM_PROGID": "AutoCAD.Application.26",
        "CDT_AUTOCAD_COM_ATTACH_POLICY": "attach_only"
      }
    }
  }
}
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "cdt-autocad": {
      "command": "uvx",
      "args": ["cdt-autocad-provider"]
    }
  }
}
```

---

## Install and run

Use Python 3.12 and the platform lock from this checkout. On Windows:

```powershell
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install pip==26.1.2
.\.venv\Scripts\python.exe -m pip install -r pylock.windows.toml
.\.venv\Scripts\python.exe -m pip install --no-deps --no-build-isolation .
$env:CDT_AUTOCAD_BACKEND = 'com'
$env:CDT_AUTOCAD_COM_PROGID = 'AutoCAD.Application.26'
$env:CDT_AUTOCAD_COM_ATTACH_POLICY = 'attach_only'
.\.venv\Scripts\cdt-autocad.exe --transport stdio
```

Start AutoCAD in the same interactive user/session first. `attach_only` refuses
when the application is unavailable. For headless use, install the Linux lock
where applicable and select `CDT_AUTOCAD_BACKEND=ezdxf`.
See [reproducible installation](docs/REPRODUCIBLE_BASELINE.md).

## Use safely

1. Discover `help`, `system_status` and `system_capabilities`.
2. Bind native writes to `document_pid` and `expected_parent_fp`.
3. Execute bounded semantic features, then inspect/query/measure the result.
4. Continue only after verified commit or rollback. Reconcile uncertain completion
   before retrying; timeout does not prove native cancellation.

Tool presence does not imply native strong-integrity support for every route.
Configure allowed file roots; HTTP requires deployment-managed authentication.
No arbitrary shell, AutoLISP, macro or caller-supplied C# execution is exposed.

## Reference

- [Release, install and rollback](docs/RELEASE_AND_DEPLOYMENT.md).
- [Tool contract](docs/TOOL_GUIDE.md) — callable surface and guarantees.
- [Compatibility and assurance limits](docs/COMPATIBILITY.md).
- [Operations](docs/OPERATIONS_RUNBOOK.md).
- [Documentation index](docs/README.md) — architecture, security and QA references.

## License

Distributed under the open-source MIT License. See [LICENSE](LICENSE), [copyright](COPYRIGHT.md),
[third-party notices](THIRD_PARTY_NOTICES.md) and [source provenance](SOURCE_PROVENANCE.md).

TDQS

A3.6/5.0

Scored across 87 tools

Disambiguation4/5

Most tools have distinct resource/action scopes, and descriptions include explicit cross-references for close neighbors such as document_save vs document_save_as and xref_unload vs xref_detach. Some overlap remains between generic object transforms, solid_transform, batch_transform_entities, and feature_execute vs transaction tools, so an agent still needs careful selection.

Naming Consistency4/5

Tools are overwhelmingly snake_case with resource-first naming such as object_move, layer_create, and solid_boolean, which is predictable across major groups. Minor deviations like help/undo/redo and mixed action ordering in names such as native_integrity_status or drawing_extents keep it from perfect consistency.

Tool Count1/5

87 tools is far above the recommended 3-15 range and crosses the 50+ extreme-mismatch threshold. Although the tools are largely non-redundant, the surface is too large for efficient agent selection and would benefit from consolidation into higher-level operations.

Completeness4/5

The surface covers document lifecycle, layers, blocks, xrefs, layouts, viewports, objects, entity creation, dimensions, solids, metadata, transactions, and undo/redo, so core AutoCAD workflows are well covered. Gaps remain for deleting layers/blocks/layouts, closing documents, block attributes, and several common entity types, but agents can mostly work around them.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues