Back to blogs

Revit MCP: Read data from Active document

Jun 2026

A desktop AI assistant for Autodesk Revit automation using natural language prompts. Built with WPF (.NET 8), Google Gemini, and a custom .NET MCP Server that bridges AI tool calls to the Revit DB API through Named Pipes for real-time model interaction.

WPF (.NET 8)Model Context ProtocolRevit DB APINamed Pipes
View project
Revit MCP: Read data from Active document

Overview

Revit MCP is a desktop assistant that lets you talk to an open Revit model in plain language. Instead of clicking through menus or writing one-off scripts, you describe what you want — and the app decides which tools to call against the active document.

The stack is split across two runtimes on purpose:

  • WPF (.NET 8) hosts the UI and Gemini integration
  • Revit add-in (.NET Framework 4.8) talks to the Revit DB API inside the Revit process

They communicate over Named Pipes, which keeps the bridge fast enough for interactive use.

Why MCP here

The Model Context Protocol gives the LLM a structured way to discover and invoke tools. In this project, each tool maps to a concrete Revit operation — reading element data, querying the active document, opening files, and returning structured results the model can reason about.

That separation matters: Gemini handles intent and planning; the MCP server enforces what is actually allowed to touch the model.

Reading from the active document

The first capability I focused on was read-only access to the active document. Typical flows look like:

  1. User asks a question in natural language
  2. Gemini selects an MCP tool (for example, list walls on Level 2)
  3. The WPF host sends the request through Named Pipes
  4. The Revit add-in executes against the DB API and returns JSON
  5. Gemini formats the answer for the user

Named Pipes were the pragmatic choice — low latency, no HTTP overhead, and a clear process boundary between the desktop shell and Revit.

What is next

This write-up covers the read path. Upcoming work includes richer geometry extraction, safer write operations, and tighter tool schemas so the model makes fewer ambiguous calls.

If you want to dig into the code or run it locally, the repo link in the header points to the full project.