How to Let AI Agents Write and Publish Your WordPress Posts (via MCP)

WordPress.com just launched MCP (Model Context Protocol) support, allowing AI agents like Claude and ChatGPT to draft and publish blog posts directly to your site.

This isn’t another “AI writes trash content” tool. MCP gives AI agents real access to your WordPress account—they can create drafts, schedule posts, manage tags, and even analyze your site’s performance data.

In this guide, you’ll learn how to set it up, what it can do, and whether you should actually use it.


What You’ll Build

By the end of this tutorial, you’ll have:

Example: “Claude, write a 1000-word SEO article about X, schedule it for Friday, and tag it with Y and Z.”

And it just… works.


Prerequisites

Before starting, make sure you have:

Required:

Optional but Helpful:

Estimated Time:

10-15 minutes for basic setup
30 minutes if you want to test all features

Cost:


Step-by-Step Setup

Step 1: Enable MCP on WordPress.com

Goal: Generate an API key that AI agents can use to access your WordPress site.

How:

  1. Log into your WordPress.com dashboard

  2. Navigate to Settings → Developer

  3. Click “Enable MCP Beta”

  4. You’ll see a screen like this:

    MCP Integration
    Status: Enabled
    API Key: wp_mcp_abc123xyz...
    
  5. Copy the API key to your clipboard

Checkpoint: You should see “MCP Integration: Active” in your WordPress settings.

⚠️ Security Note: This API key gives FULL access to your WordPress account. Treat it like a password. Never share it publicly or commit it to GitHub.


Step 2: Install the WordPress MCP Server

Goal: Download the MCP server package that bridges WordPress and AI agents.

How:

  1. Open your terminal

  2. Navigate to your MCP servers directory:

    cd ~/.config/mcp/servers
    # On Windows: C:\Users\YourName\.config\mcp\servers
    
  3. Clone the WordPress MCP repository:

    git clone https://github.com/wordpress/mcp-server.git wordpress
    
  4. Install dependencies:

    cd wordpress
    npm install
    

Checkpoint: You should see a new folder ~/.config/mcp/servers/wordpress with package.json inside.

Troubleshooting:


Step 3: Configure Claude Desktop (or ChatGPT)

Goal: Tell your AI assistant to use the WordPress MCP server.

How:

  1. Open your Claude Desktop config file:

    # Mac/Linux:
    nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
    # Windows:
    notepad %APPDATA%\Claude\claude_desktop_config.json
    
  2. Add the WordPress MCP server config:

    {
      "mcpServers": {
        "wordpress": {
          "command": "node",
          "args": ["/Users/yourname/.config/mcp/servers/wordpress/dist/index.js"],
          "env": {
            "WORDPRESS_SITE_URL": "https://yourblog.wordpress.com",
            "WORDPRESS_API_KEY": "wp_mcp_abc123xyz..."
          }
        }
      }
    }
    
  3. Replace:

    • /Users/yourname/... with your actual path
    • https://yourblog.wordpress.com with your site URL
    • wp_mcp_abc123xyz... with the API key from Step 1
  4. Save and close the file

Checkpoint: Restart Claude Desktop. In the bottom right corner, you should see a 🔌 icon indicating “MCP: wordpress connected.”

For ChatGPT Desktop: Same process, but edit chatgpt_desktop_config.json instead. Location:


Step 4: Test the Connection

Goal: Verify that Claude can actually talk to WordPress.

How:

  1. Open Claude Desktop

  2. Type this prompt:

    List my 5 most recent WordPress posts
    
  3. Claude should respond with actual post titles, dates, and URLs from your site

Example output:

Here are your 5 most recent WordPress posts:

1. "Why AI Can't Replace Good Writing" (March 24, 2026)
   https://yourblog.wordpress.com/posts/ai-cant-replace-writing
   
2. "The Future of SEO is Semantic Search" (March 22, 2026)
   ...

Checkpoint: If you see your real posts, it’s working! 🎉

Troubleshooting:


Step 5: Create Your First AI-Drafted Post

Goal: Have Claude write a complete blog post draft.

How:

  1. In Claude Desktop, try this prompt:

    Write a 1000-word SEO-optimized blog post about "5 Productivity Hacks for Remote Workers"
    
    Requirements:
    - Target keyword: "remote work productivity"
    - Include 5 actionable tips
    - Conversational tone
    - Add relevant tags: productivity, remote-work, tips
    - Save as draft (don't publish yet)
    
  2. Claude will:

    • Write the full article
    • Format it with headers and bullets
    • Call the WordPress MCP API to create a draft
    • Confirm: “Draft created: [link to WordPress editor]”
  3. Click the link to review the draft in WordPress

Example Response:

I've created a draft post on your WordPress site. Here's a preview:

---

# 5 Productivity Hacks for Remote Workers That Actually Work

Remote work is awesome—until you realize your couch is now your office...

[Full 1000-word article]

---

Draft saved to: https://yourblog.wordpress.com/wp-admin/post.php?post=123&action=edit
Tags: productivity, remote-work, tips
Status: Draft (not published)

Checkpoint: You should see the draft in your WordPress editor with all formatting intact.


Step 6: Publish and Schedule Posts

Goal: Move beyond drafts—let AI publish or schedule content.

How:

Publish immediately:

Claude, publish the draft we just created.

Schedule for later:

Schedule that post for Friday, March 28 at 9:00 AM EST.

Bulk scheduling:

Create 3 blog post outlines about social media marketing, 
and schedule them for Mon/Wed/Fri next week at 9 AM.

Claude will:

  1. Generate all 3 outlines
  2. Create WordPress drafts
  3. Set publish dates automatically

Security Feature: By default, all posts start as drafts. You must explicitly tell the AI to publish. This prevents accidental live posts.


What Else Can You Do?

Once connected, AI agents can:

Content Management:

Analytics & Insights:

SEO Optimization:

Batch Operations:


Real-World Use Case: Weekly Newsletter

Here’s a practical workflow:

Prompt:

Every Monday:
1. Analyze the 5 most popular posts from last week
2. Write a 500-word newsletter summarizing key insights
3. Schedule it for Tuesday 8 AM
4. Tag it as "newsletter, weekly-digest"

Claude will:

Result: You just automated your weekly newsletter. No manual work required.


Should You Actually Use This?

✅ Use MCP When:

❌ Don’t Use MCP When:

🟡 The Gray Area:

Can AI write good blog posts? Yes, with the right prompts and human editing. But if you’re publishing AI drafts unedited, you’re contributing to the sea of mediocre content already drowning the internet.

My take: Use MCP as a writing assistant, not a replacement. Let AI draft, then rewrite with your voice.


Troubleshooting Common Issues

Issue: “MCP server not responding”

Fix: Restart Claude Desktop. If that doesn’t work, check your config file for typos in the JSON.

Issue: “Permission denied when creating posts”

Fix: Make sure your WordPress.com plan supports MCP (Creator plan or higher). Free plans don’t have API access.

Issue: “Draft created but formatting looks broken”

Fix: WordPress uses Gutenberg blocks. Ask Claude to format posts using HTML instead of markdown:

Write this post in HTML format, not markdown.

Issue: “AI keeps trying to publish when I want drafts”

Fix: Be explicit in your prompts:

Save as DRAFT. Do not publish.

Issue: “Can’t find the config file”

Fix: If the file doesn’t exist, create it:

mkdir -p ~/Library/Application\ Support/Claude
touch ~/Library/Application\ Support/Claude/claude_desktop_config.json

Advanced: Custom Prompts for Better Results

Here are some prompt templates I use:

SEO Article Template:

Write a 1500-word SEO article on [TOPIC].

Requirements:
- Target keyword: [KEYWORD]
- Include:
  - Table of contents
  - 5 H2 sections
  - Actionable tips
  - FAQ section
- Tone: Professional but conversational
- Add meta description (155 chars max)
- Save as draft

Tutorial Template:

Write a step-by-step tutorial on [TOPIC].

Structure:
1. What You'll Learn (bullet list)
2. Prerequisites
3. Steps (numbered, with code examples)
4. Troubleshooting section
5. Next steps

Save as draft with tags: tutorial, how-to, [topic-tag]

Newsletter Digest:

Analyze my blog posts from [DATE RANGE].
Write a 400-word newsletter highlighting:
- Top 3 most-viewed posts
- Key takeaways from each
- Call to action: subscribe for next week

Schedule for [DAY] at 8 AM.

What’s Next: Where This Is Headed

WordPress + MCP is just the beginning. Here’s what’s coming:

Short-term (2026):

Medium-term (2027):

Long-term (2028+):

The trend is clear: AI agents will manage more of the content pipeline. But humans still need to steer the ship.


Final Thoughts: Use It as a Tool, Not a Crutch

MCP for WordPress is powerful. Too powerful, maybe.

It’s easy to imagine a future where blogs are just AI talking to AI—chatbots writing posts, other chatbots reading them, nobody actually saying anything.

Don’t be that blog.

Use MCP to:

But always keep a human in the loop. Edit the drafts. Add your voice. Make it yours.

Because at the end of the day, readers don’t come for the content—they come for you.


Resources & Further Reading


Got it working? Drop a comment below and let me know what you built. Or if you ran into issues, I’ll try to help troubleshoot.

And if you’re using this to publish AI-generated spam… well, karma’s a bitch. 😊