---
title: Let AI write straight into the editor (WebMCP)
head_title: Let AI write into the editor (WebMCP) — Markdown Editor
nav: AI writing (WebMCP)
order: 6
description: AI assistants that support WebMCP can write Markdown straight into this editor instead of printing it in a narrow chat window. What the four tools do, which clients work today, and the three things it deliberately won't do.
updated: 2026-08-28
---

## The short version

If your AI assistant supports **WebMCP**, it can **write Markdown straight into this editor**
and you read it in the live preview on the right — no more copying it out of a chat window
paragraph by paragraph.

## What it solves

Ask an AI to write a document and the output is usually stuck in a chat window: the column is
narrow, tables get squeezed, you have to select and copy it yourself, and then reflow it after
pasting. The longer the document, the worse it gets.

WebMCP changes **where the output goes**. The AI no longer prints a copy for you to read —
it writes into the editor. The width limit disappears, the live preview just works, and you
edit whichever paragraph you want in place.

## What you need

WebMCP is a draft web standard at the W3C (edited by Microsoft and Google) and still
experimental, so support will keep moving. Where things stand today:

| Client | Status |
| --- | --- |
| Codex / the browser built into the ChatGPT desktop app | **Works as-is**, no setup |
| Chrome 149 and later | Works — this site is enrolled in Chrome's trial through 2026-11-17 |
| Edge 150 and later | Also in trial, but through Microsoft's own enrolment, which this site has not joined |
| Firefox / Safari | Not supported yet |

On a browser that doesn't have it, the whole thing **silently does not exist** and every other
part of the editor behaves exactly as before.

## The four tools the AI can see

| Tool | What it does |
| --- | --- |
| `mdeditor_get_outline` | Reads the heading outline and length of the current document |
| `mdeditor_get_document` | Reads the whole document, or just one named section |
| `mdeditor_set_document` | Writes content (replace everything / append / prepend) |
| `mdeditor_replace_section` | Rewrites only the section under one heading |

## How to use it

1. Open [the editor](/mdeditor) in a client that supports it
2. Just say what you want — for example, "turn these meeting notes into structured Markdown and
   write it into the editor"
3. A toast appears at the bottom of the screen when the AI writes, and the preview updates

For long documents, ask it to change one section only. The AI will switch to
`mdeditor_replace_section`, which leaves every other word untouched — much safer than
resending the whole file.

## Three things it deliberately won't do

**It won't save for you.** The AI only writes into the editor; the file on disk is still yours to
save with `Ctrl+S`. Overwriting the original is irreversible, so that keystroke stays with a human.

**It won't send your files anywhere.** All four tools run inside your browser. There is no
backend and no upload. The AI can read the document currently open in the editor — not your
whole folder.

**It won't lose your work.** Writing goes through the browser's native editing operation, so
`Ctrl+Z` still undoes it. If you think the AI made things worse, just undo.

## One detail: hard line breaks inside paragraphs get joined back up

AI models often insert their own line breaks around 70–80 characters. That **doesn't affect the
preview** — a single newline inside a Markdown paragraph never becomes a line break — but once
you save the file, line widths are ragged and changing one sentence means hunting across lines.

So on write, hard breaks **inside paragraphs** are joined back up. Code blocks, tables, lists,
headings, YAML front matter, and the hard breaks you typed on purpose (two trailing spaces or a
backslash) are all left alone. No stray space appears between CJK characters, and one is added
at a CJK/Latin boundary.

If you don't want any of this, ask the AI to pass `unwrapHardBreaks: false` and the text is
written exactly as sent.

> WebMCP is still an experimental web standard; both the spec and browser support may change.
> Nothing else in this editor depends on it — without it, everything works as before.
