MoI discussion forum
MoI discussion forum

Full Version: mcp-bridge-for-moi: let an AI agent model in MoI while you watch

Show messages:  1-14  15-34  35-37

From: Gabriel
17 Sep   [#15] In reply to [#14]
Pilou,
to my knowledge Windows Voice Access can't print in just any software because it relies entirely on the app's built-in design.
For Voice Access to trigger a print job, the software you are using must do at least one of three things:
- Support standard keyboard shortcuts (like Ctrl + P)
- Have a visible, accessible "Print" button that the AI can read and click
- Be built with standard Windows code structures that allow assistive technologies to "see" and control the menus.

Exactly for that reason, and as you mentioned, to avoid using a paid tier, I started building one on my own with Python and free AI speech-to-text libraries. Unfortunately, it's a closed repository at the moment (it's for my day job, so I can't publish it yet, but hopefully I will be able to in the near future).
If you're interested in AI-driven software development, I can tell you that, as far as I know, there are two major open-source players: "Whisper", published by OpenAI, and "Moonshine". These are the two I've been building my Python project on, and both work pretty well. Note: I was experimenting with 'Faster Whisper', as the name suggests. – it is faster. Here are both repos:

https://github.com/SYSTRAN/faster-whisper

https://github.com/moonshine-ai/moonshine

Cheers!
Gabriel
From: Gabriel
17 Sep   [#16] In reply to [#4]
Ado1,

I was curious to give you a rough idea of the cost per token. Generally, input tokens are the data that you provide to the AI agent (e.g. text or drawings). The output is what the agent gives you back (text answers in the 'chat' — or the 'session', as it is called — and all the output needed to build the 3D model in MoI in this case).

To try out a more complex task, I provided Claude with your sample drawing (it took some thought, but I don't think "high" makes much difference at the current stage of MCP development). I also asked it to research additional sources online for precise dimensional drawings.
It started with my work-in-progress 'Sketch to 3D' skill, found some additional information on the web, and after about 13 minutes it gave me the attached scene.
I completely agree that this is far from the original drawing, with some obvious errors. I created the MCP server mostly for conceptual design, to produce rough 3D shapes as prototypes for different 3D printing projects.
But in terms of tokens: It used around 50,000 tokens on this model, which, on my paid 'Claude Pro' subscription, is around 8% of my usage limit within a five-hour window. This is basically how these plans work: you work, then you wait until the time window unblocks, then you work again.
This means it didn't use up many tokens, which makes me think that many MCP calls to MoI generally don't use up many tokens either.

It is also always interesting to observe the thinking process of an agent. For example, I asked iClaude to summarise all the uncertainties in an MD (Markdown) file, which it saved at the end of the session. I have also attached it here for reference.

Use cases are obviously always a consideration; I'll work on improving my 'sketch-to-3D' skill in the meantime and see what I can come up with.

Cheers,
Gabriel


Attachments:
harrison_headstock_open_questions.md
harrison_L5A_headstock.7z

Image Attachments:
harrison_L5A_headstock.png 


From: Frenchy Pilou (PILOU)
17 Sep   [#17] In reply to [#15]
@ Gabriel for complete that you said

How to set up voice control (workaround):
Since MoI3D relies heavily on keyboard shortcuts (hotkeys) and scripts to launch commands, you can use voice-recognition-based dictation or macro tools on Windows.

Compatible software: Applications such as VoiceMacro, Talon Voice, Dragon, or the native Windows Voice Access tool.

How it works: You map a spoken word to a specific MoI3D keyboard shortcut.

Example: Saying "Line" simulates pressing the "L" key (or whichever shortcut you have configured for the Line tool);

saying "Circle" simulates the "C" key.

Limitations of this method: While voice control is convenient for quickly triggering tools or scripts, it quickly proves inadequate for precision 3D modeling.

Point placement: MoI3D requires precise clicking in 3D space or the entry of exact numerical coordinates. Voice input lacks the precision needed to target vertices or draw smooth curves on the screen.

Therefore, it works well as a supplementary method (for accessing menus or functions) but is difficult to use as a sole means of drawing.
From: BurrMan
17 Sep   [#18]

Why does “Claude” need MoI?

It has access to every paper and book and bit of information Michael ever read or studied.

Why dont you just go model in Claude? You can stop, check your work, and resume and save whenever you want!

“DIY install?” Why doesnt Claude take care of that for you?

Claude could make this post for you! Why are you wasting time? Its not the future for you to waste time.

Even “Frenchy” is presenting “commands” in here now…

Let the SPAM begin…….


From: Larry Fahnoe (FAHNOE)
18 Sep   [#19] In reply to [#18]
Hi Burr,

> Why does “Claude” need MoI?

I was fooling with Grok some months back, asking it to produce some dimensioned, scaled architectural models. It quickly turned into a mess, so I began asking "it" about its underlying tools and abilities. What I learned was that none of the then current AIs had integral geometry kernels though there were some efforts underway to communicate with some CAD packages (typically work being done by the CAD vendors).

At that point I shrugged and went back to using MoI as I normally do because for me, drawings without scale and precision are not useful.

I haven't visited Gabriel's github yet, but am a bit curious about how it controls MoI.

--Larry
From: Gabriel
18 Sep   [#20] In reply to [#19]
Hey Larry,
what you're saying is absolutely right, and it's exactly why the MCP approach works differently.

Most commercially available AI models still have no geometry kernel, and mcp-bridge-for-moi doesn't pretend otherwise. It doesn't generate geometry at all. All the geometry is made by MoI's own kernel, in your open document, through MoI's scripting API. The AI's only job is to decide which MoI command to run and with what numbers — the same decisions you make when you type a value into a command's input field.

How it works in practice

Two pieces: a small script that sits in MoI's startup folder and connects out over a local WebSocket, and an MCP server that your AI client (Claude Code, Claude Desktop, anything that speaks MCP) launches. The server talks to the agent on one side and to MoI on the other. It listens on 127.0.0.1 only, with a token regenerated each start.

The agent gets a handful of tools. The important one runs JavaScript inside MoI, which is how it calls MoI's geometry factories — the same 110 commands the UI drives (box, loft, revolve, fillet, boolean, …). 103 of them can be driven from a script; the other 7 need an interactive viewport pick or produce nothing headless, and are documented as such. Every one of the 103 is committed with real inputs and its output checked by an automated test run.

The rest of the tools are: list the scene (id, type, whether an object is a closed solid, bounding size, document units), read your selection, set the selection or the view, render a viewport image so it can look at what it just made, and export to STEP/OBJ/STL etc.

On scale and precision specifically

- Every factory input is a number in document units. A box 3600 × 240 × 2700 mm is that, exactly, because MoI built it.
- If the open document has no unit system, modelling and export are refused with a no_units error until you pick one.
- Exports go through MoI's own translators, so a STEP out of it is a MoI STEP.

So the failure mode you hit with Grok — plausible-looking nonsense with no kernel underneath — isn't really available here. What can go wrong is different and more mundane: the agent picks the wrong command, mis-orders an operation, or misjudges a dimension it inferred rather than was given. You see it happen live in your viewport.

Cheers,
Gabriel
From: Gabriel
18 Sep   [#21] In reply to [#17]
@ Frenchy Pilou
Sorry, Pilou. I misunderstood you in the first place — I thought you were talking about controlling an AI via voice commands.
I guess your solution breakdown (especially using macro tools) would work.

Cheers,
Gabriel
From: Gabriel
18 Sep   [#22] In reply to [#3]
@Matadam

Matadam, I'm revising what I said before: although the MCP server can't build any scripts on its own, it can be used for creating and evaluating scripts.
Therefore, an AI agent building JavaScript would evaluate its functions through the MCP server.
I did a quick test yesterday and it worked.

Hope it helps!
Cheers, Gabriel
From: Frenchy Pilou (PILOU)
18 Sep   [#23] In reply to [#21]
@Gabriel

No Problem ! :)

Voice is very practical for people who can't type on a keyboard!
From: Larry Fahnoe (FAHNOE)
19 Sep   [#24] In reply to [#20]
Thanks for the additional explanations Gabriel. At this point I've not done any experimenting with agentic-AI, but who knows, maybe your project will nudge me to do so. In the meantime cheers for the unique idea and experiment which you have made available for others to learn with and from.

--Larry
From: Gabriel
19 Sep   [#25] In reply to [#24]
@Larry

Thank you so much for your kind words, Larry.
A small quick tip for you and anyone else who wants to try AI-assisted MoI production: I have successfully tried the MCP with Google's 'Antigravity'.
'Antigravity' is free for anyone with a Gmail account to try. Its capabilities are limited. Nevertheless, it gives you something to experiment with.

Cheers,
Gabriel
From: binfordboy
20 Sep   [#26]
@Gabriel,
I checked your mcp Server on both actual macOS and moi V5. Works Like charming hell. Thank you very much. The only thing missing in v5 are the 5 new factories .
From: Gabriel
20 Sep   [#27] In reply to [#26]
Hey binfordboy,

Thank you for trying it out :)
Many thanks for testing it on MacOS! I'll update the README accordingly

I'll check out V5 when I have a spare moment. I'll have to implement a fallback mechanism for V4, though.

Cheers,
Gabriel
From: Death
20 Sep   [#28] In reply to [#27]
Excellent! Great Job, this is going to get better and better!
From: ado1
21 Sep   [#29] In reply to [#28]
So as a complete newbie here:

I download/copy

Bridge.js
node-v22.22.2-x64.msi

Put the Bridge file into AppData/MOI

install the msi file

open MOI 4.0

Is that really it?
From: Gabriel
22 Sep   [#30] In reply to [#29]
@ ado1

Hey ado1,
if the MCP server is connected properly to your AI agent (Claude etc.), you can do a quick check by opening a fresh scene in MoI and writing in your AI session:
call get_scene

IF the agent responds with something like "Scene is emtpy", then you're all set. Otherwise something is missing. You can also check the MCP installation by typing /mcp in your session - it must show you the list of installed MCP servers, among them the moi server.

I'll try to find a minute to make a short video on how to install the server.

Cheers,
Gabriel
From: ado1
22 Sep   [#31] In reply to [#30]
OK thx.

I've only got Win7 Pro on my main setup so the node won't install but I've got a Tablet I can give it a shot on.
That's the first time I've ever had cause to regret not being more up-to--date

Which reminds me if Mr Gibson is around.

What's the situation with my Moi 4 License Mr Gibson, Can I use it on a second computer for testing this AI out?
From: Frenchy Pilou (PILOU)
22 Sep   [#32] In reply to [#31]
You can have 2 or more computers with Moi installed on them BUT...
...you must use only ONE computer in the same time for Moi! ;)
From: ado1
22 Sep   [#33] In reply to [#32]
Awesome.
Thanks for that.
From: binfordboy
22 Sep   [#34]
Ado1 direct your ai to the gitrepository and Tell her to install and Check everything on your Computer is the easy way

Show messages:  1-14  15-34  35-37