How zedmoster/revit-mcp works
Project type and purpose
• This is a Python-based integration library (“xml.Revit.MCP Tools”) that exposes Autodesk Revit functionality via the Model Context Protocol (MCP) and JSON-RPC, allowing AI agents or other clients to programmatically drive Revit.
• Its primary use case is to run a JSON-RPC server (main.py / xml_revit_mcp/server.py) that proxies calls to a Revit plugin (the MCP DLL) over stdio (via UV’s “uvx revit-mcp” command).
File structure
• Top level:
• main.py — entry point that launches the MCP JSON-RPC server
• pyproject.toml / build.bat — build and packaging
• tests/ — end-to-end tests covering each exported command
• xml_revit_mcp/ — the package implementing prompts, RPC glue, resource definitions, connection management, and high-level tools.
• Key modules under xml_revit_mcp:
• server.py — JSON-RPC server setup
• revit_connection.py & rpc.py — low-level request/response framing
• tools.py & prompts.py — high-level helpers for AI integration
• resources.py — command metadata
• Tests spin up a test TCP bridge (_tcp.py) or the real “uvx revit-mcp” server to validate each operation.
README for additional insights
• Describes all supported operations (create walls, query parameters, etc.)
• Specifies dependencies: Python 3.10+, uv, Revit 2019–2024
• Outlines how AI assistants (e.g., Claude, Cursor, Cline) integrate via JSON-RPC settings.
Essential details to capture
• The stdio transport boundary between Python and Revit
• The modular structure inside xml_revit_mcp (server vs. tools vs. connection)
• The extension point where custom MCP DLLs slot in