
Crochet Engine
io.github.dengyu123456Published by GitHub account dengyu123456v0.1.1Updated Oct 24, 2026
Deterministic photo-to-crochet-chart engine: stitch counts, 5 techniques, yarn estimates.
Overview
Turns photos or ASCII designs into crochet charts with exact stitch counts, technique presets, and yarn estimates.
- What you can do
- A deterministic photo-to-crochet-chart engine exposed over stdio. Tools include photo_to_chart (local image path to chart PNG plus per-color stitch counts), render_ascii_design (ASCII design file to chart PNG and counts), and estimate_yarn_tool (stitch counts to per-color yardage for one yarn weight or all). It supports five technique presets (graph, c2c, tapestry, mosaic, filet) and uses resize, median-cut color quantization, and confetti cleanup rather than AI image generation.
- When to use it
- Use it when an assistant should convert a photo or ASCII design into a crochet chart with reproducible stitch counts, or estimate yarn yardage for a chart. It suits craft pattern planning where exact, repeatable output matters more than generative imagery.
- Requirements
- Runs locally as a Python package (crochetpatterngen-engine) over stdio; install with pip, optionally with the mcp extra, or run via uvx. Needs Python with Pillow and numpy; the optional rembg extra is needed for background removal. No accounts, API keys, or environment variables are declared. Desktop only.
Installation
In SourceWeft
- Open Crochet Engine in the dashboard and add it to a workspace.
- 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
crochetpatterngen-engine
The deterministic photo-to-crochet-chart engine behind crochetpatterngen.com — packaged as a Python library, CLI, and MCP server so AI agents (Claude Desktop, Cursor, etc.) can turn photos into crochet charts with exact stitch counts.
Deterministic, not generative. There is no AI image generation here — just resize, median-cut color quantization, and confetti cleanup. Same input, same chart, same stitch counts, every time. No hallucinated rows.
Why this engine
- Real stitch counts — every chart comes with per-color hex + stitch counts that sum exactly to the grid size. What you see is what you crochet.
- C2C block aspect correction — C2C blocks are physically wider than tall (0.7:1 h:w). The engine adjusts grid dimensions so the worked piece keeps the photo's proportions instead of coming out squashed.
- 5 technique presets —
graph,c2c,tapestry,mosaic,filet. - Yarn estimation — per-color yardage for 6 yarn weights (fingering → super bulky).
- Zero heavy deps — Pillow + numpy only. Optional
rembgextra for background removal.
Install
Python API
CLI
MCP server (Claude Desktop & friends)
Add to claude_desktop_config.json:
Or with a regular pip install:
Tools exposed (stdio transport):
ASCII design format
See designs/frog.txt and designs/dragon.txt:
One character per stitch; . is the background/padding color. Rows are padded to the longest row.
Development
License
MIT — see LICENSE.
Free web tool + pattern library at crochetpatterngen.com.
Source: README.md at commit 31b75ce
Tools
0Version history
1- v0.1.1LatestSep 16, 2026
Score
50% 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
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- 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 listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts