Skip to main content
Glama

Line-us, revived

Software for the Line-us robot drawing arm: a small pen plotter that started on Kickstarter, a three-servo arm that speaks G-code over TCP on the local network.

There are two ways to drive it here, for two different hands on the pen:

an AI agent   ──▶  lineus-mcp  ──┐
                                 ├──▶  lineus-core  ──▶  TCP 1337  ──▶  Line-us
a person      ──▶  lineus-jog  ──┘

Package

For

What it is

lineus-mcp

agents

An MCP server: a scene language, single-stroke handwriting, doodles, and a preview that simulates what the pen will really do

lineus-jog

people

A window that moves the arm live from the keyboard, mouse or a gamepad, and calibrates the pen depth while you draw

lineus-core

both

The arm as measured: its reach, pen model, coordinate mapping and connection

The arm takes one connection at a time. Both tools let go of it when they are not using it, so you can draw with an agent and jog by hand without restarting either.

Install

Each tool installs on its own, straight from GitHub; neither pulls in the other's dependencies.

uvx --from 'git+https://github.com/BenTeoNeb/lineus-mcp#subdirectory=packages/lineus-mcp' lineus-mcp
uvx --from 'git+https://github.com/BenTeoNeb/lineus-mcp#subdirectory=packages/lineus-jog' lineus-jog

How to register the MCP server with Claude Code, Claude Desktop or another client is in its README. Both read the same LINEUS_* environment variables, so set LINEUS_HOST (and any pen calibration) once for both.

Related MCP server: KenjoyDraw MCP Server

Development

A uv workspace: one lockfile, one environment, one test run.

uv sync --all-packages      # every package, with pytest and ruff
uv run pytest               # all three packages: no robot, no network, a few seconds
uv run ruff check packages

Safety

  • Preview before drawing.

  • Never expose port 1337 to the internet. There is no authentication.

Licence

MIT — see LICENSE.

Available Tools

17 tools
abortB
DestructiveIdempotent

Stop the current drawing, lift the pen and go home.

Inputs: no named parameters.

doodlesA
Read-onlyIdempotent

Real doodles from Google's Quick, Draw! dataset (CC BY 4.0): single strokes, in the order a person drew them, so line width comes from the pen alone.

With no category: the curated categories bundled with the server, and every category that can be fetched from the web (345 in all). With a category: a NUMBERED CONTACT SHEET of candidates. Look at it and choose a pick, then use {"doodle": category, "pick": N, "box": [x,y,w,h]} in a scene.

source: "auto" (default) uses the curated set if the category has one, else fetches from the web; "web" always fetches -- more variety, NO human review; "bundled" never goes online. Fetched categories are cached on disk, which keeps preview and draw identical. Web candidates are ranked automatically but many are still scribbles or have the word written in them: that is what the contact sheet is for. Draw with order="asis" to replay a doodle exactly as its author drew it.

Inputs: count, start, source, category.

draw_orientation_testA

Draws a frame around the canvas plus an 'F' in the top-left corner so a human can confirm the canvas orientation (F must read normally, top-left).

Inputs: no named parameters.

draw_pathsA

Draw polylines given in canvas millimetres: [[ [u,v], [u,v], ... ], ...]. Each inner list is one pen-down stroke. Returns a job_id. speed: G94 S, the max step size for PEN-DOWN moves (1 finest/slowest .. 30 coarsest/fastest, default 5). Not a speed dial: it is interpolation granularity. Pen-UP travel is G94 P, set by LINEUS_TRAVEL_SPEED. order: how strokes are sequenced. "human" (default) top row first, left to right within a row, never reversed. Looks like a person drawing. Costs more pen-up travel (~2.8x on text) but this machine is slow enough that it rarely matters. "fast" nearest-neighbour, may draw a stroke backwards. Least travel, but it hops between rows and looks chaotic to watch. "asis" exactly the order supplied, untouched — you control the sequence.

Inputs: paths (required), order, speed.

draw_sceneA

Draw a declarative scene (same object as preview_scene -- see it for the shape language). Compilation is deterministic and content-hashed, so passing the scene you previewed draws exactly what you saw. Returns a job_id and the scene_id.

Inputs: scene (required), order, speed.

draw_svgA

Draw an SVG fitted into box (x,y,w,h) in canvas mm, aspect ratio kept. Line art works best; fills are not hatched. Returns a job_id.

Inputs: svg (required), h, w, x, +3 more.

draw_textA

Write text with a single-stroke Hershey font fitted into box (x,y,w,h) mm. Prefer the handwriting faces: print neutral/architect, cursive italienne/ cursive2 (these weld into one stroke per word). See list_fonts(). For multi-line or MULTI-FONT text prefer a scene: draw_scene puts several fonts and alignment in one call. speed: G94 S, max step size for pen-down moves, 1 (finest) .. 30 (coarsest).

Inputs: text (required), h, w, x, +4 more.

get_exampleA
Read-onlyIdempotent

Worked example scenes: finished drawings that went through several rounds of critique on this machine. With no name, lists them. With a name, returns the scene -- pass it to preview_scene as-is, or modify it ("the cat, lying down") rather than starting from nothing. Each carries a _comment explaining what made it work.

Inputs: name.

get_jobC
Read-onlyIdempotent

Progress of a drawing job.

Inputs: job_id (required).

get_statusA
Read-onlyIdempotent

Robot firmware banner, canvas size in mm, and current/last job.

Inputs: no named parameters.

homeA
Idempotent

Lift the pen and move the arm to its home position.

Inputs: no named parameters.

list_fontsA
Read-onlyIdempotent

Every typeface available to text, draw_text and a scene's "text" producer.

Two families, and the difference matters on paper:

HANDWRITING (fonts/, SIL OFL) -- real single-line handwriting faces, print and cursive. Each letter is drawn ONCE. Prefer these. HERSHEY -- the classic 1967 engraving set, kept for compatibility. Its bold and serif faces fake weight by RETRACING every stem (a capital H in rowmant is 27 strokes), which on a pen plotter reads as a scribble. Pass include_hershey=true to list them.

Three measurements decide whether a face works here, and they catch different failures -- all three were learned the hard way on paper: passes strokes per letter vs a human's. Catches retracing. aperture the width of a letter's opening (the gap in s/a/e/o/g) against the 1-2 mm the firmware's corner blending eats. Catches letters that close into blobs: brush at 0.89 mm turned "oo" into "rr" on the test sheet. joins for cursive, whether letters weld into one continuous stroke per word.

Inputs: include_hershey.

plan_sceneA
Read-onlyIdempotent

Compile a scene and report what it would cost, WITHOUT drawing or rendering: stroke/point counts, bounding box, pen-up travel and any warnings.

Inputs: scene (required).

preview_pathsA
Read-onlyIdempotent

Render polylines (canvas mm, [[ [u,v], ... ], ...]) without drawing. Returns the diagnostic view (pink = pen-up travel, grey box = page) and, with simulate=true (default), what the arm will actually put on paper.

Inputs: paths (required), simulate.

preview_sceneA
Read-onlyIdempotent

Render a declarative SCENE as a PNG without drawing. Prefer this over preview_paths: a scene is ~50x smaller than the coordinates it compiles to, and draw_scene given the SAME scene provably draws what you previewed.

scene = {"shapes": [ ...shape... ], "fit": [x,y,w,h] (optional, scales the lot)}

There is deliberately NO library of shapes -- a fixed catalogue would handle the
dull cases and send everything interesting back to pasting raw points. Curves are
EXPRESSIONS, so the vocabulary is open:

  {"param": {"t": [0, 6.2832, 200],
             "x": "33+5.5*cos(t)", "y": "30+5.5*sin(t)", "closed": true}}

is a circle; change the expressions and it is a spiral, rose, lissajous or
harmonograph. Variables: t, plus i and n inside "repeat". Functions: sin cos tan
asin acos atan atan2 sinh cosh tanh exp log sqrt hypot floor ceil fmod degrees
radians abs min max round pow sign clamp lerp; constants pi, tau, e.

Producers (exactly one per shape):
  "param"  {"t":[start,stop,steps], "x":expr, "y":expr, "closed":bool}
  "path"   [[u,v], ...]                      one stroke, the escape hatch
  "paths"  [[[u,v], ...], ...]               several strokes
  "text"   "a

b", or [{"s":"a","font":"timesr"}, {"s":"b","font":"scriptc"}] with "font", "align" (left|center|right), "leading" (default 1.4) "svg" "..." "doodle" "cat", with "pick" (index), "source" (auto|bundled|web) -- real drawings from Google's Quick, Draw!, single strokes in the order a person drew them. Call doodles() first to SEE the candidates and choose a pick. Modifiers (any producer): "fill" {"hatch":deg, "spacing":mm (default 1.15), "cross":bool, "outline":bool} -- hatching is how you get solid black here "transform" {"translate":[dx,dy], "rotate":deg, "scale":s|[sx,sy], "about":[x,y]} "box"/"fit" [x,y,w,h] scale this shape into a box "repeat" N, with i (0..N-1) and n available in the expressions

Inputs: scene (required), simulate.

preview_svgA
Read-onlyIdempotent

Render an SVG (paths/shapes, strokes only — fills are ignored) fitted into the box (x,y,w,h) in canvas mm (default: whole canvas). Returns a PNG.

Inputs: svg (required), h, w, x, +2 more.

preview_textA
Read-onlyIdempotent

Render single-stroke (Hershey) text fitted into box (x,y,w,h) mm. Use \n for new lines. Prefer the HANDWRITING faces -- print: neutral architect pancakes delight casual; cursive (welded, one stroke per word): italienne cursive2 brush allure. call list_fonts() for the measurements. Hershey names still work but most of them retrace every stem.

Inputs: text (required), h, w, x, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 17 tools

    Disambiguation4/5

    The preview_*/draw_* pairing gives each tool a clear render-vs-execute role, and distinct modalities (paths, svg, text, scene) separate the rest. Some overlap remains: preview_scene explicitly supersedes preview_paths and its text producer overlaps preview_text/draw_text, but the descriptions steer the agent well.

    Naming Consistency4/5

    The dominant pattern is verb_noun (get_status, get_job, preview_paths, draw_scene, plan_scene, list_fonts, get_example). A few deviate (bare 'abort', 'home', and the noun 'doodles'), but overall it is predictable and readable.

    Tool Count4/5

    17 tools is on the heavier side but each preview/draw pair and helper (plan_scene, list_fonts, get_example, doodles) earns its place. Nothing feels redundant or padded.

    Completeness4/5

    Strong lifecycle coverage: status/job monitoring, abort/home, orientation calibration, four input modalities with preview and execute, plus cost planning, font enumeration, examples, and doodle sourcing. Minor gaps like explicit queue management or pen/feed control are easy to work around.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to control pen plotters via MCP tools for text layout, SVG/DXF import, G-code generation, device control, and vision calibration.
      19
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to drive a live SVG/vector editor, allowing a full observe-and-act loop on a canvas with real tools, state reading, and PNG rendering.
      2
      MIT