Sigil MCP Bridge
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Sigil MCP Bridgeread the first XHTML file in the open EPUB and show its hash"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Sigil MCP Bridge
Connects Codex and other Model Context Protocol clients to the EPUB currently open in Sigil.
The recommended external-editor mode runs in the background, keeps Sigil usable and edits only existing textual resources. Reads return a SHA-256 hash; writes require that hash and are rejected if the file changed in the meantime.
Requirements
Windows 10 or later for the background external-editor launcher
Sigil 2.x
Python 3.8 or later for the MCP server (Sigil already bundles Python)
Node.js 18 or later only when installing the MCP server from npm
The modal BookContainer plugin is also included and supports the platforms supported
by Sigil, but it blocks the editor while its window is open.
Related MCP server: hledit-mcp
Install the non-modal Sigil bridge
Download
Sigil-MCP-Bridge_v0.2.0.zipfrom the GitHub release and extract it to a permanent directory.In Sigil, open Preferences > General Settings > Preferred external XHTML editor and select
SigilMCPExternal.exe.Open an EPUB and press F2 once. The bridge starts invisibly on
http://127.0.0.1:8765.
Opening the external editor in another EPUB replaces the previous bridge instance, so
only the most recently activated book is exposed. If Sigil uses a portable installation
and Python is not found automatically, set SIGIL_PYTHON to Sigil's python3.exe.
Configure an MCP client
npm
[mcp_servers.sigil]
command = "npx"
args = ["-y", "sigil-mcp-bridge"]
[mcp_servers.sigil.env]
SIGIL_BRIDGE_URL = "http://127.0.0.1:8765"Python directly
[mcp_servers.sigil]
command = "python3"
args = ["/absolute/path/to/sigil-mcp-bridge/mcp_server/sigil_mcp.py"]
[mcp_servers.sigil.env]
SIGIL_BRIDGE_URL = "http://127.0.0.1:8765"For a Codex process running in WSL, use Sigil's Windows python3.exe as the command if
WSL cannot reach the Windows loopback address.
Tools
sigil_healthsigil_book_infosigil_list_filessigil_selected_filessigil_read_filesigil_searchsigil_write_file
The external mode does not add or remove manifest entries. Use the modal
SigilMCPBridge plugin for future structural operations. Avoid editing the same XHTML
simultaneously in the agent and Sigil's Code View.
Optional local token
The service binds only to 127.0.0.1 and rejects browser-originated requests. To also
require a bearer token, set the same SIGIL_BRIDGE_TOKEN value in the environment that
launches Sigil and in the MCP server configuration.
Modal plugin
Install SigilMCPBridge_v0.2.0.zip through Plugins > Manage Plugins. This mode uses
Sigil's BookContainer API and intentionally keeps a plugin window open while active.
Build and test
Compile the Windows launcher with Windows PowerShell:
.\build.ps1Run the dependency-free integration tests:
python test_bridge.py
python test_external_bridge.pyCreate and inspect the npm package:
npm pack
npm publish --dry-runValidated with Sigil 2.6.2, Python 3.13.2, Node.js 20 and PySide6 6.8.2.1.
License
MIT © 2026 Studio Agartha.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read and write shared BitsWeave context, projects, tasks, and work sessions through MCP.
Create, edit, preview, publish, and manage web pages from MCP-capable AI clients.
Browse and manage files in your Moxt AI workspace from any MCP client.
Publish and manage existing HTML presentations from an MCP-capable Agent.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides hashline-based file editing using line-addressed edits and content hashes for integrity verification. It enables LLMs to perform precise file modifications while ensuring edits are rejected if the file content has changed since the last read.20 npm9MIT
- AlicenseAqualityDmaintenanceExposes hash-anchored file edits to MCP-compatible AI coding agents, enabling safe read and write operations with stale edit detection.156 npm1MIT
- FlicenseAqualityCmaintenanceProvides file read, edit, and write operations with exact-match editing and hash-based consistency checks, designed for models that prefer structured schemas over patch grammars.3-
- AlicenseNot gradedqualityCmaintenanceLets MCP clients search, read, create, append, replace, move, and batch-update local Markdown notes safely, with conflict detection via SHA-256 and optional managed update blocks, without requiring a vector database.MIT