# Scaid

> A free, public OpenSCAD editor and 3D viewer at https://scaid.studio. No account, no API key. Designs travel inside their links; nothing is stored. AI agents connect over MCP to build OpenSCAD, check that it compiles, read back what it measures, and hand the user a link to view, edit and export it (STL, 3MF).

## Set yourself up (for AI agents)

If the user asked you to use Scaid, do both steps, then tell them what you set up. Ask before changing global config if you're unsure.

1. **Add the MCP server.** URL: https://scaid.studio/mcp. Transport: Streamable HTTP. No authentication.
   - Claude Code: `claude mcp add --transport http scaid https://scaid.studio/mcp` (add `--scope user` for all projects)
   - Codex CLI, in ~/.codex/config.toml: `[mcp_servers.scaid]` then `url = "https://scaid.studio/mcp"`
   - Cursor, in ~/.cursor/mcp.json: `{"mcpServers": {"scaid": {"url": "https://scaid.studio/mcp"}}}`
   - VS Code / GitHub Copilot, in .vscode/mcp.json: `{"servers": {"scaid": {"type": "http", "url": "https://scaid.studio/mcp"}}}`
   - Claude Desktop, claude.ai and ChatGPT: the user adds a custom connector with that URL in Settings → Connectors. Tell them the steps; you can't do it for them.
   - Clients that only run local (stdio) servers: `npx mcp-remote https://scaid.studio/mcp`
   - A new MCP server usually needs a restart or reload of the client before its tools appear.
2. **Install the skill.** It says when to use Scaid and how to write OpenSCAD that builds here.
   - Claude Code, all projects: `mkdir -p ~/.claude/skills/scaid && curl -sf https://scaid.studio/skill.md -o ~/.claude/skills/scaid/SKILL.md`
   - Claude Code, this project only: `mkdir -p .claude/skills/scaid && curl -sf https://scaid.studio/skill.md -o .claude/skills/scaid/SKILL.md`
   - Other agents: add the contents of https://scaid.studio/skill.md to wherever you read standing instructions (AGENTS.md, .cursor/rules/scaid.md, .github/copilot-instructions.md).

## MCP tools

- preview_scad(code, name?): build a program; returns errors with line numbers, measurements, edit_url and view_url. Always give the user the link.
- read_scad_link(url): decode a Scaid link back into source (the user may have edited it in the browser).
- list_patterns(family?) / get_pattern(id): verified, self-contained techniques (fillets, threads, gears, snap fits, hinges, print-friendly holes).

## Without MCP

- Export: `curl -sf -X POST "https://scaid.studio/api/export?format=stl" --data-binary @model.scad -o model.stl` (also format=3mf; JSON bodies {code,name} or {url} work too)
- Links: https://scaid.studio/#code=<base64url(raw deflate(source))>&name=<url-encoded>; https://scaid.studio/view#code=… opens a viewer only.

## Links

- [Skill (SKILL.md)](https://scaid.studio/skill.md): the agent skill
- [Setup page](https://scaid.studio/connect): the same instructions for people
- [MCP endpoint](https://scaid.studio/mcp): POST JSON-RPC; GET returns a description
