Write WordPress Posts in Cursor and Send Them as Drafts
Plenty of people already write in Cursor: developer blogs, documentation, changelogs, product posts. The text lives in a folder of Markdown files, which is great, right up until it has to go into WordPress.
DocxToWP Pro 1.6.0 connects Cursor to your site. You ask the Agent to send a file, or to write a new post, and it arrives in WordPress as a formatted draft.
What you need
- WordPress with DocxToWP Pro 1.6.0 or later, licence active.
- Cursor, with the Agent chat.
- An administrator account on the site, to switch the connection on.
Step 1: Create a key
In WordPress, open DocxToWP Pro → AI Agents. Switch the connection on and save. Then open Keys and create one called Cursor. Copy it straight away, because it is shown only once.
Step 2: Add DocxToWP to mcp.json
Cursor reads its connections from a file called mcp.json:
- For one project:
.cursor/mcp.jsoninside the project folder. - For every project:
~/.cursor/mcp.jsonin your home folder.
Copy the snippet from Connect apps → Cursor in WordPress. It looks like this:
{
"mcpServers": {
"docxtowp": {
"url": "https://your-site.com/wp-json/docxtowp/v1/mcp",
"headers": {
"Authorization": "Bearer dwpk_…"
}
}
}
}
If you use the project file, add .cursor/mcp.json to .gitignore. It holds
your key, and a key belongs in your own files, not in a shared repository.
Step 3: Check it
Open Cursor Settings → MCP. DocxToWP should show a green dot and four tools. If it is red, click it to see the error. The usual causes are a switched-off connection, a typo in the URL, or a revoked key.
Step 4: Send a post
Open the Agent chat. To send a file you already wrote:
Read posts/2026-11-spring-release.md and import it to WordPress with
docxtowp_import_markdown as a draft. Do not change the text. Put it in the
News category and give me the edit link.
To have the Agent write one:
Write a 700-word post explaining our new export feature for non-technical
users, based on docs/export.md. Check the site's categories first, add SEO
fields, and import it as a draft.
The Agent asks before it runs each tool the first time. Approve it. It replies with an edit link and a preview link.
What arrives in WordPress
DocxToWP runs the Markdown through the same converter as a normal upload:
- Headings, lists, tables, blockquotes and fenced code as real blocks.
- Front matter read as usual:
title,slug,excerpt,tagsandcategories. - The Yoast SEO or Rank Math title, description and focus keyphrase, if the Agent supplies them.
- A featured image from a public image link, saved to your Media Library and converted to WebP when that is smaller.
Images in the body with a full https:// link stay linked to where they are
hosted. Images on your own disk, such as ./images/chart.png, cannot be
reached from your site. DocxToWP reports them instead of leaving broken images in the post.
For a folder of Markdown files with local images, use Bulk Import, which
pairs the files and images when you drop them in together.
Why drafts
Cursor's Agent is fast, and it can be confidently wrong. A draft gives you a moment to read the post on your actual site before anyone else does. DocxToWP cannot publish, edit or delete through this connection, and each key can only read back the drafts it created. More on that in how to let AI post to WordPress safely.
More
- Cursor set-up guide, with troubleshooting.
- Claude Code and Claude Desktop work the same way.
- Importing Markdown to WordPress by hand, free.
The AI agent connection is part of DocxToWP Pro, from $49/year.
From your Cursor project to a WordPress draft
Send Markdown posts from Cursor's Agent chat. DocxToWP formats them, fills in the SEO fields and saves a draft for you to review.
See Pro plansFrequently asked questions
Yes. Ask the Agent to read the file and import it with docxtowp_import_markdown without changing the text. Front matter such as title, slug, excerpt, tags and categories is read the same way as a normal Markdown upload.
MCP tools are used by Cursor's Agent. Switch the chat to Agent if the DocxToWP tools are not being called.
No. DocxToWP only creates drafts. It cannot edit, publish or delete existing posts, which is deliberate.
An image with a full https link stays in the post as a link to where it is hosted. Images on your own disk, such as ./images/photo.png, cannot be reached by your site and are reported instead of left broken. Upload those through Bulk Import, which pairs them with the Markdown files. The featured image is different: give its link and DocxToWP copies it into your Media Library.
Related Articles
Connect Claude Desktop to WordPress and Write Posts From a Chat
Add DocxToWP to Claude Desktop's config file, restart, and ask for a post in an ordinary chat. It arrives in WordPress as a formatted draft for you to review.
How to Connect Claude to WordPress With MCP, Step by Step
Connect Claude Code, Claude Desktop or Cursor to your own WordPress site with DocxToWP's MCP server. Ask for a post and get a formatted draft with categories, tags and Yoast SEO fields, ready for you to review and publish.
Import Word Documents With the Yoast SEO Title and Meta Description Filled In
Write the SEO title, meta description and URL slug at the top of your Word draft, and have them land in Yoast SEO or Rank Math when you import, instead of in the post. One document or a hundred.
Import your first Word document in under 60 seconds
Start free. Import a Word document without copy-pasting or rebuilding its formatting. No account, no credit card. Straight from WordPress.org.