Skip to main content
Glama
mcp-servers-for-revit

MCP server for Revit - Python

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_revit_statusA

Check if the Revit MCP API is active and responding

get_revit_model_infoB

Get comprehensive information about the current Revit model

get_revit_viewB

Export a specific Revit view as an image

list_revit_viewsA

Get a list of all exportable views in the current Revit model

get_current_view_infoA

Get detailed information about the currently active view in Revit.

Returns comprehensive information including:

  • View name, type, and ID

  • Scale and detail level

  • Crop box status

  • View family type

  • View discipline

  • Template status

get_current_view_elementsB

Get elements visible in the currently active view in Revit.

Returns per element: element_id, name, category, category_id. Also returns category_counts (always for ALL elements, even if truncated).

If the response contains truncated=true, not all elements were returned. Check total_elements vs returned_elements and increase limit if needed.

Args: limit: Maximum number of elements to return (default 5000). include_levels: Include level name and level_id per element. Default false. include_location: Include location geometry (point or curve). Default false.

place_familyC

Place a family instance at a specified location in the Revit model

list_familiesA

Get a flat list of available family types in the current Revit model. Use contains to filter by a substring of the family or type name (case-insensitive).

list_family_categoriesA

Get a list of all family categories in the current Revit model

list_levelsA

Get a list of all levels in the current Revit model

color_splashA

Color elements in a category based on parameter values

This tool applies color coding to Revit elements within a specified category based on their parameter values. Elements with the same parameter value will receive the same color.

Args: category_name: Name of the category to color (e.g., "Walls", "Doors", "Windows") parameter_name: Name of the parameter to use for coloring (e.g., "Mark", "Type Name") use_gradient: Whether to use gradient coloring instead of distinct colors (default: False) custom_colors: Optional list of custom colors in hex format (e.g., ["#FF0000", "#00FF00"]) ctx: MCP context for logging

Returns: Results of the coloring operation including statistics and color assignments

clear_colorsA

Clear color overrides for elements in a category

This tool removes all color overrides that have been applied to elements in the specified category, returning them to their default appearance.

Args: category_name: Name of the category to clear colors from (e.g., "Walls", "Doors") ctx: MCP context for logging

Returns: Results of the clear operation including count of elements processed

list_category_parametersB

Get available parameters for elements in a category

This tool helps you discover what parameters are available for coloring by listing all parameters found on elements in the specified category.

Args: category_name: Name of the category to check parameters for (e.g., "Walls", "Doors") ctx: MCP context for logging

Returns: List of available parameters with their types and sample values

execute_revit_codeA

Execute IronPython code directly in Revit context.

The code has access to:

  • doc: The active Revit document

  • uidoc: The active UIDocument (use for UI operations like switching the active view)

  • DB: Revit API Database namespace

  • revit: pyRevit module

  • print: Function to output text (returned in response)

No transaction is opened automatically. Wrap model-modifying code yourself: t = DB.Transaction(doc, "My change") t.Start() # ... modify model ... t.Commit()

For UI operations that cannot run inside a transaction (e.g. switching the active view): all_views = DB.FilteredElementCollector(doc).OfClass(DB.View).ToElements() target = next((v for v in all_views if v.Name == "Level 1"), None) if target: uidoc.ActiveView = target

Tips:

  • Use getattr(element, 'Name', 'N/A') to safely access the Name property

  • Check elements exist before use: if element:

  • Use hasattr() for optional properties

list_revit_installationsA

Discover all Revit versions installed on this system.

Returns a list of installed Revit versions with their executable paths. Use this to check what's available before calling launch_revit.

launch_revitA

Launch Revit on this machine, optionally opening a file.

Finds installed Revit versions automatically. After launching, polls the pyRevit Routes health endpoint until Revit is ready for MCP tools.

For workshared (central model) files, Revit will show its native worksharing dialog on open. Use the open_document tool after launch for more control over worksharing options like detach from central.

Args: file_path: Path to a .rvt, .rfa, or .rte file to open. Optional. version: Revit version year (e.g. "2025"). Uses latest if omitted. language: Language code (e.g. "ENU", "FRA"). Optional. timeout: Seconds to wait for Revit readiness (default 120).

open_documentA

Open a Revit document file in the running Revit instance.

Supports workshared (central) files with options to detach from central or audit the file on open.

Args: file_path: Absolute path to a .rvt, .rfa, or .rte file. detach: If True, open detached from central (workshared files only). Preserves worksets but severs the link to the central model. audit: If True, audit the file on open to check for corruption.

close_documentA

Close the active Revit document.

Args: save: If True, save the document before closing. If False (default), close without saving.

save_documentA

Save the active Revit document.

If file_path is omitted, saves the document in place. If file_path is provided, performs a Save As to the new location.

Args: file_path: Optional path for Save As. If omitted, saves in place.

sync_with_centralA

Synchronize the active workshared document with central.

Only works with workshared (central model) documents. For non-workshared documents, use save_document instead.

Args: comment: Sync comment visible in the worksharing log. compact: If True, compact the central model during sync. relinquish_all: If True (default), relinquish all borrowed elements and worksets after sync.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcp-servers-for-revit/mcp-server-for-revit-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server