Skip to main content
Glama

WordPress MCP Server


Note: This project was developed with and is supported exclusively by AI. There is no human support — issues and PRs are triaged and responded to by AI agents. If AI-assisted software isn't for you, no hard feelings — but you might want to reconsider, since so is most of the software you already use.


A Model Context Protocol (MCP) server that lets Claude manage WordPress sites through the WordPress REST API. Create, edit, publish posts, manage categories and tags, and query site configuration — all from Claude Desktop or Claude Code.

License Docker TypeScript

Features

  • Posts: Create, read, update, delete, publish, search

  • Categories & Tags: List and filter taxonomies

  • Site Info: Query site configuration and capabilities

  • Application Passwords: Secure auth without hardcoded credentials

  • Docker Ready: Multi-stage build, non-root, production-hardened

Related MCP server: WordPress MCP Server

Quick Start

git clone https://github.com/wolffcatskyy/wordpress-mcp.git
cd wordpress-mcp
npm install
cp .env.example .env
# Edit .env with your WordPress URL and Application Password
npm run build
npm start

Claude Desktop Configuration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "wordpress": {
      "command": "node",
      "args": ["/path/to/wordpress-mcp/dist/index.js"],
      "env": {
        "WORDPRESS_URL": "https://your-site.com",
        "WORDPRESS_USERNAME": "admin",
        "WORDPRESS_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
      }
    }
  }
}

Configuration

Variable

Required

Description

WORDPRESS_URL

Yes

WordPress site URL (e.g., https://your-site.com)

WORDPRESS_USERNAME

Yes

WordPress admin username

WORDPRESS_PASSWORD

Yes

Application Password (generate in WP Admin > Users > Profile)

LOG_LEVEL

No

debug, info, warn, error (default: info)

Authentication Setup

This server uses WordPress Application Passwords (built into WordPress 5.6+):

  1. Go to WordPress Admin > Users > Your Profile

  2. Scroll to Application Passwords

  3. Enter name: Claude MCP

  4. Click Add New Application Password

  5. Copy the generated password (spaces are fine)

  6. Use it as WORDPRESS_PASSWORD in your config

Available Tools

Tool

Description

get_posts

List posts with filtering (search, status, pagination, ordering)

get_post

Get a single post by ID

create_post

Create a new post (title, content, excerpt, status, categories, tags)

update_post

Update an existing post

delete_post

Delete/trash a post

publish_post

Publish a draft or pending post

get_categories

List categories with optional search

get_tags

List tags with optional search

get_site_info

Get site name, description, URL, timezone, capabilities

Docker

# Build and run
docker compose up -d

# View logs
docker logs wordpress-mcp

Development

npm run dev    # Run with tsx (hot reload)
npm run build  # Compile TypeScript
npm start      # Run compiled JS

Project Structure

src/
|-- index.ts          # MCP server entry point, tool definitions, request handlers
|-- wordpress.ts      # WordPress REST API client (posts, categories, tags, site)
|-- utils/
    |-- logger.ts     # Structured JSON logging to stderr

Contributing

Every issue in this repo is AI-Ready — structured with full context, file paths, implementation guides, and a ready-to-use AI prompt.

See CONTRIBUTING.md for details.

Browse Issues →

License

MIT -- see LICENSE

Available Tools

24 tools
create_commentB

Create a new comment on a WordPress post

Inputs: post (required), content (required), parent, status, +2 more.

create_pageC

Create a new WordPress page

Inputs: title (required), parent, status, content, +2 more.

create_postC

Create a new WordPress post

Inputs: title (required), tags, status, content, +3 more.

delete_commentA

Delete a WordPress comment (moves to trash by default)

Inputs: id (required), force.

delete_mediaB

Permanently delete a media attachment from WordPress

Inputs: id (required), force.

delete_pageB

Delete a WordPress page (moves to trash)

Inputs: id (required), force.

delete_postB

Delete a WordPress post (moves to trash)

Inputs: id (required), force.

get_categoriesC

Retrieve WordPress categories

Inputs: search, per_page.

get_commentsB

Retrieve WordPress comments with optional filtering by post, status, and search

Inputs: page, post, order, search, +3 more.

get_mediaA

Get details of a single media attachment by ID (URL, dimensions, alt text, etc.)

Inputs: id (required).

get_pageC

Retrieve a single WordPress page by ID

Inputs: id (required).

get_pagesC

Retrieve WordPress pages with optional filtering and pagination

Inputs: page, order, parent, search, +3 more.

get_postB

Retrieve a single post by ID

Inputs: id (required).

get_postsC

Retrieve WordPress posts with optional filtering and pagination

Inputs: page, order, search, status, +2 more.

get_site_infoC

Get WordPress site information and capabilities

Inputs: no named parameters.

get_tagsC

Retrieve WordPress tags

Inputs: search, per_page.

list_mediaB

List media attachments in the WordPress media library with optional filtering

Inputs: page, order, search, orderby, +3 more.

publish_pageB

Publish a draft or pending page immediately

Inputs: id (required).

publish_postB

Publish a draft or pending post immediately

Inputs: id (required).

search_siteA

Search across all WordPress content types (posts, pages, categories, tags, media) in a single query. Returns matching results with their type, title, and URL.

Inputs: search (required), page, type, subtype, +1 more.

update_commentB

Update an existing comment (content or moderation status)

Inputs: id (required), status, content.

update_pageC

Update an existing WordPress page

Inputs: id (required), title, parent, status, +3 more.

update_postC

Update an existing WordPress post

Inputs: id (required), tags, title, status, +4 more.

upload_mediaA

Upload a media file (image, video, PDF, etc.) to WordPress. Provide file data as base64-encoded string. Returns the attachment ID which can be used as featured_media on posts.

Inputs: data (required), filename (required), title, caption, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 24 tools

    Disambiguation4/5

    Most tools target a distinct resource+action pair (post vs page vs media vs comment), making selection straightforward. Minor overlap exists between search_site and the type-specific get_* listing tools, and publish_post/publish_page partially overlap with update_post/update_page's status changes, but descriptions clarify the intended use.

    Naming Consistency5/5

    Every tool follows a clean verb_noun pattern (get_posts, create_page, update_comment, delete_media, publish_post). Singular/plural is used deliberately to distinguish single-item (get_post) from collection (get_posts) operations.

    Tool Count4/5

    24 tools is on the high side but justified by the breadth of WordPress entities (posts, pages, media, comments, categories, tags) and their lifecycle operations. Each tool maps to a real operation, though a few could be consolidated (e.g. publish_* as an update_post status field).

    Completeness3/5

    Posts, pages, comments, and media have near-complete lifecycle coverage, but categories and tags are read-only with no create/update/delete, and media lacks an update operation (e.g. alt text, metadata). There are also dead ends such as no single-comment retrieval and no user/author management.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers