Skip to content

Add OpenAI Responses and Codex MCP integration for Revit - #5

Draft
debug23win wants to merge 7 commits into
mainfrom
codex/openai-responses-revit-mcp
Draft

debug23win wants to merge 7 commits into
mainfrom
codex/openai-responses-revit-mcp

Conversation

@debug23win

@debug23win debug23win commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Official OpenAI requests now use Responses API, enabling GPT models that require Responses for function calling. Existing Claude and other compatible provider paths remain available. Adds encrypted reasoning replay, incomplete-stream rejection, and transport tests.

Adds a Codex stdio bridge that reads the existing local MCP token without storing it in Codex arguments/configuration, corrects stateless MCP HTTP handling, and adds an isolated Revit level creation/rollback diagnostic. CI uploads a Revit 2027 package after build and tests.

Validation:

  • GitHub Actions built Revit 2027 successfully and passed 40/40 unit tests: https://github.com/debug23win/ClaudeRevit/actions/runs/34955862900
  • Downloaded CI artifact SHA256 verified; installed into local Revit 2027.
  • Actual MCP initialize and tools/list succeeded through the registered stdio bridge; 164 tools available.
  • Actual test_revit_connection read the active project, created and verified a level in a separate unsaved document, rolled it back, verified removal, and closed that temporary document. User document unchanged.
  • Final follow-up only documents the process-scoped RemoteSigned argument required on this Windows installation; production code matches the tested build.
  • No local build performed. OpenAI API calls remain unverified with a live key (no API key configured).

claude and others added 7 commits July 8, 2026 08:42
… 14 tools

Mechanical, provably-equivalent pass: every raw 304.8 literal (local FeetToMm /
MmToFeet consts and inline * / 304.8 conversions in rebar/family/location tools)
now references Units.MmPerFoot. No behaviour change; the magic number lives in
one place. Both Revit builds clean, 30 tests pass. (MeasureDistance's separate
3.28084 approximation and the model-facing doc-strings left untouched to avoid
changing any numeric output.)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RCGB6xWx3ZtmWZRQEJtN6B
Rework the initialize instructions into a structured senior-BIM-engineer prompt:
read-before-act workflow (gather context, never invent IDs/types/levels, plan
non-trivial work, prove on one element then scale), units, tool-choice (prefer
dedicated tools, filter_elements for queries, run_batch, code as the escape
hatch), the field-learned efficiency/Regenerate/ElementId rules, and safety +
error-handling + concise-answer discipline. Uses OUR real tool names (the pasted
draft referenced revit-mcp's tools) and leans on the tool index we now inject.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RCGB6xWx3ZtmWZRQEJtN6B
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.

3 participants