# Let an agent write drafts

Your docs can be written by the AI you already talk to. Connect Claude or ChatGPT to your workspace once – a login and an **Allow** button, no keys, no code – and from then on you can ask it in plain words: _"write up our refund process from the notes I just gave you."_ The page appears in your dashboard as a draft, callouts and numbered steps included.

Everything an agent writes is governed by four rules that have no exceptions:

*   **Drafts only.** New pages arrive as drafts, and only draft pages can be edited. An agent cannot publish, unpublish, or touch a live page in any way.
*   **History first.** When an agent edits an existing page, the previous version is saved to [Page History](/docs/managing-pages/page-history) before anything changes.
*   **Sanitized on the way in.** Script handlers and unsafe embeds are stripped before storage.
*   **Visible and revocable.** The connection appears under **API keys** as its own key, and revoking it disconnects the agent immediately.

## Connect Claude

1.  In your dashboard, open **API & Agents → Connect agents** and copy the **Write connector URL** – it ends in `/mcp-rw`.
2.  In Claude, open **Settings → Connectors → Add custom connector** and paste it.
3.  Claude opens your Dewstack login. Sign in if you are not already.
4.  An approval screen asks: **"Allow Claude to write drafts?"** – naming the workspace it will write into. Press **Allow**.

That is the whole setup. Ask Claude to write, and check your dashboard for the drafts.

![](https://res.cloudinary.com/dstack/image/upload/v1786093597/connect-agents-tab_hkjz8z.png)API & Agents screen: place where you access everything   
related to agents and apis

![](https://res.cloudinary.com/dstack/image/upload/v1786092629/consent-allow-claude_v11mxf.png)Dewstack's approval screen: Allow Claude to write drafts? Everything it writes arrives as a draft. It connects through its own API key. Revoke at any time.

  

Only Owners and Admins can approve.

The approval screen is shown behind your normal Dewstack login, and only account **Owners** and **Admins** can approve a connection. If a teammate without that permission tries, the request is refused and no access is granted.

## Connect ChatGPT

The same URL works in ChatGPT as a **developer mode** connector – choose OAuth when asked, and the same Dewstack approval screen opens.

OpenAI limits write-capable connectors to developer mode; ChatGPT's regular connector surface [reads your docs](/docs/api-and-agents/mcp) but cannot write.

## Coding agents: Claude Code and Cursor

Agents that run from a config file skip OAuth and carry a key instead:

1.  Create a key with **Read and write** access on the **API keys** tab – see [API keys](/docs/api-and-agents/api-keys).
2.  Add the write endpoint and the key as a header. For Cursor, in `.cursor/mcp.json`:

{ "mcpServers": { "acme-docs": { "url": "[https://docs.acme.com/mcp-rw](https://docs.acme.com/mcp-rw)", "headers": { "Authorization": "Bearer dsk\_your-write-key" } } } }

The **Connect agents** tab renders this snippet with your URL filled in.

## What the agent can do

With write access, the four read tools are joined by three write tools and two signal tools:

| Tool | What it does |
| --- | --- |
| create_collection | Creates a new collection |
| create_article | Creates a page, as a draft |
| update_article | Edits a draft's title or body – the old version goes to history first |
| list_content_gaps | What readers searched for and did not find, and questions the assistant could not answer, with counts |
| list_stale_pages | Published pages untouched past a threshold, so the agent can flag what may be out of date |

The signal tools close the loop: ask your agent what the docs failed to answer, and it reads the same gap list your dashboard shows – then drafts the missing pages. Signal availability follows your plan's analytics tier. Agents are handed Dewstack's docs dialect when they connect, so what comes back has callouts, numbered step blocks, tables and video embeds rather than a wall of prose.

## Reviewing what an agent wrote

Drafts land in the editor's page tree like any other draft, marked **Draft**. Read it, edit it if you like, and **Save as → Publish** when it is right. If you want an agent to rework a page that is already live, unpublish it first – the agent is refused otherwise, and will tell you so. Every agent edit's previous version is in **Page History**, attributed to the connection's key name – for example _Claude connector – agent update_ – and one click restores it.

## Limits

*   Each connection or write key can make **500 writes per day**. An agent stuck in a loop stops on its own.
*   Write access requires the workspace to be **Public**, same as the read endpoint.
*   Every write, and every refused write, is recorded against the key that made it.

## If the connection misbehaves

Revoke its key on the **API keys** tab. The next request the agent makes is refused, immediately. Nothing it wrote disappears – drafts stay drafts, published pages keep their history – so revoking is always safe to do first and investigate second.

## Related

 [API keys Scopes, daily limits, rotation and revocation.](/docs/api-and-agents/api-keys)   [Page History Every version an agent replaced, one click from restored.](/docs/managing-pages/page-history)
