mcp-servers-for-revit/mcp-server-for-revit-python
6ca46b3ea96amcp-server-for-revit0.1.0 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 11 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
Top risks in plain words
- CRITICAL1 production dependency has known vulnerabilities (worst: critical).
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Give it a narrowly scoped token
Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.
- Update its vulnerable packages
Use
certifi2026.10.18 or later. - Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 21 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
get_revit_view, launch_revit, paired_toolget_revit_view, launch_revit, list_revit_installations, paired_toolNo tool was seen to: start other programs on the machine; connect to the internet or other hosts; read passwords, tokens or keys; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files3 tools · get_revit_view, launch_revit, paired_tool
Not all three are present in the tools the scanner traced.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (21: 21 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
clear_colorstool Clear color overrides for elements in a category
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 processedclose_documenttool Close the active Revit document.
Close the active Revit document.
Args:
save: If True, save the document before closing.
If False (default), close without saving.color_splashtool Color elements in a category based on parameter values
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 assignmentsexecute_revit_codetool Execute IronPython code directly in Revit context.
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 propertiesget_current_view_elementstool Get elements visible in the currently active view in Revit.
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.get_current_view_infotool Get detailed information about the currently active view in Revit.
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 statusget_revit_model_infotool Get comprehensive information about the current Revit model
Get comprehensive information about the current Revit model
get_revit_statustool Check if the Revit MCP API is active and responding
Check if the Revit MCP API is active and responding
get_revit_viewtool Export a specific Revit view as an imageFilesEnv varsoutside text
Export a specific Revit view as an image
launch_revittool Launch Revit on this machine, optionally opening a file.FilesEnv varsoutside text
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).list_category_parameterstool Get available parameters for elements in a category
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 valueslist_familiestool Get a flat list of available family types in the current Revit model.
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_categoriestool Get a list of all family categories in the current Revit model
Get a list of all family categories in the current Revit model
list_levelstool Get a list of all levels in the current Revit model
Get a list of all levels in the current Revit model
list_revit_installationstool Discover all Revit versions installed on this system.Env vars
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.list_revit_viewstool Get a list of all exportable views in the current Revit model
Get a list of all exportable views in the current Revit model
open_documenttool Open a Revit document file in the running Revit instance.
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.paired_tooltool FilesEnv varsoutside text
No description.
place_familytool Place a family instance at a specified location in the Revit model
Place a family instance at a specified location in the Revit model
save_documenttool Save the active Revit document.
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_centraltool Synchronize the active workshared document with central.
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.Text the model reads (21)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
execute_revit_code tool
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 propertiescolor_splash tool
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 assignmentsclear_colors tool
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 processedlist_category_parameters tool
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 valuesopen_document tool
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_document tool
Close the active Revit document.
Args:
save: If True, save the document before closing.
If False (default), close without saving.save_document tool
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_central tool
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.place_family tool
Place a family instance at a specified location in the Revit model
list_families tool
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_categories tool
Get a list of all family categories in the current Revit model
list_revit_installations tool
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_revit tool
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).list_levels tool
Get a list of all levels in the current Revit model
paired_tool tool
get_revit_status tool
Check if the Revit MCP API is active and responding
get_revit_model_info tool
Get comprehensive information about the current Revit model
get_revit_view tool
Export a specific Revit view as an image
list_revit_views tool
Get a list of all exportable views in the current Revit model
get_current_view_info tool
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 statusget_current_view_elements tool
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.What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 21 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 21 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 21 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Requests any addressNo tool sends a request to an address the caller supplies — 21 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 21 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processesNot seen in the traced code of 21 capabilities; 21 more call code the scanner could not follow, where it may happen
- Tools that touch files3 of 21 capabilities touch files; 18 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 21 capabilities; 21 more call code the scanner could not follow, where it may happen
Where the code is: 21 handlers in 9 files at commit 6ca46b3ea96a
tools/code_execution_tools.pyexecute_revit_codetools/colors_tools.pycolor_splash, clear_colors, list_category_parameterstools/document_tools.pyopen_document, close_document, save_document, sync_with_centraltools/family_tools.pyplace_family, list_families, list_family_categoriestools/launch_tools.pylist_revit_installations, launch_revittools/model_tools.pylist_levelstools/registration.pypaired_tooltools/status_tools.pyget_revit_status, get_revit_model_infotools/view_tools.pyget_revit_view, list_revit_views, get_current_view_info, get_current_view_elements
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests2 manifests: pyproject.toml, requirements.txt
- Lockfiles checked against OSV2 files resolved and checked against the OSV database; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
- Known vulnerabilities in production dependencies CRITICAL1 production package with known advisories
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionmcp ==1.30.0
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 21 capabilities; 21 more call code the scanner could not follow, where it may happen
- Environment variables4 capabilities read environment variables (often API keys)
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read (1 only in code no tool reaches)
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (1 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
certifiPyPI 2026.7.22 CRITICAL 2 advisories 2026.10.18
- CRITICALGHSA-6q48-6c7w-9gw2 PYSEC-2026-4320certifi bundles emSign root CAs with compromised intermediate CA keys
- MEDIUMPYSEC-2026-4320 GHSA-6q48-6c7w-9gw2certifi bundles emSign root CAs with compromised intermediate CA keys
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | Streamable HTTP, SSE, stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | mcp ==1.30.0 |
| Servers in the code | 2 (Revit MCP Server) |
The project's own security
| Security policy | yes SECURITY.md |
|---|---|
| Private reporting | the policy does not name a private channel |
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-10-26 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 4 catalogs (awesome_habitoai, github_search, glama, mcp_toplist) |
|---|---|
| License | MIT |
| Created | 2025-05-19 |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.