Claude Code, Codex & MCP
Use Modex with Claude Code, Codex, Claude Desktop or another compatible MCP client. Your agent keeps its own AI account, settings and file tools, and reads and edits your project files as usual. Modex adds model checks, simulations, results, figures and documents.
What you need
- Modex installed. In VS Code, keep a window with the extension active.
- Your project folder. With VS Code, start the agent in the folder that window has open. Desktop lets your agent work in its own folder without changing the folder shown in the window. Claude Desktop chat uses the folder shown in Modex.
- A simulation engine, if you want the agent to run simulations — see Simulation engines.
Connect from VS Code
- Run Modex: Open Agent Settings and open Agent Tools.
- When Modex asks Connect Modex to your installed AI coding tools?, choose Connect. Installed clients then show Connected.
Tools Modex can connect this way: Claude Code CLI, Codex CLI, Gemini CLI, OpenCode CLI, Kiro CLI and Claude Desktop. GitHub Copilot is set up by hand.
By hand instead: run Modex: Copy MCP Config Snippet, choose your client and paste the configuration into that client's MCP settings.
Any other MCP client: under Agent Tools → Custom MCP Server Configuration, choose Copy MCP config and paste it into your client's MCP settings.
Connect from Modex Desktop
Open Settings → MCP. Each detected tool has its own switch; Copy MCP config gives the snippet for anything not listed.
For Claude Desktop from the Windows Store, open Claude once before turning on its switch in Modex. Restart the client when Modex asks, then check the connection status.
Start Desktop once after installing it. A connected agent can then start Desktop when it is closed, using the agent's project folder. Enable Keep running in background in Appearance to keep those connections alive when you close the window.
The built-in assistant is ready to use without these connections.
After upgrading
Restart connected clients and approve permissions again if asked. If a client no longer connects, reconnect it from Modex's settings or copy a fresh configuration from the version you are using.
Check that it works
Check your client's connection list for Modex, then ask the agent to check a model in your project.
More than one Modex open
With several VS Code windows open, ask the agent to choose the window for your project.
Disconnect
Disconnect all under MCP in Desktop (or Agent Tools in the released VS Code extension) turns off the connections Modex set up. In VS Code, Modex: Unregister MCP from AI Tools does the same — run it before you uninstall the extension.
Known limitations
- If Modex disappears from Claude Desktop's connections, connect it again from MCP in Desktop, or Agent Tools in the released VS Code extension.
- Claude Desktop supports interactive Modelica and plugin canvases from Desktop or a running VS Code extension. With several VS Code windows open, select the instance for your project. Plugin transcript views in VS Code currently require a window with one project folder and use VS Code’s file history; the canvas itself supports edit and undo. Claude Code’s current CLI receives Modelica text results and does not display plugin canvases.