Skip to main content

Secure MCP server for WordPress content management

Project description

MCP WordPress CrunchTools

A secure MCP (Model Context Protocol) server for WordPress content management. Designed for developers publishing about their work.

Features

  • 30 Tools for posts, pages, media, and comments
  • Security-focused: Credentials protected, input validation, SSRF prevention
  • Developer workflow: Scheduled publishing, revisions, search
  • Easy integration: Works with Claude Code and other MCP clients

Installation

With uvx (recommended)

uvx mcp-wordpress-crunchtools

With pip

pip install mcp-wordpress-crunchtools

From source

git clone https://github.com/crunchtools/mcp-wordpress.git
cd mcp-wordpress
uv sync --all-extras
uv run mcp-wordpress-crunchtools

Configuration

Set these environment variables:

Variable Description Example
WORDPRESS_URL WordPress site URL https://example.com
WORDPRESS_USERNAME WordPress username admin
WORDPRESS_APP_PASSWORD Application password xxxx xxxx xxxx xxxx

Creating an Application Password

  1. Log in to WordPress admin
  2. Go to Users → Profile
  3. Scroll to Application Passwords
  4. Enter a name (e.g., "MCP Server") and click Add New
  5. Copy the generated password (shown once)

Usage with Claude Code

claude mcp add mcp-wordpress-crunchtools \
    --env WORDPRESS_URL=https://example.com \
    --env WORDPRESS_USERNAME=admin \
    --env WORDPRESS_APP_PASSWORD="xxxx xxxx xxxx xxxx" \
    -- uvx mcp-wordpress-crunchtools

Available Tools

Site Tools

Tool Description
wordpress_get_site_info Get site title, description, URL, timezone
wordpress_test_connection Verify API credentials work

Post Tools

Tool Description
wordpress_list_posts List posts with filtering (status, category, search)
wordpress_get_post Get single post by ID with full content
wordpress_search_posts Search posts by keyword
wordpress_create_post Create new post (supports scheduling)
wordpress_update_post Update existing post
wordpress_delete_post Delete/trash a post
wordpress_list_revisions List revisions for a post
wordpress_get_revision Get specific revision content
wordpress_list_categories List available categories
wordpress_list_tags List available tags

Page Tools

Tool Description
wordpress_list_pages List pages with filtering
wordpress_get_page Get single page by ID
wordpress_create_page Create new page
wordpress_update_page Update existing page
wordpress_delete_page Delete/trash a page
wordpress_list_page_revisions List page revisions

Media Tools

Tool Description
wordpress_list_media List media items
wordpress_get_media Get media item details
wordpress_upload_media Upload file from base64
wordpress_update_media Update media metadata
wordpress_delete_media Delete media item
wordpress_get_media_url Get public URL for media

Comment Tools

Tool Description
wordpress_list_comments List comments with filtering
wordpress_get_comment Get single comment
wordpress_create_comment Add a comment to a post
wordpress_update_comment Update comment content/status
wordpress_delete_comment Delete a comment
wordpress_moderate_comment Approve, hold, spam, or trash

Examples

Create a Draft Post

Create a new WordPress post titled "My Technical Article" with the content below. Keep it as a draft.

Schedule a Post

Update post ID 123 to publish on December 25, 2024 at 10:00 AM.

Upload an Image

Upload this image to WordPress and set the alt text to "Architecture diagram".

Find and Moderate Comments

List all comments in "hold" status and approve the legitimate ones.

Security

  • Credential Protection: All credentials stored as SecretStr, never logged
  • SSRF Prevention: REST API path hardcoded, cannot be overridden
  • Input Validation: All inputs validated via Pydantic models
  • Rate Limiting: Handles WordPress rate limits gracefully
  • TLS Enforcement: All requests use HTTPS with certificate validation
  • Size Limits: Response size limited to 10MB to prevent memory issues
  • Timeout: All requests timeout after 30 seconds

Development

# Install dev dependencies
uv sync --all-extras

# Run tests
uv run pytest

# Run linting
uv run ruff check src tests

# Run type checking
uv run mypy src

# Format code
uv run ruff format src tests

License

AGPL-3.0-or-later

Credits

Built by crunchtools.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_wordpress_crunchtools-0.1.0.tar.gz (127.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_wordpress_crunchtools-0.1.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_wordpress_crunchtools-0.1.0.tar.gz.

File metadata

File hashes

Hashes for mcp_wordpress_crunchtools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ff09445e955330437d2c50916a5df87acead5390701f9176d11fceaca2c60451
MD5 90f3b4ba7abda183088c4ca5a73feb1d
BLAKE2b-256 ad29270854b323e56d558239db04b5afc2aa4b3c71036ef95e6a174f226956f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_wordpress_crunchtools-0.1.0.tar.gz:

Publisher: publish.yml on crunchtools/mcp-wordpress

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_wordpress_crunchtools-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_wordpress_crunchtools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d0d055cdaaaa40932e9d369ae4ca76fa5d396ad0175636bb77395eed5ef04410
MD5 e7e8d5e800f25b5edd23b7be824609ee
BLAKE2b-256 8559a8936794e3c0710d24cdc2ce64f6e6ae6725dcb705730e84a63f5044c4fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_wordpress_crunchtools-0.1.0-py3-none-any.whl:

Publisher: publish.yml on crunchtools/mcp-wordpress

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page