Skip to content

Connect Claude, Gemini, ChatGPT (MCP) ​

Ribbon location: Tab DVD Addin → Group AI → click ▾ of AI Chat → Connect Claude, Gemini, ChatGPT (MCP)

Command ID: btnMcpConnect

License required

This command needs an active DVDAddin account (Standard or PRO). It is fully available during the Trial.

What it does ​

The AI Chat and the Translate command call Gemini / ChatGPT with the API key you enter in the add-in. This command works the other way round: you chat in the AI app you already use — Claude Desktop, Claude Code, Gemini CLI, Google Antigravity, Codex / ChatGPT — and that app calls DVD Addin's tools on the open Excel workbook. No API key in DVD Addin is needed: it runs on your AI app's own plan.

The link uses MCP (Model Context Protocol — the common standard for AI apps to use outside tools), the same way as DVD Rebar's DVDAIMCP command in AutoCAD. The port runs inside Excel, only accepts connections from this computer and needs an access token.

ToolWhat it doesWrites?
get_workbook_infoOpen workbooks, sheets, active sheet and selection—
read_rangeRead the values of a range (with formulas, or displayed text)—
get_text_cellsList the text cells to translate (skips numbers, dates, formulas), paged—
find_cellsFind cells containing a string on one sheet or the whole workbook—
get_glossaryRead the workbook's glossary (the "Từ điển" / "Glossary" sheet) — term pairs to use when translating—
list_commandsLook up DVD Addin commands by keyword—
write_translationsWrite translations the way the Translate command does: bilingual on a new line, "original/ translation" or replace; italic translationYes
write_cells, write_rangeWrite values, numbers, formulas into cells / a tableYes
format_rangeBold, italic, font / fill colour, number format, alignment, borders, column widthYes
add_sheet, select_rangeAdd a sheet; select a range so you can see the resultYes / —
run_commandOpen a DVD Addin command in Excel as if you clicked the ribbon buttonYes
undo_last_changeUndo the last write (like Ctrl+Z right after a command)Yes

The AI app also sees three ready-made prompts: Translate the selection, Translate the whole sheet, Summarise and check the selected table (Claude Desktop: the + button; Claude Code: /mcp__dvd-addin__…).

How to use ​

  1. Go to the DVD Addin tab → AI group → click ▾ of AI Chat → Connect Claude, Gemini, ChatGPT (MCP). The window does not block Excel — keep working while it is open.

  2. Click Turn on. The status line changes to ● On — http://localhost:3918/mcp. From now on the port turns itself on whenever Excel starts, until you click Turn off.

  3. Pick the tab of the AI app you use and click Write to config — the add-in adds a dvd-addin entry to that app's config file, keeping the other MCP servers and settings, and backs the old file up as *.dvdaddin.bak. To paste it yourself, click Copy.

    AppConfig fileNote
    Claude Desktop%APPDATA%\Claude\claude_desktop_config.jsonNeeds Node.js (connects through mcp-remote)
    Claude Code~/.claude.jsonOr run the claude mcp add … command shown in the tab
    Gemini CLI~/.gemini/settings.json
    Antigravity~/.gemini/config/mcp_config.json
    Codex / ChatGPT~/.codex/config.tomlShared by Codex CLI, the VS Code extension and the ChatGPT app (Codex)
  4. Restart the AI app. In Claude Code / Gemini CLI / Codex type /mcp to see dvd-addin; in Claude Desktop look under the chat box's tools icon. The line under each tab shows ✓ Written to … — right port and token when the config matches.

  5. Chat as usual, for example: "Translate the selected cells in Excel into English, keep the original, put the translation on a new line in italics." The AI app calls the read and write tools by itself.

  6. Every time the AI app writes to the workbook, Excel shows a confirmation on top of all windows saying which app wants to write what, on which sheet, with a few sample cells: Allow, Allow all (15 min) — further writes are not asked again for 15 minutes, handy when translating a whole sheet in batches — or Deny (the AI app is told you declined).

  7. The sheet is backed up before the write: press Ctrl+Z in Excel right after, or use Restore data. Several writes in a row on one sheet share one start-of-batch backup.

Translating through MCP ​

The write_translations tool writes the three layouts of the Translate command:

  • newline (default) — keep the original, translation on a new line; multi-line cells interleave original / translated lines. The translation is italic, the cell wraps and its row height grows.
  • slash — "original/ translation" on the same line, italic after the "/".
  • replace — replace the original with the translation.

Formula cells, number / date cells, and empty or unchanged translations are skipped (with the reason in the reply). Text always stays text — "3-5" is not turned into a date, "0123" keeps its leading zero. If the workbook has a Từ điển / Glossary sheet (column A Vietnamese, column B English), the AI app reads it and uses exactly those term pairs, like DVD Addin's Translate command.

Example ​

Sheet BBNT holds 300 Vietnamese description cells that need a bilingual version for a foreign consultant. In Claude Desktop pick the Translate the whole sheet prompt (+ → dvd-addin) or type: "Translate the whole BBNT sheet into English, bilingual on a new line."

Claude calls get_workbook_info → get_glossary (40 term pairs from the project's glossary sheet) → get_text_cells for the first 300 cells → translates → write_translations. Excel asks the first time — click Allow all (15 min) and the next batches run straight through. Claude then reports how many cells were translated and which were skipped (summary formula cells). Not happy? Say "undo" — Claude calls undo_last_change — or press Ctrl+Z in Excel.

Notes ​

  • Cells the AI app reads are sent to the AI vendor's servers (Anthropic, Google, OpenAI), as if you pasted them into the chat — think twice with sensitive figures.
  • The port only listens on localhost, web pages cannot call it, and every request needs the access token. If the token leaks, click New access token: the old one stops working and the configs you wrote are updated (hand-copied ones must be updated by you).
  • If Excel is editing a cell, has a dialog open or is running another command, a tool waits up to 30 seconds and then reports "Excel is busy" — press Enter / Esc and ask the AI app to try again.
  • Formulas written by the AI app use English syntax (SUM, IF, commas between arguments) — Excel shows them in your own language.
  • With several separate Excel processes, the first one keeps port 3918 and later ones use the next port — the written configs point at the first.
  • DVD Rebar uses port 3917 and DVD Addin port 3918: one AI app can connect to both at once (e.g. read a rebar schedule in AutoCAD and write it to Excel).
  • When the license expires the port stays open but every tool asks for a renewal.
  • AI Chat — chat pane inside Excel, using your API key
  • Translate — translate with Google / Gemini / ChatGPT inside the add-in
  • Restore data — get the sheet back from before an AI write
  • Find Cmd

Released under DVDAddin License.