Connecting a Coding Agent to Revit: The Good, the Bad and the Ugly
Connecting Claude Code, Codex or another coding agent to Revit through MCP? The benefits, security risks, Revit API pitfalls and governance challenges for AEC firms.
In brief
- Connecting a coding agent to Revit through MCP lets Revit users automate their work in plain English, without traditional add-in development. That is genuinely useful.
- For a firm, it brings security and governance risks. The agent’s sandbox doesn’t reach inside Revit, so code sent there can run with the user’s full rights, and what the agent learns doesn’t automatically become shared firm knowledge.
- And the Revit API is full of traps the agent doesn’t know about, so plausible-looking code can fail, make changes nobody intended or crash Revit, and add-ins nobody owns break when Revit updates.
- The raw connection is the cheap part. The value, and the safety, sit in the layer on top.
Wiring a coding agent such as Claude Code, Codex or Cursor into Revit via MCP is cool, and it’s worth doing,1 but it’s worth understanding what you’re actually buying into. This post walks through what works, what needs managing, and what’s easy to overlook.
First, how MCP connects an agent to Revit
MCP, the Model Context Protocol, is an open standard for connecting AI agents to other software.2 A Revit MCP server is a small program, usually paired with an add-in inside Revit, that offers the agent a set of tools. The agent never touches Revit directly: it asks the server to run a tool by name, with some arguments, and the server makes the Revit API calls.
What those tools are makes all the difference. Some servers offer a fixed menu: get these elements, rename those sheets, set this parameter. The agent can only do what the menu allows, and each tool can be written to follow Revit’s rules properly. That’s safer, but limited: a job the menu doesn’t cover needs a new tool. Other servers add a tool that accepts free-form code: the agent writes C#, and the server compiles it and runs it inside Revit. That’s what makes them so flexible, and it’s where most of the risks in this post come from.
How a request travels
A server with fixed tools
The agent picks from a menu
get_elements(category)rename_sheets(pattern)set_parameter(id, value)
- Can only do what the tools allow
- Each tool can handle transactions and worksharing properly
- Limited: a new kind of job needs a new tool
A server with a code tool
The agent writes whatever it likes
send_code_to_revit(csharp)
doc.Delete(ids);
File.Delete(path);
new HttpClient().PostAsync(url, data);
- Can do anything the Revit API allows
- …and anything you can: files, drives, network
- Only as safe and correct as the code the agent wrote
send_code_to_revit is a real tool in popular open-source servers.The Good
- Democratisation. Revit users with a Claude, ChatGPT or similar subscription can automate tedious work, build custom add-ins and query their model in plain English, without traditional add-in development. Less dependence on specialist development resources, and often no separate automation platform to buy.3
- Economics. For heavy regular users, the flat-rate subscription typically delivers far more inference per dollar than paying per token through the API. Independent tests in 2026 put it anywhere from several times to more than ten times the API-equivalent value, depending on the plan, the model and how fully you use it.4 Past the included allowance you pay roughly API rates, so the saving is the allowance itself.5 Limits change often, so check before you rely on them.
- Rapid prototyping. Validate an automation idea in minutes before investing in a proper add-in.
- Learning, if you engage. People can pick up the Revit API by watching the agent work, but only if they ask it why. In a 2026 randomised trial, developers who handed a new library over to an AI assistant learned it markedly worse than those who coded by hand; the ones who used it to ask conceptual questions kept up.6
- One-off tasks. Bulk renames, quick audits, things that never justified building a tool.
The Bad
Governance risk. An individual can wire this up on their own laptop with no IT sign-off. The MCP server runs with that person’s full rights to project files, shared drives and BIM 360 / ACC, with no guaranteed firm-wide record of what the agent changed in the model. Shadow IT, data exfiltration and model integrity, all at once.7 Some community Revit integrations also expose command endpoints that don’t check who is sending them. If such an endpoint listens on a network-accessible interface, another machine that can reach it may be able to submit operations without going through the agent at all. The actual exposure depends on the implementation, its configuration and the firewall.8 Security researchers have already shown agents being steered through MCP tools into running malicious code and leaking credentials.9
One person’s laptop
What the firm is exposed to
- No IT sign-off, and no one can see it: shadow IT
- That person’s full rights to project files, shared drives and BIM 360 / ACC
- Hidden instructions in a file or tool can steer the agent
- Data can leave for the internet
- No firm-wide record of what changed in the model
You’ve bypassed the agent’s guardrails. Leading coding agents, Claude Code and Codex among them, can sandbox the shell commands they run, and ask before risky actions. Neither sandbox extends to MCP servers: Claude Code’s documentation says local MCP servers run with your full access, and Codex scopes its sandbox to the commands it runs.10 A Revit MCP server hands each request to an add-in inside Revit’s process, and the most popular open-source ones include a tool that compiles C# written by the agent and runs it there.11 If an integration allows arbitrary code like this, that code runs with the permissions of the Revit process, outside the agent’s shell restrictions. The agent sends a request, Revit executes with full user rights, on your machine, on your network. Revit add-ins were never sandboxed: beyond a prompt when an unsigned add-in first loads, there is no permission model.12 What’s new is that an AI is now driving them.
Your laptop, signed in as you
↓ runs a shell command
Agent sandbox
Every command is checked against the rules
- Edit files in the project folder
- Write outside the project folder
- Connect to an unapproved host
- Anything new: asks you first
↓ calls a Revit MCP tool
Revit process: no sandbox
The add-in runs the request with your full rights
You approve the tool call, not the code it carries
- Open models
- Shared drives
- BIM 360 / ACC
- Network and internet
- Anything you can reach
Knowledge doesn’t automatically become a shared asset. Out of the box, what carries over between sessions is a few text files: instructions someone wrote by hand, and notes the agent keeps on one machine, which it treats as hints, not rules.13 There’s no shared, reviewed record of the firm’s standards, naming conventions, families or last month’s fixes. Each person rebuilds the same scripts, and valuable knowledge stays isolated in individual sessions. We wrote about why that matters in Where will your firm’s knowledge live in an AI-native future?
The Ugly
The agent doesn’t know what it doesn’t know about Revit. The Revit API has constraints that are easy to miss when generating code. Looking up a parameter by a name that isn’t there, working outside a transaction, touching a workshared element without ownership, loading worksets, calling anything off the main thread.14 The agent writes plausible-looking code that fails at runtime, makes changes nobody intended or, at worst, crashes Revit, often with no useful error. Research on AI coding assistants points the same way: their code is often wrong in ways that look right, and the people using them are more confident it’s correct.15
Danger
Four Revit API mistakes hidden in one plausible-looking snippet
Depending on which problem it hits first, this snippet may throw an exception, or fail silently inside its background task, before making any change at all. More complex agent-written code can also make changes nobody intended or destabilise Revit, taking unsaved work with it. Before running any agent-written code, save, and work on a copy of the model, never the live one.
// "Set every door to a 60-minute fire rating"
var doors = new FilteredElementCollector(doc)
.OfCategory(BuiltInCategory.OST_Doors)
.WhereElementIsNotElementType();
Task.Run(() => 1
{
foreach (Element door in doors)
{
var p = door.LookupParameter("Fire Rating"); 2
p.Set("60 min"); 34
}
});
- 1Off Revit’s main threadThe Revit API only works on Revit’s own thread. Called from a background task, it throws an error instead of making the change.
- 2A parameter that isn’t thereIn standard door families, Fire Rating is a type parameter, so unless someone has added an instance parameter with the same name, looking it up on the door returns nothing and the next line fails.
- 3No transactionEvery change to the model must happen inside a transaction. Without one, Revit refuses the change.
- 4Someone else’s elementIn a workshared model, a door a colleague has borrowed can’t be changed until they release it.
The orphaned add-in problem. Unmanaged agent-generated add-ins can become one-off scripts with no owner, no versioning, no deployment pipeline and no permission model. When Revit updates, they stop loading or start throwing errors, and if the author has left, no one knows how to fix them.16 Distribution, maintenance and access control then remain significant responsibilities for any firm adopting unmanaged tools.
What to look for in a Revit AI platform
Whether a firm builds or buys, six things separate a managed setup from unrestricted code execution:
- Guardrails. Checks on every request: what the agent may change, in which models, and when it must stop and ask a person.
- An agent that knows Revit. An agent, and ideally an AI model, built around the Revit API’s rules on transactions, threading and worksharing, and around the firm’s own standards.
- Constrained operations. Defined, tested tools for routine work, so generated code is the exception rather than the default, and never runs unchecked with someone’s full rights.
- Isolated execution. When arbitrary code is necessary, it runs behind enforceable boundaries, with explicit limits on filesystem, network and model access. That takes deliberate architecture: code running inside Revit inherits Revit’s permissions, and wrapping the tool call in checks doesn’t sandbox the code itself.
- Visibility of model changes. A firm-wide record of what changed, in which model, and at whose request.
- Maintainable automation. An owner, version control, testing on each Revit release, and a way to deploy each automation to the people who need it.
Unrestricted code execution
Your requestManaged setup
Your request- 1GuardrailsWhat may change, in which models, and when to ask a person first
- 2An agent that knows RevitThe API’s rules on transactions, threading and worksharing, and your firm’s standards
- 3Constrained toolsTested tools for routine work; generated code only when needed, and checked
- 4Isolated executionAny code that must run sits behind enforced limits on files, network and model access
Logged throughout: what changed, in which model, at whose request
Riding off into the sunset
This isn’t an argument against connecting an agent to Revit; it’s a great thing to try. It’s an argument that the raw model connection is the cheap part. The value, and the safety, sit in the layer on top: accumulated Revit knowledge, firm standards, governance, versioning and an agent that knows the API’s traps. That’s the layer BIMLOGIQ is building with Argus. Argus already shows the commands it generates before they run, and asks for approval before it runs generated code or reads or writes files on your computer. Users can approve each call or allow it for the rest of a chat.17
The layer on top
Where the value and the safety sit.
- Revit API know-how
- Firm standards
- Shared memory
- Governance and audit
- Versioning
The raw connection
Quick to set up, and the cheap part.
- Model subscription
- Coding agent
- MCP server
- Revit
Talk to us about bringing AI agents into Revit safely with Argus →
Footnotes
-
Open-source Revit MCP servers include mcp-servers-for-revit and its predecessor revit-mcp each with several hundred stars on GitHub, and newer projects such as RevitMCP and revit-mcp-server name Claude Code, Codex and Cursor as supported clients. ↩
-
Anthropic, “Introducing the Model Context Protocol,” November 2024. The specification is published at modelcontextprotocol.io. ↩
-
Claude Code is included in the Claude Pro and Max plans (Claude Help Center), and Codex in ChatGPT Plus (OpenAI). The Revit API comes with Revit, but Revit LT doesn’t run add-ins (Autodesk, “About Add-Ins”). ↩
-
InventiveHQ, “How Much Codex Does a ChatGPT Plan Buy? I Measured It,” October 2026: pricing Codex session logs at API list rates gave about 14 times the subscription price, as of early October 2026. SemiAnalysis, “Anthropic Subscriptions Offer 5x+ More Value Than OpenAI,” October 2026, compares the API-equivalent value of Claude and ChatGPT plans. Both assume heavy use; a light user gets far less. OpenAI itself advises against using API prices to estimate what a plan includes (Codex pricing), and plan limits have changed more than once since these measurements. ↩
-
Anthropic bills extra usage on paid plans “at standard API rates” (Claude Help Center), with discounts of up to 30% on prepaid bundles (Buy usage bundles). OpenAI sells Codex credits priced per million tokens, with prices and discounts that depend on the plan (Codex pricing). ↩
-
Shen and Tamkin, “How AI Impacts Skill Formation,” 2026 preprint, arXiv:2601.20245 (summary). In a randomised trial with 52 developers learning a new Python library, those with AI assistance scored 50% on a follow-up quiz against 67% for those who coded by hand, with no significant gain in speed. ↩
-
Microsoft and LinkedIn, 2024 Work Trend Index: in a survey of 31,000 people in 31 countries, 75% of knowledge workers used AI at work, and 78% of those were bringing their own AI tools. ↩
-
Based on our reading of the source code of open-source Revit MCP add-ins at the time of writing, not on testing. Implementations differ: some bind only to the local machine, while others listen on all network interfaces without authentication. We have not named specific projects while their maintainers have the chance to respond. ↩
-
Radosevich and Halloran, “MCP Safety Audit: LLMs with the Model Context Protocol Allow Major Security Exploits,” 2025 preprint, arXiv:2504.03767. Wang et al., “MCPTox: A Benchmark for Tool Poisoning on Real-World MCP Servers,” AAAI 2026, arXiv:2508.14925: across 45 real MCP servers and 20 agents, instructions hidden in tool descriptions succeeded up to 72.8% of the time, and no agent refused more than 3% of them. On the wider problem, see Debenedetti et al., “AgentDojo,” NeurIPS 2024, arXiv:2406.13352, and Simon Willison’s “lethal trifecta”: an agent with access to private data, exposure to untrusted content and a way to send data out can be made to leak it. ↩
-
Claude Code, “Sandboxing”: the sandbox covers shell commands only, and other processes Claude Code starts, including local MCP servers, “run with your full access.” OpenAI Codex, “Sandboxing”: “The sandbox applies to spawned commands”; MCP tool calls fall under approval settings rather than the command sandbox (Agent approvals and security). Claude Code’s sandbox runs on macOS, Linux and WSL2; on native Windows, where Revit runs, it doesn’t sandbox commands at all. ↩
-
Both mcp-servers-for-revit and the now-archived revit-mcp expose a
send_code_to_revittool. The add-in compiles the agent’s C# with Roslyn, with references to the assemblies loaded in Revit, and runs it inside Revit’s process. ↩ -
Autodesk, “Digitally Signing Your Revit Add-in”: the only check is at load time, when Revit asks whether to load an unsigned add-in. Once loaded, an add-in is .NET code running in Revit’s own process, with the user’s rights. ↩
-
Claude Code, “How Claude remembers your project”: each session begins with a fresh context window. Knowledge carries over through CLAUDE.md files and auto memory, which is machine-local and not shared across machines, and memory is “context, not enforced configuration.” Codex uses AGENTS.md files in the same way. ↩
-
Autodesk Revit API: the model “can only be modified inside an open transaction” (Document.IsModifiable); a parameter looked up by name “may be null if there is no matching parameter”, and if several match, which one is returned “is determined at random” (Element.LookupParameter); in a workshared model, a user takes ownership of elements by checking them out (WorksharingUtils.CheckoutElements). On threading, Jeremy Tammik, “The Revit API is Never Ever Thread Safe,” The Building Coder (Autodesk Developer Blog), November 2014. ↩
-
Perry, Srivastava, Kumar and Boneh, “Do Users Write More Insecure Code with AI Assistants?,” ACM CCS 2023, arXiv:2211.03622: participants with an AI assistant wrote less secure code and were more likely to believe it was secure. Pearce et al., “Asleep at the Keyboard? Assessing the Security of GitHub Copilot’s Code Contributions,” IEEE S&P 2022, arXiv:2108.09293: about 40% of the programs generated in security-relevant scenarios were vulnerable. ↩
-
Revit 2025 moved the API to .NET 8, and every add-in had to be recompiled (Autodesk; The Building Coder). Revit 2024 made element ids 64-bit and deprecated
ElementId.IntegerValue(The Building Coder). ↩ -
BIMLOGIQ, “What is Argus?”, and “Argus asks before reading or writing files on your computer,” July 2026. ↩