Typora MCP
You can inspect, debug, and safely automate a local Typora instance through MCP tools, including bridge setup, renderer inspection, controlled UI actions, fixtures, diagnostics, and debug event capture.
Discover Typora processes, renderer targets, capabilities, and bridge installation state.
Explicitly install/uninstall the reversible renderer bridge and manage MCP-owned Typora instances via launch, close, restart, open document, and reload.
Inspect Typora with structured snapshots, DOM/text/accessibility reads, CSS selector queries, element details, and saved Markdown source hashes.
Perform controlled actions such as click, type, press_key, and scroll; editor typing requires explicit source-edit opt-in.
Run declarative JSON fixtures and write separate evidence.
Start, finish, report, and clean up Flight Recorder diagnostic runs.
Read console logs, JavaScript errors, and network requests; enable/disable temporary fetch/XHR capture; clear debug events.
Use arbitrary CDP commands and screenshots only when the selected backend supports them.
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., "@Typora MCP check Typora status and tell me if the bridge is installed"
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.
Typora MCP
A local-first MCP server for inspecting, debugging, and safely automating a running Typora instance through an opt-in renderer bridge.
This is an independent community project. It is not affiliated with or endorsed by Typora, Anthropic, or OpenAI.
Highlights
One local MCP server for Codex and Claude Code.
Reversible renderer bridge for live DOM, styles, source hashes, console events, and fixture evidence.
Structured snapshots and short-lived element refs instead of coordinates.
Isolated fixture runs that prove Markdown source was not changed.
Related MCP server: Chrome Live MCP
Requirements
Node.js 20 or newer.
A local Typora installation.
Permission to modify Typora resources only when you explicitly install the bridge.
Install from source
git clone https://github.com/DoubleW2w/typora-mcp.git
cd typora-mcp
npm install
npm run buildThis project does not publish an npm package yet. Your client starts the built local checkout.
Connect Codex
codex mcp add typora -- node "<absolute-path-to-typora-mcp>/dist/src/index.js"
codex mcp listOr use your Codex configuration:
[mcp_servers.typora]
command = "node"
args = ["<absolute-path-to-typora-mcp>/dist/src/index.js"]
cwd = "<absolute-path-to-typora-mcp>"
[mcp_servers.typora.env]
TYPORA_PATH = "D:\\Typora\\Typora.exe"
TYPORA_BACKEND = "standalone"Plugin distribution status
This source-release version supports the official Codex and Claude Code MCP configuration formats, but is not yet a remote one-click plugin. A marketplace cache does not include this project's Node dependencies. Use the source install above, then add the local STDIO server directly.
A remote Codex/Claude plugin will be released after this project ships either an npm package or a GitHub Release bundle containing its runtime dependencies.
Connect Claude Code
From your cloned repository, run:
claude mcp add typora -- node "<absolute-path-to-typora-mcp>/dist/src/index.js"
claude mcp get typoraThe committed .mcp.json is a project-scoped Claude Code configuration. It starts the built dist/src/index.js from the local checkout root.
Install or update the bridge
Installing the MCP server does not change Typora. First ask the MCP client:
Check Typora bridge status. If it is not installed, install it.The explicit typora_install_bridge tool backs up window.html once, adds a marker-scoped deferred script loader, writes typora-mcp-bridge.js, and requires a normal Typora restart. typora_uninstall_bridge removes only this project's marker block and bridge script.
First prompt
Check Typora status, then explain whether the standalone bridge is installed,
connected, and safe to use for the current document.Tool overview
Category | Tools | Purpose |
Discovery | typora_status, typora_capabilities, typora_bridge_status | Find Typora, targets, bridge state, and supported operations. |
Bridge lifecycle | typora_install_bridge, typora_uninstall_bridge | Explicit marker-scoped bridge management. |
Inspection | typora_snapshot, get_dom, query_selector, get_element, typora_get_document_source | Inspect renderer state, DOM, styles, and source hashes. |
Safe actions | click, type, press_key, scroll | Operate DOM controls; editor typing requires explicit allowSourceEdit opt-in. |
Lifecycle | typora_launch, typora_close, typora_restart, typora_open_document | Manage MCP-owned Typora instances. |
Fixtures | typora_run_fixture | Run read-only JSON fixtures and write separate evidence. |
Flight Recorder | typora_diagnostic_start, typora_diagnostic_status, typora_diagnostic_finish, typora_diagnostic_report, typora_diagnostic_cleanup | Record a local redacted timeline and retain compressed diagnostic archives. |
Debug evidence | get_console_logs, get_javascript_errors, get_network_requests | Read cursor-based events. |
Debug capture | typora_enable_debug_network_capture, typora_disable_debug_network_capture | Temporarily capture fetch/XHR traffic. |
Optional capabilities are declared by typora_capabilities. Standalone mode does not provide screenshots or external CDP. execute_javascript appears only when Debug Mode and its separate token are configured.
Fixtures and evidence
Fixtures live below TYPORA_MCP_FIXTURE_ROOT. Each default run starts an isolated MCP-owned Typora profile. Evidence is written below TYPORA_MCP_EVIDENCE_ROOT/runId:
run.json
source.json
snapshot.json
events.json
assertions.json
screenshot.png when supported and requested
npm test npm run test:live
Flight Recorder
Start a named run before reproducing a bug:
Start a Typora diagnostic run named "menu-click-no-response".Then ask the agent to reproduce and investigate the problem. End with:
Finish the current Typora diagnostic run, then return its diagnostic report.The recorder stores a local redacted timeline under %LOCALAPPDATA%/typora-mcp/diagnostics by default. Full run directories remain for 14 days; older runs are compressed into dated archives and retained. When archives exceed 2 GB, MCP reports a storage warning without deleting evidence.
Security and limits
The bridge listens only on 127.0.0.1 and authenticates every call with a local token.
Bridge installation is explicit and reversible.
Normal mode does not expose arbitrary JavaScript evaluation.
Network capture is off by default and restores original fetch/XHR functions.
Editor typing is disabled by default. Install the standalone bridge with
allowSourceEdit: trueto enable it, then open a new Typora window (or restart Typora normally).typora_capabilitiesreportssourceEditfor each window. The existingtypebehavior is unchanged:cleardefaults totrueand replaces the target element's contents. Useclear: falseto insert at the caret or replace the current text selection. Fixtures always reject editor input, even whenallowSourceEditis enabled. Existing windows keep their previous setting. This option does not enable arbitrary JavaScript or change other backends.Diagnostic traces omit bridge tokens, Markdown bodies, input text, and arbitrary JavaScript expressions by default.
Repository layout
src/ MCP server, bridge, fixtures, and adapters
test/ Unit and live Typora verification
docs/specs/ V1 product contract
.mcp.json Project-scoped Claude Code MCP configurationContributing
Issues and pull requests are welcome. Include a focused reproduction or fixture for behavior changes. Never commit Typora installation files, tokens, or local evidence.
License
Available Tools
28 toolsclear_debug_eventsADestructiveIdempotent
Clear captured debug events for one renderer or all renderers without resetting sequence numbers.
Inputs: targetId.
clickBDestructive
Click a visible element through Playwright/CDP; pass index when the selector matches more than one.
Inputs: ref, index, selector, targetId, +1 more.
get_console_logsCRead-only
Read captured console events, optionally only those after a previous sequence number.
Inputs: limit, levels, afterSeq, targetId.
get_domCRead-only
Read bounded HTML, visible text, or an accessibility snapshot from Typora.
Inputs: ref, format, maxChars, selector, +2 more.
get_elementCRead-only
Inspect one element's attributes, geometry, computed styles, accessibility, and event listeners.
Inputs: ref, index, selector, targetId, +4 more.
get_javascript_errorsCRead-only
Read captured uncaught errors and unhandled promise rejections.
Inputs: limit, afterSeq, targetId.
get_network_requestsCRead-only
Read captured request, response, and failure events; response bodies are opt-in and bounded.
Inputs: limit, afterSeq, targetId, urlPattern, +2 more.
press_keyCDestructive
Press a Playwright key on a selected element or the active page.
Inputs: key (required), ref, index, selector, +2 more.
query_selectorBRead-only
List concise, serializable summaries for elements matching a CSS selector.
Inputs: selector (required), limit, targetId.
scrollC
Scroll an element or the selected Typora page by a pixel delta.
Inputs: deltaY (required), ref, deltaX, selector, +2 more.
send_cdp_commandADestructive
Send an arbitrary Chrome DevTools Protocol command when the selected backend exposes CDP; standalone mode does not.
Inputs: method (required), params, targetId.
take_screenshotBRead-only
Capture the selected Typora page or one matching element as a PNG image.
Inputs: fullPage, selector, targetId.
typeCDestructive
Enter text into a selected Typora element through Playwright/CDP.
Inputs: text (required), ref, clear, index, +3 more.
typora_bridge_statusBRead-only
Inspect the explicit standalone renderer bridge installation without changing Typora.
Inputs: executablePath.
typora_capabilitiesARead-only
Read the selected Typora target's explicitly supported debugging and automation capabilities before invoking an optional operation.
Inputs: targetId.
typora_closeADestructiveIdempotent
Close Typora normally so unsaved prompts can appear; force termination only when force is true.
Inputs: force.
typora_disable_debug_network_captureADestructiveIdempotent
Restore the target's original fetch/XHR functions after explicit debug network capture.
Inputs: targetId.
typora_enable_debug_network_captureADestructiveIdempotent
Explicitly enable temporary fetch/XHR network capture for one standalone target. It does not cover IPC, WebSocket, or every internal network channel.
Inputs: targetId.
typora_get_document_sourceBRead-only
Read the current saved Markdown source through the standalone bridge without modifying it; use its sourceHash to prove renderer-side code did not rewrite the file.
Inputs: maxChars, targetId.
typora_install_bridgeADestructiveIdempotent
Explicitly back up Typora window.html and install the standalone local renderer bridge. Restart Typora afterward to load it.
Inputs: token, registryDir, executablePath.
typora_launchCIdempotent
Find and launch Typora with CDP enabled, then wait until a renderer is ready.
Inputs: filePath, debugPort, extraArgs, userDataDir, +2 more.
typora_open_documentBDestructive
Open an existing Markdown document in the selected renderer and wait until Typora confirms its path. Fixture validation uses a stricter MCP-owned launch flow.
Inputs: path (required), targetId.
typora_reloadADestructiveIdempotent
Reload the selected Typora renderer when the selected backend supports safe renderer reload. Standalone mode refuses location.reload; use typora_restart for MCP-managed instances.
Inputs: targetId, ignoreCache.
typora_restartADestructiveIdempotent
Restart only a Typora instance launched by this MCP server. It never restarts an externally launched instance that might have unsaved work.
Inputs: no named parameters.
typora_run_fixtureADestructive
Run a declarative JSON fixture from the configured fixture root and write separate evidence. Shared targets require explicit opt-in and are never closed or restarted.
Inputs: fixturePath (required), targetId, allowSharedTarget.
typora_snapshotBRead-only
Create a bounded structured renderer snapshot with a short-lived snapshotRef and revision; prefer this over returning complete HTML.
Inputs: limit, maxNodes, selector, targetId, +2 more.
typora_statusARead-only
Inspect Typora processes, CDP connectivity, renderer windows, current file, and latest debug event sequence.
Inputs: no named parameters.
typora_uninstall_bridgeADestructiveIdempotent
Remove only the Typora MCP bridge injection and its bridge script. The first pre-install backup is retained.
Inputs: executablePath.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 28 tools
Most tools target clearly distinct purposes (lifecycle, bridge management, debug capture, interaction). There is mild overlap among the DOM-reading group (get_dom, typora_snapshot, query_selector, get_element), but descriptions explicitly steer between them (snapshot preferred over full HTML), so an agent can disambiguate.
Nearly all tools follow a verb_noun convention, which is readable and predictable. The main deviation is the inconsistent presence of the typora_ prefix: some tools are prefixed (typora_status, typora_launch) while others are bare (get_dom, click, type), so the namespace is split across two styles.
At 28 tools this is on the heavy side for a single-application automation server. The surface is defensible given the breadth (process control, bridge, DOM, CDP, debug, interaction), but several tools could plausibly be consolidated, pushing it above the well-scoped 3-15 range.
Coverage spans process lifecycle, bridge install/uninstall, document opening, source reading, DOM inspection, CDP, debug event capture, and user interactions like click/type/scroll/screenshot. Gaps exist (no explicit document save or new-document creation), but core workflows are well covered.
Maintenance
Related MCP Connectors
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
remote debug iOS/Android/Unity/Godot/Flutter/RN/Web on real-device.ui-tree/screenshots/taps,tests.
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Live browser debugging for AI assistants — DOM, console, network via MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects to Obsidian's Electron process via Chrome DevTools Protocol, enabling AI assistants to screenshot, execute JavaScript, capture console logs, and automate UI actions for debugging plugins and testing layouts.ISC
- AlicenseNot gradedqualityBmaintenanceConnects local stdio MCP servers to an existing Chrome 144+ session, preserving the user's signed-in sessions, cookies, tabs, and extension environment without launching a second browser. It provides tab control, semantic snapshots, screenshots, pointer, keyboard, form selection, scrolling, navigation, and waiting tools.MIT
- AlicenseDqualityBmaintenanceConnects to an already-running Chrome/Chromium instance over CDP and exposes 75 browser-automation tools over newline-delimited MCP JSON-RPC on stdin/stdout, covering navigation, forms, keyboard/mouse input, screenshots, cookies, storage, tabs and frames, assertions, and retry/batch/step composition. It does not launch a browser itself, requiring a localhost debugging port on the existing instance.75MIT
- AlicenseNot gradedqualityBmaintenanceExposes browser tabs to any MCP client through a local broker, letting agents discover pages, take text snapshots with numbered elements, and drive them via click, type, navigate, eval, network/log inspection, and screenshots. Supports stdio, Streamable HTTP, and SSE transports so IDE and CLI agents can orchestrate browser automation.MIT