Drawmath

io.github.CloudCorpRecordsPublished by GitHub account CloudCorpRecordsv0.1.0Updated Nov 7, 2026

Metric-imperial conversion for technical drawings: dimensions, tolerances, threads, roughness.

VerifiedSTDIODesktop onlyDeveloper ToolsData & Analytics

Overview

AI-generated overview

Converts metric and imperial values on technical drawings — dimensions, tolerances, threads, roughness and weights — locally with no network.

What you can do
  • Convert a single engineering value between metric and imperial, with optional kind and direction, returning exact and display values, derivation method and confidence
  • Convert a whole printed callout string while preserving symbols, fit classes and multipliers, leaving angles untouched
  • Cross-reference an ISO metric thread with its nearest UNC counterpart, or return the full M2–M30 chart
When to use it
Useful when reading or annotating mechanical drawings that mix metric and imperial units and you want shop-convention rounding, fit classes and thread cross-references handled consistently. Not needed for PDF drawing extraction, which this build omits.
Requirements
Runs as a local process via npx (Node.js) or the published Docker image; no accounts, API keys or environment variables, and no network access at runtime.
Before you install
Thread matches are nearest standards, not interchangeable parts, and the server says so in every thread result; verify before specifying hardware. Argument shapes are labelled reconstructions, and the PDF extraction and drawing-conversion tools of the original are absent.

Installation

In SourceWeft

  1. Open Drawmath in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

drawmath

Metric and imperial values on a technical drawing, converted with the factors and rounding a shop actually uses — locally, with no network call and nothing to configure.

Give drawmath one value, one printed callout, or one thread designation and it answers in the other system: lengths and GD&T values, ± tolerances, diameters with their fit class, surface roughness, weights and threads. Each answer carries the exact converted value alongside the rounded display value, says how it was derived (exact, rounded, table or nearest), and gives a confidence score.

Precision

  • Factors are the international definitions: 25.4 mm per inch and 0.45359237 kg per pound.
  • Display values follow shop-floor convention: a 0.01 mm step becomes a 4-decimal inch value.
  • Worked examples: 84±0.1 mm becomes 3.3071±0.0039 in, Ø30 H7 becomes Ø1.1811 H7, Ø40 H7 becomes Ø1.5748 H7, and Ra 1.6 µm becomes Ra 63 µin.
  • Threads are matched against a metric/UNC chart covering M2–M30, snapped by major diameter when there is no exact counterpart: M8 becomes 5/16-18 UNC, M6 becomes 1/4-20 UNC, and 1/4-20 UNC becomes M6. A matched thread is a nearest standard, never an interchangeable one — every thread result says so explicitly.

Tools

This is a labelled subset of the original five-tool surface. Three tools are built:

  • convert_value — one value: value (for example "84±0.1 mm", "Ø30 H7", "Ra 1.6", "2.5 kg" or "M8"), with an optional kind (length, tolerance, gdt, roughness, weight, thread or auto) and an optional direction (metric_to_imperial, imperial_to_metric or auto). The result JSON gives exact and display values, the derivation method and a confidence score.
  • convert_text — a whole callout string: text, with an optional direction. Notation is preserved — symbols, fit classes and multipliers stay where they were — and angles are left untouched.
  • lookup_thread — a thread cross-reference: give a designation such as "M8" or "1/4-20 UNC" for its chart row and nearest counterpart in the other system, or omit it for the full M2–M30 chart.

Two original tools are omitted from this subset: extract_drawing_text and convert_drawing_pdf. They depend on a PDF text-extraction and stamping engine that cannot be reproduced from the published specification, and this build carries no PDF library. The original's convert-drawing prompt is likewise out of scope, as prompts sit outside this program's tool parity scope.

Argument shapes are labelled reconstructions: the published material pins behaviour and worked examples, not parameter tables, so each tool takes the primary string its behaviour implies plus the optional direction or kind that behaviour calls for.

CLI

bash
npx @reneturcios/drawmath convert_value '{"value":"84±0.1 mm"}'npx @reneturcios/drawmath convert_text '{"text":"Ø30 H7"}'npx @reneturcios/drawmath lookup_thread '{"designation":"M8"}'npx @reneturcios/drawmath lookup_thread '{}'npx @reneturcios/drawmath --version

Exit codes: 0 on success, 1 on a runtime error, 2 on a usage error.

MCP server

bash
npx -y @reneturcios/drawmath mcp

MCP client config:

json
{  "mcpServers": {    "drawmath": {      "command": "npx",      "args": ["-y", "@reneturcios/drawmath", "mcp"]    }  }}

Docker

bash
docker run -i ghcr.io/cloudcorprecords/drawmathdocker run --rm ghcr.io/cloudcorprecords/drawmath convert_text '{"text":"M8"}'

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # tsx --test test/*.test.ts (fixture arithmetic only, no network)npm run dev     # run the CLI from source

License

MIT — Copyright (c) 2026 Rene Turcios

Source: README.md at commit c0ff798

Tools

3

convert_value

Convert one engineering value between metric and imperial: length, tolerance, GD&T, surface roughness, weight, or thread designation. Returns exact and display values, derivation method and confidence.

Parameterskindvaluerequireddirection

convert_text

Convert a printed callout string between metric and imperial, preserving notation. Angles stay untouched.

Parameterstextrequireddirection

lookup_thread

Cross-reference an ISO metric thread with its nearest Unified (UNC) counterpart, or return the full M2-M30 chart when no designation is given.

Parametersdesignation

Version history

1
  1. v0.1.0LatestNov 4, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts