lineus-mcp
Summary: An MCP server that lets an AI agent design, preview, and draw with a Line-us pen plotter on the local network.
Preview any drawing as PNG before committing:
preview_paths,preview_svg,preview_text,preview_scene(each returns a diagnostic view plus a hardware-accurate simulation).Draw strokes, SVGs, text, or declarative scenes:
draw_paths,draw_svg,draw_text,draw_scene— all asynchronous, returning ajob_id.Plan a scene without drawing or rendering:
plan_scenereports stroke/point counts, bounding box, pen-up travel, and warnings.Scenes (main interface): compact declarative descriptions compiled server-side from parametric expressions, text, paths, SVG, doodles, or traced images — with fills/hatching, transforms, smoothing, repeats, occlusion, and stroke-join planning.
Handwriting: nine single-line print/cursive fonts (plus legacy Hershey);
list_fontsreports passes, aperture, and joins to pick legible faces.Doodles: browse and pick real Quick, Draw! drawings — 184 curated in 31 categories, or any of 345 categories fetched and cached on demand via
doodles.Examples:
get_example(andlineus://examplesresources) returns finished starter scenes to modify.Job and robot control:
get_job,abort,home,get_status, anddraw_orientation_testto verify canvas orientation.Run without hardware via
LINEUS_MOCK=1; extensive env configuration (host, speed, pen height, envelope, preview path, etc.).
Fetches drawings from Google's Quick, Draw! dataset on demand. Any of the 345 doodle categories can be requested, and the server retrieves that category's stroke data for rendering and plotting as robot drawings.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lineus-mcp draw 'hello world' on the plotter and show me the preview"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
agents | An MCP server: a scene language, single-stroke handwriting, doodles, and a preview that simulates what the pen will really do | |
people | A window that moves the arm live from the keyboard, mouse or a gamepad, and calibrates the pen depth while you draw | |
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-mcpuvx --from 'git+https://github.com/BenTeoNeb/lineus-mcp#subdirectory=packages/lineus-jog' lineus-jogHow 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 packagesSafety
Preview before drawing.
Never expose port 1337 to the internet. There is no authentication.
Licence
MIT — see LICENSE.
Available Tools
17 toolsabortBDestructiveIdempotent
Stop the current drawing, lift the pen and go home.
Inputs: no named parameters.
doodlesARead-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_exampleARead-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_jobCRead-onlyIdempotent
Progress of a drawing job.
Inputs: job_id (required).
get_statusARead-onlyIdempotent
Robot firmware banner, canvas size in mm, and current/last job.
Inputs: no named parameters.
homeAIdempotent
Lift the pen and move the arm to its home position.
Inputs: no named parameters.
list_fontsARead-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_sceneARead-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_pathsARead-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_sceneARead-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_svgARead-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_textARead-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
Scored across 17 tools
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.
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.
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.
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
Related MCP Connectors
AI video editor your agent can drive: plan scenes, edit a multi-track timeline, and render MP4s.
Make AI-drawn video from chat: your LLM draws every frame in code; add narration, music and SFX.
A giant shared wall where AI agents paint live: watch them draw and connect your own agent
Persistent memory, hybrid search and a goal graph for AI agents, over stdio or remote HTTP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents eyes and a robotic arm to compose and iterate generative art on an AxiDraw pen plotter via webcam feedback.2AGPL 3.0
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to control pen plotters via MCP tools for text layout, SVG/DXF import, G-code generation, device control, and vision calibration.19-

Rayzia MCPofficial
AlicenseNot gradedqualityDmaintenanceEnables 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.2MIT- FlicenseNot gradedqualityDmaintenanceEnables MCP-compatible coding agents to control a posable, rigged stickman character by setting joint angles and facial expressions, and to render still frames or full animations as SVG, PNG, GIF, or MP4.-