Introduction

PubCoder includes an MCP server that lets the AI apps on your computer, such as Claude, ChatGPT (Codex), Cursor or GitHub Copilot in VS Code, create and edit your projects in PubCoder. MCP (Model Context Protocol) is the standard way AI apps use other apps: once you add PubCoder’s MCP server to your AI app, you ask for what you need in that app’s chat, and the changes appear in PubCoder, on the real pages and objects you can see on the stage.

Claude working on a PubCoder project

Your AI app can do everything PubCoder’s AI Assistant does: build pages and layouts, add objects, widgets and interactivity, fill quizzes with questions, apply the same change to hundreds of pages, import images and documents and create new projects (see What can the AI Assistant do?). But while the AI Assistant is a chat window inside PubCoder that works with your own API key, with the MCP server you work in your own AI app, which brings its models and its tools to your projects:

  • Use the most capable models: work with the best models included in your AI app’s plan, such as Claude Opus 5.5, without paying for every request as you do with an API key. On complex tasks, like rebuilding a layout or setting up the interactivity of a whole book, the most capable models give much better results than smaller, faster ones
  • Combine PubCoder with the app’s own tools: your AI app can also read and convert files, run code and search the web, and use the results in PubCoder. For example, it can rebuild a PDF as a PubCoder project with real, editable text instead of the page images of Import from PDF: it recreates a presentation slide by slide, with its text and images in their original positions, and it can either recreate a book page by page or convert it to EPUB and flow it into pages with Import from EPUB
    • “Make a new PubCoder project that replicates this PDF, with editable text and the images extracted from the PDF”
  • Find content anywhere on the web: search for images and other material on any website, not only on Wikimedia Commons like the AI Assistant. Always check that you have the right to use what it finds
    • “Find a photo of a red fox that can be reused for free, and put it on page 3”
  • Write code: write HTML, CSS and JavaScript with the app’s coding tools and add it to your project, for example in a Smart Object or as custom code
    • “Add an interactive timeline of the planets of the solar system to page 5”
  • Generate images and assets: create illustrations with models that can generate images, such as GPT-6.1 Sol, and other assets with the app’s own tools, then use them in your project, which the AI Assistant can’t do
    • “Draw a watercolor illustration of the fox by the river for page 2”

To start, turn on the MCP server and add PubCoder to your AI app in the MCP tab of PubCoder’s settings (see Setting up the MCP server).

Setting up the MCP server

To use PubCoder from your AI app you need:

  • PubCoder Pro. The MCP server is one of the PubCoder Pro features, included in the 7-day trial. To try or buy PubCoder Pro, open the Account window (choose PubCoder ▹ Account… on Mac or Edit ▹ Account… on Windows from the menu bar) and click Upgrade to PubCoder Pro.
  • An AI app that supports local MCP servers, installed on the same computer as PubCoder: for example Claude Desktop, ChatGPT (Codex), Cursor, VS Code with GitHub Copilot, or a command-line AI agent such as Claude Code, Codex, Gemini CLI or OpenCode. AI apps that run only in a web browser, and apps that only accept the address (URL) of a server, can’t use PubCoder.

Turning on the MCP server

Choose PubCoder ▹ Settings… on Mac or Edit ▹ Settings… on Windows from the menu bar, then click the MCP tab and select Enable MCP server to allow AI agents to work with PubCoder. The server starts right away and stops when you deselect the option. Click OK to keep your choice: if you click Cancel, the server goes back to how it was when you opened Settings.

MCP tab in Settings

The server only accepts connections from apps on your computer. Once it is on, the rest of the tab lets you add PubCoder to your AI apps: the AI Apps tab for desktop apps, the Terminal tab for command-line AI agents.

Adding PubCoder to your AI app

In the AI Apps tab, under Install with one click, click the tile of your AI app:

  • Add to Claude: opens Claude Desktop, which asks you to confirm the installation of the PubCoder extension in its own window
  • Add to ChatGPT (Codex): adds PubCoder to the MCP servers of ChatGPT (Codex). Restart the ChatGPT app, switch to Codex mode and start a new chat to use it
  • Add to Cursor: adds PubCoder to the MCP servers of Cursor. Open a new chat in Cursor to use it
  • Add to VS Code (GitHub Copilot): opens VS Code, which shows PubCoder’s server and asks you to confirm its installation, so that GitHub Copilot can use it

Once PubCoder is in an app’s settings, its tile says Added to … with a green check. You only need to add PubCoder to each app once, but you can add it again whenever you need to: for example after moving PubCoder to another folder, after reinstalling the AI app, or if the AI app can’t reach PubCoder. Clicking the tile again never creates a duplicate: PubCoder replaces the entry it added before, which often fixes the problem. If the AI app isn’t on your computer, PubCoder tells you where to download it.

If your AI app isn’t in the list, you may still be able to use it: look in its settings for a way to add an MCP server that runs a local command (STDIO; some apps call it a connector or an extension), and enter the Name and Command shown under Other AI apps, with no arguments. Click the copy button next to each value to copy it.

Adding PubCoder to a command-line AI agent

Click the Terminal tab to see the commands that add PubCoder to Claude Code, ChatGPT (Codex), Gemini CLI and OpenCode. Click the copy button next to your agent’s command, then paste the command in Terminal on Mac or in Command Prompt on Windows and run it: the agent adds PubCoder to its own settings, for all your projects.

Terminal tab in the MCP settings

PubCoder’s MCP server works with any command-line AI agent that supports local (STDIO) MCP servers: check the agent’s documentation and, where it asks for the server’s command, use the one shown below the list.

Advanced MCP Apps features

Some AI apps, such as Claude, can show cards from other apps inside the conversation (a feature called MCP Apps). With Enable advanced MCP Apps features selected, as it is by default, your AI app shows PubCoder’s plan on a card before it creates a project or makes large changes, then asks you whether to go ahead. With the option off, or in AI apps that don’t show cards, the AI app writes the plan in its reply and asks you in plain words.

Working with PubCoder from your AI app

Start a new chat in your AI app and ask for what you need in your own words, naming PubCoder so that the app knows where to work, for example:

  • “Create a new 10-page book in PubCoder titled ‘Nikola Tesla’s Inventions’, with cards about his most famous inventions”
  • “For each invention in the Tesla project open in PubCoder, create a small HTML game or experiment and put it in a Smart Object on the invention’s page, hidden at first and opened in a modal by a button”
  • “Apply the layout of the Tesla project open in PubCoder to the Einstein project”
  • “Make a PubCoder version of this PDF file. Don’t just import it with PubCoder’s PDF import: read the PDF, extract its text and images, then recreate the layout in a PubCoder project with all its pages and content”
  • “In PubCoder, add a quiz with 10 questions about the text of chapter 2”
  • “Add alternative text to every image in my PubCoder project that doesn’t have any”

The first time your AI app uses each of PubCoder’s tools, it may ask for your permission: allow it, or choose to always allow it if your app offers that option.

If PubCoder isn’t running when your AI app needs it, the app starts PubCoder in the background. PubCoder keeps your computer awake while it works for your AI app, and you can keep working in PubCoder meanwhile, watching the changes appear on the stage.

Choosing the project

Your AI app works on the projects open in PubCoder:

  • With one project open, it works on that project
  • With several projects open, “this project” or “the current project” is the project in front in PubCoder, the one whose window you used last. When it’s not clear which project you mean, your AI app asks you
  • It can open a project from your recent projects or from its file, and create a new project: it proposes the title, page size and other settings first, and creates the project once you confirm
  • It can copy pages, objects and layouts from one open project to another, with the assets they use, for example “copy the layout of page 3 of Our Solar System to every page of Planets for Kids”. If the two projects have different renditions, PubCoder may ask you how to copy them in its own window

Attaching files

You can attach images, documents and other files to your conversation, as you usually do in your AI app, so that the app can use them in your project. As with the AI Assistant, attaching a file doesn’t add it to your project: your AI app imports it into the Assets Library only when your request needs it (see Attaching files in the AI Assistant page).

Saving, undoing and exporting

Your AI app never saves your projects: save them in PubCoder when you’re happy with the result, choosing File ▹ Save from the menu bar (⌘S on Mac, Ctrl+S on Windows).

Each change made by your AI app is a regular step in the project’s undo history: to undo it, go to the project window in PubCoder and choose Edit ▹ Undo from the menu bar (⌘Z on Mac, Ctrl+Z on Windows) as many times as needed.

Your AI app can’t export your projects either, for now: like saving, exporting is done in PubCoder. When your project is ready, use the Export control of the project window (see Export your project).

Privacy and data

PubCoder’s MCP server only accepts connections from apps on your computer, using a key that PubCoder creates every time it starts.

To work on your project, your AI app sends what it reads from PubCoder to its AI provider, together with your requests: for example descriptions of your pages and objects, the text of your text boxes, and the pages and images it looks at. This data is handled by the provider according to the terms of your plan with that app.

PubCoder does not see your conversations with your AI app, only the operations the app asks it to perform. We only collect usage statistics for each AI app session: the app’s name and version, the number of operations and which tools were used, and how long the session lasted. We use them only to improve the product, and they never include your requests, your project content or your files.

The MCP server’s activity is recorded in the same log as the AI Assistant’s, which can be useful when contacting our support. Logs are stored in ~/Library/Application Support/PubCoder/ai/logs on Mac and in %APPDATA%\PubCoder\ai\logs on Windows. They are never sent automatically: you can send them yourself if our support team asks for them.

Limitations

  • Like the AI Assistant, your AI app does not export or preview your project, does not set up Read Aloud and does not change PubCoder’s settings. It does not save your project either: you do it in PubCoder
  • Results depend on your AI app and on the model it uses: always check the result, especially after large changes
  • Some AI apps stop a reply after a number of operations: ask the app to continue
  • PubCoder keeps an AI app from changing a project while PubCoder’s own AI Assistant is working on it, but not two AI apps from working on the same project at the same time: work on a project with one AI app at a time

Troubleshooting

PubCoder’s tools don’t appear in your AI app, or are out of date after you update PubCoder Restart the AI app, or start a new chat. In the MCP tab of Settings, check that the MCP server is on, then click the app’s tile to add PubCoder again
ChatGPT doesn’t use PubCoder Switch to Codex mode: PubCoder works only in ChatGPT’s Codex mode, not in its regular chats
The AI app says that PubCoder’s MCP server is turned off Select Enable MCP server to allow AI agents to work with PubCoder in the MCP tab of Settings, see Turning on the MCP server
The AI app says that PubCoder Pro, or a valid subscription, is needed Sign in to PubCoder with a subscription that includes PubCoder Pro, or try PubCoder Pro for 7 days, see Setting up the MCP server
The AI app says that PubCoder is not running or did not answer Open PubCoder and check that no dialog is waiting for an answer, then ask again
The AI app says that PubCoder’s AI Assistant is working on the project Wait until the AI Assistant has finished, or stop it, then ask again
PubCoder says that the AI app is not installed on this computer Install the AI app and open it once, then click its tile again
The AI app asks for permission every time it uses a tool Choose the app’s option to always allow PubCoder’s tools. Some apps ask again in every new chat or after an update
PubCoder opens a window asking you to choose files Your AI app needs a file it can’t find on your computer, for example one you attached in the Chat tab of Claude: choose it in the window. To use a file the AI app created, download it first
The AI app stops in the middle of a long job Ask it to continue

If you need help, contact us and attach the AI Assistant logs (see Privacy and data).