{"slug": "i-gave-my-browser-cad-an-mcp-server-now-the-model-builds-parts-for-5-roubles", "title": "I gave my browser CAD an MCP server. Now the model builds parts for 5 roubles", "summary": "A developer of KontrCAD, a browser-based parametric CAD tool, added an MCP server that lets AI models build editable parametric parts rather than generating meshes. The desktop Electron build runs a local Streamable HTTP MCP server on loopback exposing 89 tools, while the web version uses WebMCP; the web build loads only 15 core tools plus 3 meta-tools and lets the model fetch help topics and batch operations with rollback on demand. The developer reports the assistant builds the same operation history a human would, so any parameter remains editable afterward.", "body_md": "I make KontrCAD — a parametric CAD that runs entirely in a browser. Not a viewer and not a mesh toy: sketches with a constraint solver, extrude, loft, sweep, fillets, assemblies. Everything is computed on the client, with no server round trips.\n\nFor a year the app had one obvious gap. Every simple part — a case for a board, a bracket, a lid for a box — I built by hand. The same twenty operations, in the same order, every time.\n\nSo I did what everyone does in 2026: I gave the model tools.\n\nKontrCAD stores a project as a list of operations. A tool never touches geometry: it writes a parameterised operation into the model, and an executor replays the list. That is why a 2,000-operation project weighs 160 KB and why you can step through someone else's build like a slideshow.\n\nThe important part: the document is already an API. `create_primitive` with a box and dimensions, `extrude` with a sketch region, `boolean_subtract`, `fillet_chamfer` with edge coordinates. Every button in the UI writes exactly the same operation.\n\nWhich is precisely the shape of a tool call.\n\nSo an assistant does not \"generate a mesh\". It builds the same parametric model a human would, step by step, and afterwards you can open the history and change any number in it. The output stays editable. That is the difference from \"AI generated an STL\" demos: you get a model, not a mesh.\n\n**Web version (WebMCP).** The editor registers its tools inside the tab, and a client attached to that tab drives it directly. Chrome 126+ or Edge, plus a client that speaks WebMCP — the DeepSeek Harness extension, for example. Nothing to install, and the assistant sees exactly what you see. The catch is that the client does not always discover the tools immediately and has to be nudged.\n\n**Desktop (Streamable HTTP).** The Electron build starts a local MCP server on `http://127.0.0.1:3100/mcp`. Streamable HTTP, the transport current clients expect. It lives only while the app runs, listens on loopback only, and has no auth — fine for localhost, a terrible idea to expose. If you work in a browser, use the first option; if you want a \"full\" assistant inside Cursor or Claude Desktop, use the second.\n\nThe server exposes 89 tools: eight groups plus three meta-tools.\n\nDumping 89 schemas into every request is a good way to burn money and confuse the model. So the web build starts with `core` only — 15 tools plus 3 meta — and the assistant opens the group it needs when it realises it needs it.\n\n**`get_help(topic)`.** Long instructions are not in the schemas. The model asks for the one it needs, when it needs it. Schemas stay short.\n\n**`batch`.** Several operations in one call, with `rollback: true`: if a step fails, the scene returns to the state before the batch instead of leaving debris that the model then has to clean up with more calls.\n\n**`expect`.** Many tools accept the expected bounding box and volume. The model learns immediately that the size is wrong — no separate \"let me check\" round trip.\n\n**Render for the model, not for humans.** Instead of four screenshots it can request one image with four views, the part framed. One image instead of four, and no need to stitch context.\n\nExternal clients are fine for people who already live in Cursor. Everyone else wants a button.\n\nSo there is an AI tab inside the editor. You paste a provider key and it stays on your device — no proxy through my servers, which also means I never see your chats. DeepSeek, OpenAI, Claude through OpenRouter, Gemini, Groq, Mistral, GigaChat, Ollama, or any OpenAI-compatible endpoint. The model list comes from the provider's API, so new models appear without an app update.\n\nRoles turned out to be the most useful part:\n\nDestructive calls from the last two arrive as a card with the tool name and arguments: allow or reject. If nobody answers within three minutes, the call is dropped.\n\nThe unexpected win was the Teacher role in classrooms: the assistant stopped being a \"do my homework\" button and became a TA that refuses to do the exercise.\n\nModels cannot read minds. \"Make it pretty\" produces garbage. You have to state dimensions and what mates with what.\n\nQuality varies a lot. DeepSeek and Claude produce sane operation sequences. Weak and local models are still worth a try — a box, a lid, a bracket, especially through Ollama, where nothing leaves your machine. But do not expect a steam locomotive. For assemblies I would reach for something bigger.\n\nAnd never let an assistant loose on a project you care about without a backup. The operation history is the undo button, and it has saved me more than once.\n\nA chess set, built entirely by the assistant: 7.6M tokens, 99% of them cached. About 5 roubles — roughly six cents — for the whole model, not per operation.\n\nCaching does the heavy lifting. The tool schemas and the conversation barely change between steps, so almost everything is a cache hit. Without it the same run would cost an order of magnitude more.\n\nThat number is the real argument for MCP in a CAD: a full parametric model costs less than a coffee.\n\nKontrCAD is free and runs without registration: [kontrcad.ru](https://www.kontrcad.ru). The MCP setup guide is [here](https://www.kontrcad.ru/pages/ii-assistent-v-kontrcad-instruktsiia-po-podkliucheniiu-mcp).\n\nIf you build something with it, I would genuinely like to see what breaks.", "url": "https://wpnews.pro/news/i-gave-my-browser-cad-an-mcp-server-now-the-model-builds-parts-for-5-roubles", "canonical_source": "https://dev.to/kontrcad/i-gave-my-browser-cad-an-mcp-server-now-the-model-builds-parts-for-5-roubles-4l3o", "published_at": "2026-12-02 07:12:46+00:00", "updated_at": "2026-12-02 07:13:12.582935+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools", "artificial-intelligence"], "entities": ["KontrCAD", "MCP", "WebMCP", "DeepSeek", "OpenAI", "Anthropic", "Cursor", "Electron"], "also_reported_by": [], "takeaway": "Exposing a CAD document's operations as MCP tools (89 tools, with only 15 core tools loaded by default plus get_help, batch with rollback, and expect-based bounding-box checks) lets a model build editable parametric models instead of one-shot meshes.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/i-gave-my-browser-cad-an-mcp-server-now-the-model-builds-parts-for-5-roubles", "markdown": "https://wpnews.pro/news/i-gave-my-browser-cad-an-mcp-server-now-the-model-builds-parts-for-5-roubles.md", "text": "https://wpnews.pro/news/i-gave-my-browser-cad-an-mcp-server-now-the-model-builds-parts-for-5-roubles.txt", "jsonld": "https://wpnews.pro/news/i-gave-my-browser-cad-an-mcp-server-now-the-model-builds-parts-for-5-roubles.jsonld"}}