Mollie's Stitch Studio
Enables ChatGPT to queue validated embroidery designs, compile constrained one-color designs, describe Brother SE700 limits, list queued jobs, and request phone-side transfers to a Brother SE700 after explicit user approval.
README
Mollie's Stitch Studio
Mollie's Stitch Studio is a working proof of the safest architecture for sending custom embroidery designs to a Brother SE700 without leaving a Mac running.
For a copy-paste brief to give Mollie's local coding agent, see MOLLIE_AGENT_HANDOFF.md.
The VPS stores validated designs. A native iPhone app downloads an approved PES file, finds the SE700 on the same Wi-Fi network, and performs the local transfer only after Mollie confirms it.
What works now
- Deterministic embroidery designs assembled from typed geometry.
- Real PES compilation with
pyembroidery. - PES decode and validation for hoop bounds, stitch length, stitch count, and upload size.
- Technical SVG stitch previews generated from the decoded PES.
- An authenticated VPS queue at
https://stitch.204.168.230.132.sslip.io. - A native SwiftUI iPhone companion with Keychain pairing.
- Same-Wi-Fi SE700 discovery, exact model verification, and certificate pinning.
- ChatGPT can request a phone-side transfer without receiving LAN access or machine-write capability.
- Explicit approval before upload and delivery verification afterward.
- Exact Brother
pedxmlmultipart upload behavior based on the open-source protocol notes credited inTHIRD_PARTY_NOTICES.md.
The backend and iPhone app are built and tested. No file has been uploaded to the physical machine yet. That remains an intentional, separately confirmed action.
Architecture
ChatGPT design conversation
|
v
typed design recipe -> PES compiler -> decode and validate -> VPS queue
|
v
native iPhone app
|
same home Wi-Fi
|
v
Brother SE700
The VPS cannot directly reach a machine inside the home network. The iPhone is the secure local relay because it can access both HTTPS on the internet and the SE700 on the local Wi-Fi. ChatGPT can stage a transfer request in the VPS queue, but only the foreground iPhone app can discover the machine and perform the upload after Mollie confirms it.
PES is a compiled binary machine format containing ordered stitch, jump, trim, color-change, and end commands. SVG is used only as an editable or reviewable intermediate. An ordinary image is not automatically a safe embroidery design.
Reliability by design source
| Input | Expected automation reliability | Notes |
|---|---|---|
| Parametric text, borders, icons, and geometry | 90 to 95 percent | Best first release because stitch rules are explicit. |
| Clean vector artwork with limited colors | 75 to 90 percent | Needs path cleanup and stitch presets. |
| Constrained AI line art | 65 to 85 percent | Needs vectorization, simplification, and validation. |
| Photos, gradients, and painterly imagery | 30 to 50 percent | Needs real digitizing judgment and is not an automatic one-click conversion. |
These ranges estimate stitch quality without manual editing. PES validity and LAN transfer can be deterministic, but fabric, stabilizer, needle, thread, tension, and hooping still affect the physical result. Every new design class should receive a sample stitch-out.
Run the backend locally
uv sync --python 3.12
export STITCH_STUDIO_PAIRING_TOKEN="replace-with-a-long-random-token"
export STITCH_STUDIO_PUBLIC_BASE_URL="http://127.0.0.1:8900"
export STITCH_STUDIO_DATA_DIRECTORY="$(pwd)/work/jobs"
uv run stitch-studio-api
Run the checks:
uv run ruff check .
uv run pytest -q
uv run stitch-studio generated
uv run stitch-machine-status 192.168.1.112
The status command is read-only. Do not run a physical upload as an unattended test.
Run the iPhone app
The Xcode project is generated from ios/project.yml with XcodeGen.
cd ios
xcodegen generate
open MolliesStitchStudio.xcodeproj
To install on a real iPhone, select an Apple development team in Xcode under Signing & Capabilities, connect the phone, and run the app. This Mac currently has no valid Apple code-signing identity, so the source builds in Simulator but cannot yet be installed on a physical phone or sent through TestFlight.
Pairing requires the public server URL and the private token stored in the VPS environment. The token is saved in the iPhone Keychain and is not included in this repository.
ChatGPT integration status
The OAuth-protected ChatGPT connector is live at:
https://stitch.204.168.230.132.sslip.io/mcp
It implements Streamable HTTP MCP, dynamic client registration, OAuth authorization code with S256 PKCE, scoped access tokens, rotating refresh tokens, protected-resource discovery, and a private consent page.
To connect Mollie's account:
- Sign in to Mollie's ChatGPT account.
- Enable Developer mode in ChatGPT settings.
- Choose Tools, Add, then MCP Server.
- Enter the
/mcpaddress above. - Enter the private connection password on the Stitch Studio consent page.
- Start a new conversation and select Mollie's Stitch Studio from Tools.
The connection password is not stored in source or this README. On Jake's Mac it is stored in Keychain under Mollies Stitch Studio ChatGPT.
The MCP tools can describe the SE700 limits, list queued designs, compile a constrained one-color radial flower with 3 to 12 petals, and request a phone-side transfer. Each tool-created PES is decoded and validated before it appears in the iPhone queue.
When Mollie asks ChatGPT to send a design, the agent should call request_machine_transfer with the queued job ID. The response changes the job to send_requested; the iPhone queue refreshes while the app is open and labels the request. Mollie still opens the design, reviews the decoded preview, confirms the transfer, and starts sewing at the machine. ChatGPT never scans the home LAN and never claims a physical transfer until the phone reports delivery.
This separation prevents a chat session or remote VPS process from silently writing to the embroidery machine.
Transfer safety
- The app verifies the PES signature and SHA-256 checksum before discovery.
- Discovery verifies Brother model
60, type3, andpedxmlversion1. - The known SE700 certificate fingerprint is pinned in the native client.
- The upload is never automatically retried after an uncertain write.
- The app compares the machine file list before and after upload.
- The VPS marks a job delivered only after a new machine file is observed.
- The operator still selects the design and starts embroidery at the machine.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。