Skip to main content
Glama

Battenmark

Open, backend-neutral CAD infrastructure for AI agents and software.

CI License schema MCP

Battenmark provides a typed, backend-neutral interface for creating, editing, inspecting, validating and exporting authoritative CAD geometry across interchangeable CAD backends. Callers request create_hole — never PartDesign::Hole. No transport owns the model; one canonical service does.

ChatGPT / Claude / Gemini / Grok / Codex / local models / IDE agents / custom apps
                                   │
                    MCP / HTTP / Python / CLI
                                   │
                                   ▼
                         Battenmark Core
                                   │
                    typed CAD operations / CAD IR
                                   │
                        Backend Registry
                                   │
             ┌─────────────────────┼──────────────────────┐
             ▼                     ▼                      ▼
          FreeCAD                JSCAD              future adapters
     authoritative B-rep        preview        build123d/CadQuery/etc.
  • FreeCAD / OpenCascade — authoritative B-rep kernel (headless JSON-lines worker)

  • JSCAD — in-process preview/envelope backend (not the source of truth)

Quickstart

Prerequisites: Node.js ≥ 20 and npm. FreeCAD is optional for the core service and required only for the authoritative B-rep backend.

npm install
npx tsc --noEmit   # type check
npm test           # fast kernel-free suites (parametric, selectors, registry)

FreeCAD backend

sh scripts/bootstrap-macos.sh      # macOS: discovers /Applications/FreeCAD.app
sh scripts/install-freecad.sh      # Linux: installs headless 1.0.2 AppImage (no FUSE)
npm run test:freecad               # proves the real worker end-to-end

Discovery order: $AGENTCAD_FREECAD_CMD → macOS FreeCAD.app bundles → Homebrew → extracted Linux AppImage → PATH. See docs/MACOS.md and docs/LINUX.md.

Transports

Transport

Entry point

MCP stdio

npx agentcad-mcp

HTTP

npx agentcad serve --port 8787 then /api/v1/... (Bearer token via AGENTCAD_API_TOKEN)

CLI

npx agentcad --help

Python

python/agentcad — see examples

Python client example:

from agentcad import AgentCad

c = AgentCad(base_url="http://127.0.0.1:8787", token="secret-token")
pid = c.project_create("demo")["project_id"]
c.create_box(pid, 80, 50, 12)
print(c.rebuild(pid)["data"]["volume_mm3"])   # 48000

Related MCP server: freecad-tool-server

Golden smoke model

The canonical release smoke test is an 80 × 50 × 12 mm box = 48,000 mm³, verified through JSCAD, FreeCAD, HTTP, CLI, MCP and the Python client (test:transport-parity). Do not change this fixture casually.

Capabilities

  • Backend-neutral typed CAD operations with explicit schema (agentcad_schema_version: 2)

  • FreeCAD/OpenCascade authoritative B-rep; JSCAD preview

  • Scalar parameter expressions and dependency evaluation

  • Semantic face/edge selectors (top_perimeter, …) that re-resolve after edits

  • Persistent geometry references (gref) with explicit lost/ambiguous errors

  • Through / blind / counterbore / countersink holes

  • Fillets and chamfers · linear and rectangular patterns

  • STEP / FCStd / STL interchange · four-view PNG previews

  • Dynamic backend registry with per-backend capability discovery

  • One serialized FreeCAD worker with kill/restart recovery

Platform status

Platform

Status

macOS Apple Silicon

Tier 1 — hardware verified (arm64, macOS 26.6.2, FreeCAD 1.1.3)

Linux x86_64

headless / development validated (FreeCAD 1.0.2 AppImage)

macOS Intel

unverified

Windows

unsupported / unverified

Known limitations

This is pre-1.0 alpha software; APIs may change.

  • No assemblies, mates or assembly constraints yet

  • No circular patterns

  • Threads are cosmetic metadata, not helical solids

  • Imported STEP is geometry import — not automatic parametric reconstruction

  • Native FCStd documents keep historical PartDesign feature shapes; Battenmark measures the final Body Tip (summing historical solids double-counts)

  • One serialized FreeCAD worker (no pooling)

  • Preview rendering is JSCAD, not OCC hidden-line

  • Complete topological naming is not solved; persistent gref mitigates it

Full list: docs/LIMITATIONS.md.

Documentation

Topic

Doc

Architecture & foundation

docs/ARCHITECTURE.md · docs/FOUNDATION.md

Operation contract & schema

docs/CONTRACT.md · docs/VERSIONING.md

Backends & kernels

docs/BACKENDS.md · docs/FREECAD.md · docs/JSCAD.md · docs/KERNEL.md

Transports

docs/MCP.md · docs/HTTP.md · docs/CLI.md · docs/PYTHON.md · docs/CLIENTS.md

Service & persistence

docs/SERVICE.md · docs/AUTH.md

Import / export & preview

docs/IMPORT.md · docs/PREVIEW.md

Platforms & validation

docs/MACOS.md · docs/LINUX.md · docs/RELEASE.md

Compatibility identifiers

Public branding is Battenmark. Historical engineering identifiers remain on purpose and are a compatibility surface, not a second brand: AgentCadService, agentcad_schema_version, AGENTCAD_* environment variables, the agentcad / agentcad-mcp binaries. The internal service version 0.5.6 intentionally differs from the release tag; see docs/VERSIONING.md.

Contributing & security

See CONTRIBUTING.md and SECURITY.md. Code of Conduct: CODE_OF_CONDUCT.md.

License

Apache-2.0 for this repository. FreeCAD/OpenCascade are invoked as a separate LGPL process (the worker scripts run inside FreeCADCmd). See LICENSE, NOTICE and THIRD_PARTY_NOTICES.md.

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
<1hResponse time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables AI to directly call FreeCAD for 3D modeling via the MCP protocol, providing 39 modeling tools including primitive creation, boolean operations, transformations, and export.
    2
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to programmatically build, analyze, and export 3D CAD geometry using FreeCAD through REST or MCP tools.
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables agent-driven CAD design through deterministic source files (.kcad.ts), including model evaluation, validation, and export to STEP/STL via MCP tools for review and introspection.
    95
    14
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    AI pilots FreeCAD. Provides full control of FreeCAD for parametric modeling, assembly, geometry sensing, and more via MCP tool calls.
    33
    6
    MIT

View all related MCP servers

Related MCP Connectors

  • Create, browse, remix, collaborate on, and run durable AI workflow nodes from MCP hosts.

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

  • Generate, edit, and deploy immersive 3D/WebGL web projects from any MCP assistant.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/halsyourpal422/Battenmark'

If you have feedback or need assistance with the MCP directory API, please join our Discord server