An AI connection lets an AI assistant app on your PC work with the books open in LeafBound: read them, apply formatting, typeset equations you supply, and propose corrections for you to accept. You sign in to your own AI account in the assistant; LeafBound never sees that password or key. The window describes it as a connection for assistants that support MCP (Model Context Protocol).
Setting up takes three steps, and the window that guides you shows the same three. You do them once. They take about five minutes.
Before you start
- LeafBound must be activated. AI connections are part of every paid plan and of the free trial, but not of the free Reader plan.
- The assistant must be an app installed on this PC, under the same Windows account as LeafBound.
- ChatGPT and Grok in a web browser or on a phone cannot connect. They only reach servers on the internet, and LeafBound keeps your books on this PC. The same goes for any assistant you use only in a browser. Use a desktop or terminal app instead: the ChatGPT desktop app, Codex or Grok Build.
- The assistant must support MCP. LeafBound has a button or a command for the Claude desktop app, the ChatGPT desktop app, Codex, Grok Build and Claude Code. Other assistants that support MCP connect with a short piece of configuration text.
Step 1: Allow the connection
- In the library, choose AI assistant in the left rail. In a book window, choose Tools then AI editing connections… instead. Both open the same window, Connect an AI assistant.
- Under 1. Allow the connection, check Allow AI to inspect, edit and format open manuscripts.

The box is cleared until you check it, and it stays as you left it the next time you open LeafBound.
Step 2: Add LeafBound to the Claude desktop app
Step 2 depends on your assistant. Follow the one part that fits and skip the others: the Claude desktop app (next), the ChatGPT desktop app and Codex, Grok, Claude Code or other assistants.
- Install the Claude desktop app if you have not, and open it once.
- In LeafBound, under 2. Add LeafBound to your assistant, choose Add to the Claude desktop app.
- Wait for the line beside the button to say "Added. Close Claude completely, then open it again."
That is all for this step. LeafBound adds one entry, named leafbound, to Claude’s settings file, claude_desktop_config.json. Every other setting in the file is kept. Before it changes the file, LeafBound saves a copy of it in the same folder, named claude_desktop_config.json.before-leafbound. The button also checks the box in step 1 if you had not.
| If the line says | What to do |
|---|---|
| The Claude desktop app was not found on this computer. Install it, open it once, then choose this again. | Install the Claude desktop app, open it once so that it makes its settings folder, then choose Add to the Claude desktop app again. |
| Claude's settings file could not be changed. Add LeafBound by hand with the configuration below. | Close Claude completely and choose the button again. If it still fails, add LeafBound by hand as described next. |
Step 2 by hand, for the Claude desktop app
Use this only if the button did not work.
- In LeafBound, under Other assistants, choose Copy configuration. The line beside the button says "Copied."
- In Claude, open Settings, then Developer, then Edit Config. Windows shows the file
claude_desktop_config.jsonin its folder. - Right-click the file, choose Open with, then Notepad.
- If the file is empty, or holds only
{}, select everything in it and paste. The file now holds only the text you copied. - If the file already holds settings, do not replace them. Copy the part of LeafBound’s text that starts at
"leafbound"and ends at its closing}, and paste it inside the braces that follow"mcpServers", with a comma between it and the entry before it. If the file has no"mcpServers"yet, paste the whole"mcpServers"part after the opening{, followed by a comma. - Save the file and close Notepad.
Step 2 for the ChatGPT desktop app and Codex
The ChatGPT desktop app and Codex share one list of connections, so one button sets up both.
- Install the ChatGPT desktop app or Codex if you have not, and open it once.
- In LeafBound, under ChatGPT desktop app and Codex, choose Add to ChatGPT and Codex.
- Wait for the line beside the button to say "Added. Close ChatGPT or Codex completely, then open it again."
LeafBound adds one entry, named leafbound, to the settings file the two apps share: config.toml, in the .codex folder of your Windows user folder. Every other setting in the file is kept. Before it changes the file, LeafBound saves a copy of it in the same folder, named config.toml.before-leafbound. The button also checks the box in step 1 if you had not.
| If the line says | What to do |
|---|---|
| ChatGPT or Codex was not found on this computer. Install it, open it once, then choose this again. | Install the ChatGPT desktop app or Codex, open it once so that it makes its settings folder, then choose Add to ChatGPT and Codex again. |
| The ChatGPT and Codex settings file could not be changed. Use the command below instead. | Close ChatGPT and Codex completely and choose the button again. If it still fails, use the command as described next. |
To use the command instead of the button, you need Codex installed:
- Under "Or run this command once in a terminal:", choose Copy command.
- Open a terminal, paste the command and press Enter.
The command starts with codex mcp add leafbound. Run it once.
Step 2 for Grok
Grok connects to LeafBound through Grok Build, the Grok app for the terminal. Grok in a web browser or on a phone cannot connect.
- Install Grok Build if you have not, and sign in to it.
- In LeafBound, under Grok Build, choose Copy command.
- Open a terminal, paste the command and press Enter.
The command starts with grok mcp add leafbound. Run it once.
Step 2 for Claude Code
- In LeafBound, under Claude Code, choose Copy command.
- Open a terminal, paste the command and press Enter.
Run the command once. It starts with claude mcp add leafbound and names LeafBound on this PC.
Step 2 for other assistants
- In LeafBound, under Other assistants, choose Copy configuration.
- In your assistant, open its MCP settings. They may be called MCP servers, connectors or tools.
- Add a local server and paste the configuration.
The configuration names LeafBound on this PC as the command, with --mcp after it. The assistant starts that small helper itself; you do not run it. If Copy configuration or Copy command says "The clipboard is busy. Try Copy again.", choose the button again.
Step 3: Restart the assistant and try it
- Close the assistant completely. Closing its window is often not enough: if the assistant keeps an icon near the clock on the Windows taskbar, right-click the icon and choose its Quit or Exit command.
- Open the assistant again, so that it reads the new connection.
- Open LeafBound and the book you want to work on, and keep them open.
- Ask the assistant: List my open LeafBound books.
- When the assistant names your book, the connection works. Choose Done in LeafBound.
The first time, the assistant may ask whether it may use LeafBound. Allow it. The window adds: "If the assistant cannot find LeafBound, check that LeafBound is open and that the box in step 1 is ticked."
After a LeafBound update
The connection keeps working after LeafBound updates itself. Each version of LeafBound is installed in its own folder, so the connection points at a folder link named current beside the version folders. LeafBound points that link at the running version each time it starts.
Use it
- Open the book in LeafBound first. The assistant works with books that are open, and can open a .leafbound, .docx or .vellum file for you in a new window.
- Each change is one step you can undo with Edit then Undo (Ctrl+Z). The status bar names the change and says Undo is available.
- If you change the book while the assistant is working, its next change is refused and it has to read the book again. This stops it overwriting your edits.
- While a LeafBound window or dialog is open in front of the book, AI changes wait until you close it.
Turn it off
Clear Allow AI to inspect, edit and format open manuscripts. From the next request, the assistant sees no open books and every request is refused. You can also remove LeafBound from the assistant’s server list. In the Claude desktop app, that means deleting the leafbound entry from claude_desktop_config.json (Settings, then Developer, then Edit Config). For ChatGPT and Codex, delete the [mcp_servers.leafbound] part of config.toml.
Messages the assistant may report
| Message | What it means |
|---|---|
| Turn on AI connections in LeafBound under Tools > AI editing connections… | The setting is off. Check it in Tools then AI editing connections…. |
| Open LeafBound on this Windows account before connecting an AI assistant. | LeafBound is not running, or is running under another Windows account. |
| That document is not open. Call list_documents first. | The book was closed. Open it again. |
| LeafBound has a dialog open. Finish it before AI changes can continue. | Close the open window in LeafBound. |
| The manuscript changed. Read it again and use the current revision. | The book changed since the assistant read it. The assistant should read it again. |
Related
- What an AI assistant can do in LeafBound
- Review AI changes
- AI connections and your privacy
- AI is for editing and formatting your manuscript
Still stuck?
Choose Help then Report a problem… in LeafBound to send us the details, or write to support.