Cxddie

Autodesk Revit

BIM modelling in Revit, through mcp-servers-for-revit.

Kind: App MCP · Document: model.rvt · Platform: Windows · Override: CXDDIE_REVIT

Cxddie drives Revit through the open-source mcp-servers-for-revit add-in (Revit 2020–2026) and serves the usual CAD session on the workspace's port, so agents get the same tools as everywhere else.

One-time setup

  1. Install the mcp-servers-for-revit add-in for your Revit version, from its releases.
  2. Open any project in Revit. The add-in runs code against the active document, so Revit needs one open.
  3. On the Add-Ins tab, click Revit MCP Switch.
  4. Install Node.js. Cxddie runs the server with npx mcp-server-for-revit.

If Revit isn't running, Start launches it and waits for the add-in.

One document per workspace

Every workspace gets its own Revit project: the open document whose file is the worktree's model.rvt. When the file doesn't exist yet, Cxddie creates a metric project there. Cxddie makes it active before every call. Workspaces using Revit take turns, so several agents can share one Revit. save saves the project in place (Save As to another path writes a copy), and an existing .rvt in the repo is opened when the workspace starts.

What agents get

run_code runs C# in the workspace's document. The code is the body of object Execute(Document document, object[] parameters), with System, System.Linq, System.Collections.Generic, Autodesk.Revit.DB and Autodesk.Revit.UI imported and doc set to the document. It runs in one transaction, so it is one undo step.

Output isn't captured. The code returns what it wants to show, and the value comes back as JSON. The add-in's other tools are offered too, as revit_<tool>, for example revit_create_level, revit_get_current_view_elements and revit_tag_all_walls.

export writes IFC, the BIM exchange format, and STL, GLB or OBJ meshes. Revit has no STEP export.

Conventions agents are told

  • Model with BIM elements (walls, floors, roofs, doors, families on levels) rather than raw solids.
  • Revit works in feet internally: convert with UnitUtils.ConvertToInternalUnits(value, UnitTypeId.Millimeters).
var level = new FilteredElementCollector(doc).OfClass(typeof(Level)).Cast<Level>().First();
double mm(double v) => UnitUtils.ConvertToInternalUnits(v, UnitTypeId.Millimeters);
var wall = Wall.Create(doc, Line.CreateBound(new XYZ(0, 0, 0), new XYZ(mm(6000), 0, 0)), level.Id, false);
return wall.Id.ToString();

Revit support is new and has been tested against a stand-in server, not yet against a live Revit. If something doesn't work, please let us know.

On this page