IntegrationsLocal Bridge

Local Bridge

Use the PanelWave local bridge so desktop assistants can read your scripts, upload whole folders of panel artwork, and import finished pages, CBZ archives and PDFs from your computer.

Hosted assistants can't see the files on your computer. The local bridge closes that gap. It is a small open-source program (@panelwave/mcp, MIT license) that your desktop assistant starts in the background. It passes every PanelWave tool through unchanged and adds four tools that work on folders you allow:

ToolWhat it does
pw_local_list_filesLists files in a folder, with size, type and image dimensions. Supports patterns such as *.png, and sorts panel-2 before panel-10.
pw_local_read_textReads a script, screenplay (.fountain) or outline so the assistant can turn it into a work.
pw_local_upload_filesUploads images, videos, audio, fonts and — from bridge 0.2.0 — documents (PDF, Office, OpenDocument, RTF, EPUB, ZIP) for download widgets into a work's asset library, optionally into a folder.
pw_local_import_pagesFrom bridge 0.5.0: imports finished comic pages — page images, CBZ/ZIP archives and PDFs, for example a chapter from an AI comic generator — into a Page Import, waits until the server has unpacked them and starts the panel detection. With editable lettering the balloons painted into the pages become editable PanelWave balloons.

The files go straight from your computer to PanelWave's storage. They never pass through the AI model, so large videos are no problem.

A folder of more than about 30 files reaches the per-minute upload limit. From bridge 0.2.1 the upload waits as long as the server asks and carries on (up to six times per file), so the whole folder arrives; older bridges reported the remaining files as RATE_LIMITED. npx -y @panelwave/mcp picks up the new version on the next start.

The bridge is published on npm as @panelwave/mcp (MIT license); the source is in panelwave/packages. npx downloads it on first use, so there is nothing to install by hand.

The bridge only reads inside the folders you list in PANELWAVE_ALLOWED_DIRS. Anything outside, including through shortcuts or symbolic links, is refused, and so are hidden files such as .ssh or .env. It never changes or deletes files on your computer.

Set it up

The bridge can set itself up: run npx -y @panelwave/mcp@latest setup in the folder with your scripts and artwork (or paste the one-line prompt from Home → Connect an AI assistant into your coding agent). It signs you in through an approval page, writes the token and the folder into your clients' configuration and never shows the token. See Get started with your AI assistant. Claude Desktop users can install the extension bundle instead. The steps below are the manual way.

Install Node.js

Install Node.js 20 or newer. The bridge runs with npx, which comes with Node.js.

Create an access token

In PanelWave, open Profile → Connected apps & access tokens, click New access token, and tick at least works:read, works:write, assets:read and assets:write. Copy the token; it starts with pw_pat_ and is shown only once. See Access tokens.

Add the bridge to your assistant

Use the configuration for your client below. Set PANELWAVE_ALLOWED_DIRS to the folder with your scripts and artwork.

Restart and test

Restart the client and ask: "List the files in my comics folder."

Open Settings → Developer → Edit Config and add:

{
  "mcpServers": {
    "panelwave": {
      "command": "npx",
      "args": ["-y", "@panelwave/mcp"],
      "env": {
        "PANELWAVE_TOKEN": "pw_pat_…",
        "PANELWAVE_ALLOWED_DIRS": "/Users/me/comics"
      }
    }
  }
}

On Windows, write the folder as "C:\\Users\\me\\comics". If Claude Desktop can't find npx, use "command": "cmd" with "args": ["/c", "npx", "-y", "@panelwave/mcp"]. Restart Claude Desktop afterwards.

Cowork uses the same configuration. Point PANELWAVE_ALLOWED_DIRS at the folder you give Cowork to work in.

If you use the bridge, you don't need the remote PanelWave connector in the same client as well. The bridge already includes all its tools.

Settings

VariableDefaultMeaning
PANELWAVE_TOKENrequiredYour personal access token.
PANELWAVE_ALLOWED_DIRSnoneFolders the bridge may read. Separate several with ; on Windows and : on macOS and Linux. Without it the local tools are off. A drive root or your whole home folder is refused.
PANELWAVE_MCP_URLhttps://mcp.panelwave.org/mcpThe PanelWave server. Only change it if PanelWave support asks you to.

Folders can also be passed as plain arguments after the command (npx -y @panelwave/mcp /Users/me/comics); they are added to PANELWAVE_ALLOWED_DIRS. The Claude Desktop extension uses this for the folders you pick in its form.

From a script and a folder to a work

Say your folder comics/rooftop holds script.md and a panels folder with panel-01.png to panel-12.png. Ask the assistant step by step:

  1. "Read rooftop/script.md and turn it into a PanelWave work, one panel per shot, with mobile and A4 pages." It reads the script, drafts an outline, shows you a dry run, and creates the work.
  2. "Upload rooftop/panels into that work, into a folder called Panels." Files already in your library are reused, so repeating this after an interruption only uploads what is missing.
  3. "Attach panel-01 to the first panel, panel-02 to the second, and so on." Each panel fits itself to its image on every page format.
  4. "Check the work." The validation lists anything still missing. Open the work in the editor to review it.

From a CBZ or PDF to an interactive work

Say comics/lantern holds chapter-01.cbz exported from a comic generator, with Japanese lettering:

  1. "Import comics/lantern/chapter-01.cbz as a new work called Lantern, manga reading order, and make the lettering editable — it's Japanese." The bridge checks each file by its content (not its name), uploads it straight to storage (big files in parts), waits while the server unpacks the archive and starts the panel and balloon detection.
  2. "Show me what the detection found." The assistant reads the import's status: pages, panels and the balloon texts per page, with the AI's warnings. Ask it to fix a balloon text or remove a stray panel — or open the import in the CMS and review it there (moving and resizing panels and balloons is easiest by hand).
  3. "Import it." The work is built: panels cropped, pages laid out, the balloons placed as editable PanelWave balloons.
  4. "Translate it to German and English, and publish a preview." From here every other PanelWave tool works on the new work.

The guide walks through the whole route, in the CMS and with an assistant.

How uploads behave

  • No duplicates. Each file is fingerprinted first. Files already in the library, or twice in one batch, are not uploaded again.
  • Resumable. If an upload fails, run it again. Finished files are recognised and skipped.
  • Large files in parts. Files of 10 MB or more upload in parts, and each part is retried on failure.
  • Folders. Name a folder such as Chapter 1/Panels; missing folders are created.
  • Warnings. The result lists each file with its status and warnings, for example an image over 5 MB that needs optimizing before publishing. Validation can fix that for you.

Troubleshooting

ProblemWhat to do
The client shows no PanelWave toolsCheck that Node.js 20 or newer is installed and that the configuration is valid JSON. The client's MCP log shows the bridge's messages.
"PanelWave rejected PANELWAVE_TOKEN"The token expired, was revoked or was mistyped. Run npx -y @panelwave/mcp setup --renew, or create a new token and update the configuration. npx -y @panelwave/mcp doctor checks the token, the folders and the server in one go.
"… is outside the folders this bridge may read"Add the folder to PANELWAVE_ALLOWED_DIRS and restart the client.
Only the local tools workPanelWave is unreachable, for example while you are offline. The bridge keeps retrying and adds the PanelWave tools once it connects.

For developers

  • Errors come back as tool results with isError: true and { code, message }. The bridge's own codes are UNAUTHENTICATED (token rejected), UPSTREAM_UNAVAILABLE (PanelWave or storage unreachable), INVALID_INPUT (for example a path outside the allowed folders), NOT_FOUND and PRECONDITION_FAILED (for example a binary file for pw_local_read_text). Codes of the hosted tools, such as QUOTA_EXCEEDED or PERMISSION_DENIED, pass through unchanged, also inside upload rows.
  • Options: pw_local_read_text cuts files at 1 MiB and flags them truncated (maxBytes up to 5 MiB). pw_local_upload_files takes folderName, tags, concurrency (3 by default, up to 6) and skipDuplicates: false to get a CONFLICT row instead of reusing an existing asset. pw_local_import_pages takes paths (in reading order, up to 250 files; folders are refused, CBR archives too), workTitle or workId + chapterId to append, readingDirection, pageFormat, lettering (keep | editable), sourceLocale, detect (default on) and waitSeconds (240 by default, up to 900); when unpacking takes longer it returns with status: "expanding" and the next step to call (pw_import_pages_status, then pw_import_pages_detect).
  • Security: PANELWAVE_MCP_URL must use https (plain http only for localhost). Paths are checked as text before the file system is touched, and network paths such as \\server\share are refused. The token is sent only to the PanelWave server, never to the storage upload URLs, and uploads go only to https storage.
  • Prompts and resources of the hosted server pass through unchanged (prompts/list, prompts/get, resources/*), like the tools.
  • MCP Apps pass through as well (bridge 0.5.0, on MCP SDK 2.4): a tool's _meta.ui (resourceUri, visibility: ["app"]), the ui://panelwave/player page with its CSP metadata and the page's own calls of app-only tools such as pw_preview_manifest reach your client untouched. So an app that supports the MCP Apps extension can show the player in the chat through the bridge, as it does with the hosted connector.
  • The setup command (panelwave-mcp setup, bridge 0.3.0+) talks to the CMS API, not to the MCP server: POST /oauth/device starts a device approval (RFC 8628 shape: device_code, user_code, verification_uri_complete, interval), POST /oauth/device/token is polled until the person approved on /connect/approve, and the minted personal access token is written into the client configuration. A request that the command could not store is revoked through POST /oauth/device/discard. The pending request is kept in ~/.panelwave/pending.json so a second run resumes it. Exit codes: 0 configured (or pending with --no-wait), 1 denied or invalid arguments, 2 expired, 3 refused by PanelWave (paused, limits), 4 token not stored. For a self-hosted or development API, --app, --api and --route-style query (or PANELWAVE_APP_URL, PANELWAVE_API_URL, PANELWAVE_API_ROUTE_STYLE) point it elsewhere; PANELWAVE_AGENT=1 forces the agent-mode output. setup --json, status --json and doctor --json print one JSON object for scripts; the token itself is never part of any output.
  • panelwave-mcp --version prints the version and --help a short usage. Diagnostics go to stderr, which your client shows in its MCP log.