Skip to content

Add structural-framing + ported Python MCP tools (KPFF parameter-driven)#37

Open
mkimbler wants to merge 7 commits into
mcp-servers-for-revit:masterfrom
mkimbler:add-structural-framing-mcp-tools
Open

Add structural-framing + ported Python MCP tools (KPFF parameter-driven)#37
mkimbler wants to merge 7 commits into
mcp-servers-for-revit:masterfrom
mkimbler:add-structural-framing-mcp-tools

Conversation

@mkimbler

Copy link
Copy Markdown

What

Adds ~25 new MCP tools to the pyRevit FastMCP extension, in two layers (pyRevit routes in revit_mcp/, FastMCP tool wrappers in tools/).

New structural tools (revit_mcp/structure_framing.py, tools/structure_tools.py)

  • create_grids, configure_levels, place_framing, create_beam_system, tag_all_framing, create_sheet
  • set_parameters_bulk, tag_framing_standard, create_schedule, create_slab_callout (KPFF parameter-driven; implement the KPFF framing-plan standard)

Ported from the legacy TypeScript tools (revit_mcp/ported_query.py, ported_create.py, ported_ops.py + tool wrappers)

  • Queries: get_current_view_info, get_selected_elements, get_current_view_elements, get_available_family_types, get_material_quantities
  • Edit/ops: modify_element, delete_elements, operate_element, ai_element_filter, analyze_model_statistics
  • Tagging: tag_all_walls, tag_all_rooms
  • Creation: create_point/line/surface_based_element, create_room

Why

The .ts tools were thin forwarders to a separate (non-Python) Revit backend. This reimplements the Revit-relevant ones natively against the pyRevit routes API, and adds smarter, KPFF-parameter-aware structural tooling.

Notes for reviewers

  • Routes registered in startup.py; tools in tools/__init__.py.
  • Units are feet (Revit internal), not mm as in the original TS tools.
  • The TS docs/RAG/data-store tools (search-docs, use_module, store/query data, etc.) were intentionally not ported — they depend on infrastructure not present here.
  • All modules syntax-checked; new routes smoke-tested over the pyRevit HTTP API.
  • Requires a pyRevit reload + MCP server restart to activate.

Michael Kimbler and others added 7 commits June 26, 2026 15:30
…s, tags, sheets)

New route module revit_mcp/structure_framing.py and MCP tool module tools/structure_tools.py, registered in startup.py and tools/__init__.py. Captures the RAM-plot to Revit modeling capabilities as reusable tools: create_grids, configure_levels, place_framing, create_beam_system, tag_all_framing, create_sheet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ports (revit_mcp/ported_query|create|ops.py + tool wrappers): view/selection queries, family types, material takeoff, tag_all_walls/rooms, delete/modify, point/line/surface element + room creation, operate_element, ai_element_filter, analyze_model_statistics.

Smart tools (structure_framing.py): set_parameters_bulk (KPFF shared params), tag_framing_standard (composite T/STL tag), create_schedule (KPFF-field schedules), create_slab_callout (composite floor note). Implements the KPFF framing-plan standard learned from Base.pdf.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… room export, hello)

Reimplements the genuinely-new tools from the mcp-servers-for-revit C# command set natively in the local pyRevit MCP, instead of installing the Node/C# add-in stack:
- create_dimensions (NewDimension over element references, e.g. grids)
- create_levels (Level.Create)
- export_room_data
- say_hello (non-modal connection test)

The fork's other tools were already covered by earlier Python ports/equivalents. Units in feet (C# originals used mm).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…, interop, parameters, views, tags, structure)

Wires up the collision-free upstream (revit-mcp-server-master, folder mcp-servers-for-revit#5) route modules + tool wrappers into the local MCP: create_duct/pipe/mep_system, create_detail_line, transform_elements, export_ifc/link_file, get_element_properties/set_parameter, create_view/set_active_view, tag_elements, create_grid/create_structural_framing. Overlapping upstream modules (analysis/room/annotation/building/editing/documentation) were skipped to avoid duplicate tool names; removed the duplicate get_current_view_* from query_tools (base view_tools already provides them). 63 MCP tools total, no name/route collisions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…d from Revit-2026-MCP-Server C#)

Ports the genuinely-new tools from folder mcp-servers-for-revit#2 (Revit-2026-MCP-Server) into the local Python MCP:
- Project shared params: add_project_shared_parameter (binds a shared param from a .txt file to categories - KPFF workflow), remove_project_shared_parameter, get_project_shared_parameters
- Family shared params: add_family_shared_parameter, remove_family_parameter, get_family_parameters (Family Editor)
- detect_document_type, create_reference_plane, get_reference_planes, set_graphic_overrides (by category or element)

revit_mcp/shared_params.py + tools/shared_param_tools.py, registered in startup.py and tools/__init__.py. No route/tool-name collisions. Units in feet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ports the full curve/geometry tool set from Revit-2026-MCP-Server (folder mcp-servers-for-revit#2) and adds real 2D detailing:

Geometry (revit_mcp/geometry.py): create_bounded_line, create_curves_from_points, create_hermite_spline(+with_tangents), create_offset_curve, create_clone_curve, create_grid_line, create_grid_arc (curved/radial grids), create_point, create_point_on_element, calculate_line_direction, rotate_elements, evaluate_curve, curve_distance_to_point, curve_get_end_point/parameter/end_point_reference, curve_compute_derivatives/normalized_parameter/raw_parameter/closest_points, curve_point_location_on_curve, curve_create_reversed/transformed, curve_intersect.

2D detailing (revit_mcp/detailing.py): create_point_markup, create_detail/model/symbolic_shapes, plus NEW place_detail_component, create_filled_region, create_masking_region.

Enables curved steel/concrete/walls/sweeps and true 2D detail-component drafting. Units feet/degrees; curve ops act on existing curve elements via curve_element_id. 105 MCP tools total, no collisions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds the genuinely-new, non-redundant tools from rvt-mcp (bimwright), reimplemented natively (skipping its ~200 redundant tools and its tool-baking framework):
- QA/lint: get_model_warnings, analyze_view_naming, find_untagged_elements, cleanup_empty_tags
- Organization: create_group, purge_unused_families (dry-run default), set_project_info
- View utils: set_view_crop_scale, show_element, create_callout

revit_mcp/rvt_extras.py + tools/rvt_extras_tools.py. 115 MCP tools total, no collisions. The full 226-tool rvt-mcp is added separately as a standalone server.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant