
graphbim/revitmcpgraphql
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Revit MCP GraphQL , Just is the project hackathon on weekend.
Обзор
Exposes a lightweight GraphQL API inside Autodesk Revit for both read and write operations. You can query model data, inspect selection/context, and run safe editing commands (mutations) — all from GraphQL or a Python client. - Runs an in-process HTTP GraphQL server inside Revit - Modular query + mutation architecture (contributors) - Broad query coverage: document, categories, elements, rooms, levels, views, families/instances, project info, materials, worksets, phases, design options, links, sheets, grids, schedules, project location, warnings, element types, units, coordinates, elements by category, elements in bounding box, active view and selection, element relationships, model health - Practical mutations: set parameters (single/batch), change type, move, rotate, delete, create family instance, duplicate view, create sheet, export/import schedules to/from Excel - Simple health endpoint and native JSON variables - Optional Python MCP client/server for automation and AI...
README
Показан фрагмент оригинального README. Открыть оригинал.
RevitMCPGraphQL
Exposes a lightweight GraphQL API inside Autodesk Revit for both read and write operations. You can query model data, inspect selection/context, and run safe editing commands (mutations) — all from GraphQL or a Python client.
Demo
Highlights
- Runs an in-process HTTP GraphQL server inside Revit
- Modular query + mutation architecture (contributors)
- Broad query coverage: document, categories, elements, rooms, levels, views, families/instances, project info, materials, worksets, phases, design options, links, sheets, grids, schedules, project location, warnings, element types, units, coordinates, elements by category, elements in bounding box, active view and selection, element relationships, model health
- Practical mutations: set parameters (single/batch), change type, move, rotate, delete, create family instance, duplicate view, create sheet, export/import schedules to/from Excel
- Simple health endpoint and native JSON variables
- Optional Python MCP client/server for automation and AI tooling
Requirements
- Autodesk Revit 2021–2027 (multi-targeted). Most features validated on 2024/2025.
- .NET Framework 4.8 for Revit 2021–2024; .NET 8 for Revit 2025–2026; .NET 10 for Revit 2027 (handled by csproj configurations)
- Windows 10/11
- Python 3.8+ (only if using the Python client / MCP server)
Install and Build
-
Clone
-
Open the solution in Rider or Visual Studio
-
Restore and build
- dotnet restore
- Select the Revit configuration matching your version (e.g., “Debug R24”, “Debug R25”, “Debug R26”, or “Debug R27”) and build
-
Deploy
- The project uses Nice3point.Revit.Build.Tasks to copy the .addin and binaries to your Revit Addins folder on Debug builds automatically
Run in Revit
- Start Revit and open a model
- In the Add-Ins tab, use the Start button to launch the server (Stop to shut it down)
- A free port between 5000–6000 is chosen automatically; a dialog shows the exact URL
- Health: http://localhost:/ or /health
- GraphQL: http://localhost:/graphql (POST)
Tip: If you rely on a fixed port (e.g., tests), set REVIT_GRAPHQL_URL to the shown URL when launching tools.
GraphQL usage
Send HTTP POST to /graphql with JSON body: { “query”: “{ health }” }
Variables are supported via the standard { query, variables } payload.
Queries (selection)
- health: String
- document
- categories(limit)
- elements(limit)
- familyTypes(limit)
- rooms(limit)
- levels(limit)
- views(limit)
- families(limit)
- familyInstances(limit)
- projectInfo
- elementsById(ids: [ID!]!)
- materials(limit)
- worksets(limit)
- phases(limit)
- designOptions(limit)
- links(limit)
- sheets(limit)
- grids(limit)
- projectLocation
- warnings
- elementTypes(limit)
- elementsByCategory(category: BuiltInCategoryEnum!, limit)
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →