mcp-server-for-revit
Node.js MCP server enabling AI assistants to interact with Autodesk Revit for model operations, data queries, and sketch-to-building generation via LLM.
README
mcp-server-for-revit
Servidor MCP (Node.js) para interagir com o Autodesk Revit a partir de assistentes de IA (Claude, Cursor, etc.).
Este repositório contém duas coisas que convém distinguir:
- O MCP “original” (bridge Node) — alinhado com o ecossistema mcp-servers-for-revit: expõe operações do Revit como ferramentas MCP; o servidor fala com o plugin Revit oficial por TCP (por defeito porta
8080), não por WebSocket neste fluxo de bridge. - A extensão deste fork — porta dupla no bridge (
REVIT_PLUGIN_PORT/REVIT_SKETCH_PORT) e o add-in separadoRevitSketchPoC(C# / WPF) na pastarevit-plugin/RevitSketchPoC/, que escuta outra porta (por defeito8081) e trata apenas da toolcreate_house_from_sketch(interpretação de imagem + criação de paredes/quartos/portas no Revit), com Ollama ou Gemini configurável no plugin.
[!NOTE] Para o fluxo completo precisas do plugin Revit original (porta
8080) e, se usares o sketch por MCP ou UI, do RevitSketchPoC (porta8081). Instruções do plugin oficial: mcp-servers-for-revit. Detalhe do PoC:revit-plugin/RevitSketchPoC/README.md.
Segurança e Git
- Não commits ficheiros
.env, chaves em JSON, nem cópias locais com segredos. O repositório inclui.gitignoreparanode_modules/, artefactos .NET (bin//obj/),.env*epluginsettings.local.json. - O ficheiro
deploy/pluginsettings.jsondo PoC deve manterGeminiApiKeyvazio no Git; usa uma cópia local ou segue opluginsettings.example.jsoncomo modelo.
Setup (cliente MCP)
Claude Code
claude mcp add mcp-server-for-revit -- npx -y mcp-server-for-revit
Claude Desktop — claude_desktop_config.json:
{
"mcpServers": {
"mcp-server-for-revit": {
"command": "npx",
"args": ["-y", "mcp-server-for-revit"],
"env": {
"REVIT_PLUGIN_PORT": "8080",
"REVIT_SKETCH_PORT": "8081"
}
}
}
}
Reinicia o cliente. O ícone de ferramentas indica que o MCP está ligado.
Duas portas, dois plugins
| Variável de ambiente | Valor por defeito | Destino TCP |
|---|---|---|
REVIT_PLUGIN_PORT |
8080 |
Plugin original — todas as tools exceto create_house_from_sketch |
REVIT_SKETCH_PORT |
8081 |
RevitSketchPoC — apenas create_house_from_sketch |
A tool create_house_from_sketch usa REVIT_SKETCH_PORT (ou data.pluginPort no pedido). O campo pluginPort não é enviado ao Revit (o bridge remove-o). As restantes tools usam REVIT_PLUGIN_PORT.
Ferramentas MCP suportadas
| Tool | Descrição |
|---|---|
get_current_view_info |
Informação da vista ativa |
get_current_view_elements |
Elementos na vista ativa |
get_available_family_types |
Tipos de família disponíveis |
get_selected_elements |
Elementos selecionados |
get_material_quantities |
Quantidades de materiais |
ai_element_filter |
Consulta inteligente ao modelo |
analyze_model_statistics |
Estatísticas do modelo |
create_point_based_element |
Elementos baseados em ponto |
create_line_based_element |
Elementos baseados em linha |
create_surface_based_element |
Elementos baseados em superfície |
create_grid |
Grelha |
create_level |
Níveis |
create_room |
Quartos |
create_dimensions |
Cotas |
create_structural_framing_system |
Estrutura em vigas |
delete_element |
Apagar por ID |
operate_element |
Operar (selecionar, cor, ocultar, etc.) |
color_elements |
Colorir por parâmetro |
tag_all_walls / tag_all_rooms |
Etiquetas |
export_room_data |
Exportar dados de quartos |
store_project_data / store_room_data / query_stored_data |
Metadados locais |
send_code_to_revit |
Enviar C# para executar no Revit |
create_house_from_sketch |
Imagem de esboço → interpretação LLM (Ollama ou Gemini no RevitSketchPoC) → paredes/quartos/portas |
say_hello |
Teste de ligação |
Desenvolvimento (Node)
npm install
npm run build
Sketch PoC (C# / WPF)
A implementação atual e suportada está em revit-plugin/RevitSketchPoC/ (UI, router MCP TCP, Ollama/Gemini, transações Revit). A pasta samples/RevitSketchPoC/ pode existir como referência antiga; segue o README do plugin em revit-plugin/RevitSketchPoC/README.md.
Fluxo resumido:
- Utilizador envia imagem (ribbon Sketch AI PoC ou MCP
create_house_from_sketch). - O plugin chama o LLM (Ollama ou Gemini conforme
pluginsettings.json). - Resposta estruturada → criação de elementos numa
Transactionno Revit.
Licença
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.