Skip to content
Craft Wiki

AI agents

WordCraft is built so that AI assistants can use it as well as people. Any assistant that supports the Model Context Protocol (MCP) can create documents, edit them, format them and save them as .docx or PDF. That includes Claude, OpenAI’s Codex, Cursor and GitHub Copilot in VS Code.

Assistants talk to WordCraft through its command-line tool, wordcraft-cli:

  • Windows: wordcraft-cli.exe is next to wordcraft.exe in the install folder or portable zip.
  • macOS: download wordcraft-cli-<ver>-macos-universal.zip from the release page.
  • Linux .deb, .rpm, tarball, and FreeBSD: it’s installed alongside the app.
  • Flatpak: run it as flatpak run --command=wordcraft-cli ai.storyteller.wordcraft.
  • AppImage: use the tarball instead, which includes it.

Every assistant below starts WordCraft with the same command: wordcraft-cli mcp. If the assistant can’t find wordcraft-cli, use its full path, for example C:\Users\you\AppData\Local\Programs\ArtCraft\WordCraft\wordcraft-cli.exe. Desktop apps often need the full path even when your terminal doesn’t.

Terminal window
claude mcp add wordcraft -- wordcraft-cli mcp

Choose Settings › Developer › Edit Config, add WordCraft to claude_desktop_config.json, then restart Claude:

{
"mcpServers": {
"wordcraft": {
"command": "wordcraft-cli",
"args": ["mcp"]
}
}
}
Terminal window
codex mcp add wordcraft -- wordcraft-cli mcp

The Codex CLI, the Codex IDE extension and the ChatGPT desktop app share this setup, so you only add it once. ChatGPT on the web can’t connect to programs on your computer.

Add WordCraft to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):

{
"mcpServers": {
"wordcraft": {
"type": "stdio",
"command": "wordcraft-cli",
"args": ["mcp"]
}
}
}

Open the Command Palette, run MCP: Add Server, choose Command (stdio), and enter wordcraft-cli mcp. Name it wordcraft.

Look for “MCP servers” in your assistant’s settings and add a local (stdio) server with the command wordcraft-cli and the argument mcp.

Once connected, ask in plain words, for example “Write a one-page project brief as brief.docx, with a heading for each section”. WordCraft works in the background, with no window, and the assistant can check its own work without screenshots.

To stop the assistant reading or writing files outside one folder, add a read folder and a write folder after wordcraft-cli mcp:

Terminal window
wordcraft-cli mcp --automation-read-root ~/Documents/project --automation-write-root ~/Documents/project/out

In a JSON config, put each flag and folder in args:

"args": ["mcp", "--automation-read-root", "/Users/you/Documents/project",
"--automation-write-root", "/Users/you/Documents/project/out"]

The assistant can then only open files inside the read folder, and only save inside the write folder. Leave out the write folder and it can’t save to disk at all. Use full paths in JSON files, since ~ isn’t expanded there.

To see the assistant’s changes as it makes them, start WordCraft with its control port open, and connect the assistant to the window instead:

Terminal window
wordcraft --control 7981

Then use wordcraft-cli mcp --connect 127.0.0.1:7981 as the assistant’s command. In the app, the assistant can also click, press keys and take screenshots. The folder limits above don’t apply here, so it can open and save anywhere you can.

Tracked changes and comments carry the author’s name. Give the assistant its own name, so reviewers can see which edits it made, by adding --author:

Terminal window
wordcraft-cli mcp --author "Claude (copyedit)"

Then ask it to turn on track changes before it edits.

An assistant can install Language packs only if you’ve turned downloading on in the app yourself, by clicking Install or Add a language… in File › Options › Language. It can’t turn downloading on by itself.

wordcraft-cli also works on its own, without an assistant:

Terminal window
wordcraft-cli convert report.docx report.pdf # convert to docx, pdf, odt, rtf, html, md, tex, txt or png
wordcraft-cli text report.docx # print the text

More commands:

Terminal window
wordcraft-cli info report.docx # pages, words and properties, as JSON
wordcraft-cli inspect report.docx # the document's structure, as JSON
wordcraft-cli render report.docx page2.png --page 2 # draw one page as a picture
wordcraft-cli commands # every command WordCraft has (add --json for a list a script can read)

convert can do more than change the format. Add --markup for a PDF or picture with comments beside the pages and tracked changes shown, and --update-fields to refresh fields such as the table of contents before saving. It also writes .xml (Word XML) and .json.

run applies commands to a file without opening a window, then saves the result:

Terminal window
wordcraft-cli run --file report.docx --cmd 'select.text={"text":"Membership"}' --cmd format.bold --save out.docx

This selects the word “Membership” and makes it bold. Each --cmd is a command from wordcraft-cli commands and its settings as JSON. Add --author to name who tracked changes and comments are by. wordcraft-cli zotero runs a Zotero command on a document while Zotero is open.

For scripting WordCraft’s commands, see the developer documentation on GitHub.