Black Friday20% off ProPlans →
Back to docs
Step 10 of 13Pro

Set up Claude Code

Claude Code connects to DocxToWP with one command. It works with a live site and with a site on your own computer.

Before you start

  • DocxToWP Pro 1.6.0 or later, with your licence active.
  • Claude Code installed (claude --version in a terminal shows it).
  • In WordPress, DocxToWP Pro → AI Agents: the connection switched on and a key created. See Connect an AI agent.

1. Add DocxToWP to Claude Code

Open a terminal (PowerShell, Git Bash or Terminal) and run the command from the Connect apps → Claude Code tab. It looks like this, with your own Server URL and key:

claude mcp add --transport http docxtowp https://your-site.com/wp-json/docxtowp/v1/mcp --header "Authorization: Bearer dwpk_…"

You only do this once. Claude Code remembers the connection for every session. To use it only inside one project, run the command in that project’s folder.

2. Check it is connected

claude mcp list

You should see docxtowp … ✓ Connected. Inside Claude Code, typing /mcp shows DocxToWP with its four tools.

3. Ask for a post

Start Claude Code with claude. Copy the SEO Blog Writer prompt from DocxToWP Pro → AI Agents → Prompt library, replace the [BRACKETS] with your topic, and paste it at the prompt. Or simply ask:

Use the DocxToWP tools to write a 1,000-word post about planning a spring vegetable garden for beginners. Check the site first, pick an existing category, add tags and SEO fields, and import it as a draft. Then give me the edit and preview links.

The first time Claude uses each DocxToWP tool, it asks for permission. Choose Yes, or allow the DocxToWP tools for the session.

When it finishes, Claude replies with the edit link and the preview link. Open the edit link (logged in to WordPress), check the draft, and publish it when you are ready.

Word files from your computer

Claude Code can read files on your computer, so it can send a Word document too:

Read C:\Documents\annual-report.docx and import it with docxtowp_import_docx as file_base64. Do not change the text.

If something goes wrong

  • “Failed to connect” in claude mcp list: check the Server URL opens in a browser (it answers with an error message, which is fine) and that the connection is switched on.
  • A key error with the right key: your server may drop the Authorization header. Remove the server with claude mcp remove docxtowp and add it again with --header "X-API-Key: dwpk_…".
  • More messages and fixes: Connect an AI agent → If it does not connect.

Disconnect

Run claude mcp remove docxtowp, and revoke the key in DocxToWP Pro → AI Agents → Keys.

Still stuck? Email support@docxtowp.com and we will walk you through it.