Connecting ChatGPT and Codex to PVX.AI

Overview

PVX.AI runs an MCP (Model Context Protocol) server inside AutoCAD, so an AI client can read the open drawing and run PVX.AI tools. From the OpenAI family, the route that works is Codex: in the ChatGPT desktop app for Windows, in the Codex CLI, or in the Codex IDE extension. These run on your own computer, and all three read the same MCP settings, so you set up the server once.

ChatGPT in a web browser cannot connect to PVX.AI. OpenAI describes the MCP servers it uses on the web and in its API as remote servers, reachable on the public Internet, and ChatGPT on the web does not read the local Codex settings. The PVX.AI server only listens on your own computer (127.0.0.1), so it is not reachable that way.


Prerequisites

  • Windows, with PVX.AI 2.15 or later installed in AutoCAD 2023 or newer.
  • A PVX.AI license that includes the Claude (MCP) integration.
  • On the same computer: the ChatGPT desktop app for Windows, the Codex CLI, or the Codex extension for your code editor, signed in to Codex.
  • The Codex agent running natively on Windows (the default in the desktop app). A Codex running inside WSL is a separate Linux environment and does not use these settings by default.

Step-by-Step Guide

1. Start AutoCAD and check the address

Start AutoCAD with PVX.AI and open a drawing. The server starts by itself. Its default address is http://127.0.0.1:52780/mcp. If that port was busy, the server uses another one; Connecting Other MCP Clients to PVX.AI over HTTP shows how to read the real address and how to fix the port. Opening http://127.0.0.1:52780/health/ready in a browser answers "status":"ready" when the server is up.

2. Add the server to Codex

Use one of these. They all write to the same file, %USERPROFILE%\.codex\config.toml.

  • ChatGPT desktop app: open Settings > MCP servers > Add server. Enter the name pvxai-solar-design, choose Streamable HTTP, enter the address from step 1, save, then select Restart.
  • Codex IDE extension: open the gear menu > MCP servers > Add server, fill it in the same way, save, then select Restart extension.
  • Codex CLI: run this in PowerShell:
codex mcp add pvxai-solar-design --url http://127.0.0.1:52780/mcp

You can also edit the file directly. Raising the tool timeout above its 60-second default gives long PVX.AI operations some margin:

[mcp_servers.pvxai-solar-design]
url = "http://127.0.0.1:52780/mcp"
tool_timeout_sec = 120

3. Optional: use the bridge so the address never matters

A fixed address stops working when the port moves. The bridge program in the PVX.AI installation finds the running AutoCAD by itself. Copy %ProgramFiles%\Autodesk\ApplicationPlugins\PVXAI.Cad.bundle\pvxai-solar-design.mcpb to a folder such as C:\PVX, rename the copy to end in .zip, and extract it there, so that the bridge is at C:\PVX\server\PVXAI.Bridge.exe (adjust the path below if yours differs). Then add the bridge as a local command instead of the URL (in the app or extension, choose STDIO and enter the path):

codex mcp add pvxai-solar-design -- "C:\PVX\server\PVXAI.Bridge.exe"

In config.toml this is command = 'C:\PVX\server\PVXAI.Bridge.exe' in place of the url line. Keep only one pvxai-solar-design entry.

4. Check that the tools are listed

In the desktop app, type /mcp in the composer of a chat. In the CLI, run codex mcp list, or type /mcp inside a codex session. In the IDE extension, open MCP servers again to see the server you added. The server provides 14 tools, such as system, query, solar_layout and solar_electrical.

5. Make a first request

Start with a question that changes nothing, for example: “Using the pvxai-solar-design tools, how many racks and strings are in this drawing, and what is the DC capacity?” Then ask for changes in plain words. PVX.AI also offers built-in prompts (such as design_from_brief and review_design); OpenAI’s Codex documentation does not describe a menu for MCP prompts, so ask for the same task in your own words, for example “Review the design in this drawing”. The Claude Desktop article has more examples.


Tips & Recommendations

Approvals and changes

  • To have Codex ask before every tool that changes the drawing, add default_tools_approval_mode = "writes" under the server entry. PVX.AI marks its read-only tools, so questions still run without a prompt.
  • Removing racks, clearing electrical design or resetting terrain runs as a preview first and needs a second, confirmed call to apply.
  • Codex cannot undo a drawing change. Press Ctrl+Z in AutoCAD.
  • An action run through Codex uses credits the same way as the same action on the ribbon.

Troubleshooting

  • The server is missing from /mcp: restart the desktop app or the extension, or start a new CLI session, after changing the settings. Check config.toml for typing errors.
  • The server fails to start: with the URL route, AutoCAD must already be running when the Codex chat starts. Start AutoCAD, then open a new chat.
  • It worked yesterday and now cannot connect: the port probably moved. Update the address, set a fixed port as described in the HTTP article, or use the bridge.
  • Calls time out: a dialog is probably open in AutoCAD. Close it and try again. Before retrying an action that uses credits, check the drawing: it may have finished.
  • Codex CLI in WSL does not see the server: by default WSL uses its own Codex home folder and its own network. Run the CLI from PowerShell instead.

Menu names can differ between versions of the ChatGPT desktop app and Codex. OpenAI’s documentation: Model Context Protocol in ChatGPT and Codex.

Related