WordPress MCP Server
Provides tools for managing a WordPress website via the WordPress REST API, including CRUD operations for posts, pages, media, categories, tags, comments, and users, plus site settings, search, custom post types, custom fields, and plugin/theme listing.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@WordPress MCP Serverlist my recent draft posts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
WordPress Model Context Protocol (MCP) Server
A production-quality Model Context Protocol (MCP) server that gives AI assistants (like Claude Desktop) full control over a WordPress website via the WordPress REST API. Built in Python 3.10+ using FastMCP and HTTPX.
Features (MCP Tools)
This server exposes a wide range of tools for managing WordPress resources:
Posts: List, get, create, update, and delete (trash/force) posts. Sanitizes HTML excerpts for list views to save token context.
Pages: CRUD operations on pages including hierarchy support via parent page IDs.
Media Library: Upload media via local file paths or base64 payloads (specifying filename and mime types), view attachment metadata, edit alt text/captions, and delete media.
Taxonomies: Manage Categories & Tags (list, create, update, delete, and assign to posts).
Comments: List, fetch, moderate (approve/hold/spam/trash), reply (threaded), and delete comments.
Users: List, fetch profile, create, update roles, and delete users (with optional reassignment of posts).
Custom Post Types & Fields: Dynamic custom post type detection, and generic meta-fields (ACF) updates.
Site Settings: Read and write basic site details (title, tagline, timezone, formats).
Search: Full-site unified search across posts, pages, and media.
Plugins & Themes: List installed plugins and themes (conditional on admin permissions).
Related MCP server: WordPress MCP Server
WordPress Side Setup
1. Requirements
WordPress version 5.6+ (which natively supports Application Passwords).
SSL enabled (HTTPS) on your site. If developing locally without HTTPS, you must configure
ALLOW_INSECURE_HTTP=true.User account with appropriate capabilities:
Administrator is required for site settings, plugins, themes, and users management.
Editor or Author is sufficient for posts, pages, media, and comment moderation.
2. Generating Application Password
Log into your WordPress dashboard (
yoursite.com/wp-admin).Navigate to Users -> Profile (or Users -> All Users -> Edit your user).
Scroll down to the Application Passwords section.
Enter an application name (e.g.,
Claude MCP Server) and click Add New Application Password.Copy the generated password (formatted like
xxxx xxxx xxxx xxxx xxxx xxxx). It is only displayed once.
Configuration & Run
Environment Variables
Configure the server using a .env file (see .env.example as a template):
# Target site URL (without trailing slash)
WP_SITE_URL=https://yoursite.com
# WordPress Username
WP_USERNAME=admin
# Generated Application Password (space-separated or compressed)
WP_APP_PASSWORD=abcd 1234 efgh 5678 ijkl 9012
# Optional settings
ALLOW_INSECURE_HTTP=false # Set to true for local http:// development
DRY_RUN=false # Set to true to simulate writes without calling APIInstallation
Ensure you have Python 3.10+ installed:
pip install -r requirements.txtRunning Locally
To run the server in development mode:
python src/wordpress_mcp/server.py(Communication happens over standard input/output).
To run using FastMCP dev client:
fastmcp dev src/wordpress_mcp/server.pyCloud Deployment (Render & OAuth)
You can host this MCP server on Render as a web service to connect it remotely with custom clients like Claude's custom connectors.
1. Deploy on Render
Create a new Web Service on Render.
Connect this repository.
Configure the environment settings:
Runtime:
PythonStart Command:
uvicorn wordpress_mcp.server:app --host 0.0.0.0 --port $PORT
Define the Environment Variables:
WP_SITE_URL: The root URL of your public WordPress site (e.g.https://intoaec.ai).WP_OAUTH_AUTHORIZE_URL(optional): Defaults to{WP_SITE_URL}/oauth/authorizeWP_OAUTH_TOKEN_URL(optional): Defaults to{WP_SITE_URL}/oauth/tokenALLOW_INSECURE_HTTP:false
2. WordPress OAuth Setup
Ensure you have an OAuth 2.0 Provider plugin installed on your WordPress site (e.g., WP OAuth Server or OAuth2 Provider for WordPress).
Register a new OAuth Client in your WordPress dashboard.
Save the generated Client ID and Client Secret.
3. Add Custom Connector to Claude
Go to Claude's Settings -> Connectors.
Click Add custom connector.
Fill in the connector options:
Name:
WordPressRemote MCP server URL:
https://your-render-app.onrender.com/sseOAuth Client ID: Enter the Client ID from WordPress.
OAuth Client Secret: Enter the Client Secret from WordPress.
Individual sign-in: Enabled (each user signs in using their WordPress credentials).
Click Add. Claude will request the well-known OAuth configuration from your server, prompt you to log in, and establish a secure connection using OAuth Bearer tokens.
Registering with MCP Clients
To use this server with Claude Desktop, add it to your configuration file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS/Linux:
~/Library/Application Support/Claude/claude_desktop_config.json
Option 1: Direct Python Call (Recommended for active workspace)
{
"mcpServers": {
"wordpress-mcp": {
"command": "python",
"args": [
"D:/SIVA/mcps/wordpress-mcp/src/wordpress_mcp/server.py"
],
"env": {
"WP_SITE_URL": "https://yoursite.com",
"WP_USERNAME": "admin",
"WP_APP_PASSWORD": "abcd 1234 efgh 5678 ijkl 9012"
}
}
}
}Option 2: Running with UV (Fast & Isolated dependency resolution)
{
"mcpServers": {
"wordpress-mcp": {
"command": "uv",
"args": [
"run",
"--path",
"D:/SIVA/mcps/wordpress-mcp/src/wordpress_mcp/server.py"
],
"env": {
"WP_SITE_URL": "https://yoursite.com",
"WP_USERNAME": "admin",
"WP_APP_PASSWORD": "abcd 1234 efgh 5678 ijkl 9012"
}
}
}
}MCP Tools Reference
Posts
wp_list_posts(status, categories, tags, author, after, before, search_query, page, per_page): List posts with pagination (capped at 50 results/page) and filters.wp_get_post(post_id): Retrieve full HTML content and details for a post.wp_create_post(title, content, status, excerpt, author, categories, tags, featured_media): Create a new post.wp_update_post(post_id, title, content, status, ...): Edit a post.wp_delete_post(post_id, force): Trash or permanently delete a post.
Pages
wp_list_pages(parent, status, search_query, page, per_page): List pages (useparent=0for top-level pages).wp_get_page(page_id): Get full page details.wp_create_page(title, content, status, parent, author): Create a page.wp_update_page(page_id, ...): Edit a page.wp_delete_page(page_id, force): Trash/delete a page.
Media Library
wp_list_media(media_type, mime_type, page, per_page): View attachments.wp_get_media(media_id): Get media metadata and urls.wp_upload_media(file_path, data_base64, file_name, mime_type): Upload media (accepts absolute path to a file or base64 data).wp_update_media_metadata(media_id, title, alt_text, caption, description): Update media metadata.wp_delete_media(media_id, force): Permanently delete a media item.
Taxonomies
wp_list_categories(search_query, page, per_page)/wp_create_category/wp_update_category/wp_delete_categorywp_list_tags(search_query, page, per_page)/wp_create_tag/wp_update_tag/wp_delete_tag
Comments
wp_list_comments(post_id, status, page, per_page): List and search comments.wp_get_comment(comment_id): Get comment details.wp_create_comment(post_id, content, parent_id, author_name, author_email): Reply to or submit comments.wp_update_comment_status(comment_id, status): Approve, unapprove (hold), mark spam, or trash comments.wp_delete_comment(comment_id, force): Delete comments.
Users
wp_list_users/wp_get_user/wp_create_user/wp_update_user/wp_delete_user
Site Settings & Custom Fields
wp_get_site_settings()/wp_update_site_settings(...)wp_list_plugins()/wp_list_themes()wp_detect_custom_post_types(): Discover CPTs REST routes.wp_update_post_meta(post_id, meta_key, meta_value, post_type): Update custom meta fields (ACF/meta boxes) exposed in REST.
Search
wp_search(search_query, subtype, page, per_page): Global search cross-cutting all content types.
Safety Features
Dry-Run Mode: Write operations (POST/PUT/DELETE) are blocked and logged locally instead of executing when
DRY_RUN=true.Credential Protection: The server automatically catches exceptions and sanitizes any reference to
WP_APP_PASSWORDbefore returning errors.SSL Requirement: Enforces HTTPS connections unless
ALLOW_INSECURE_HTTP=trueis explicitly enabled.Token Saving: In list actions, the HTML tags from excerpt and content fields are stripped, and content body is removed, saving significant context tokens for LLM clients.
This server cannot be deployed
Maintenance
Related MCP Connectors
Publish to self-hosted WordPress from AI agents: markdown, images, SEO, and Notion sync.
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
Secure MCP Server for WordPress connects AI assistants and agents to WordPress with secure, controlled access. It lets AI interact with WordPress through MCP while helping organizations manage access, enforce policies, protect non-human identities (NHI), and require human approval for sensitive actions. Use it to securely connect tools such as ChatGPT, Claude, and Cursor with WordPress. Marketplace Link: https://wordpress.org/plugins/miniorange-secure-mcp-server/ Official website: https://plugins.miniorange.com/mcp-server-ai-policy-enforcement-wordpress
Sync Lightroom, Figma, Dropbox & Canva assets to WordPress and Shopify via natural language.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to interact with WordPress sites through the WordPress REST API. Supports multiple WordPress sites with secure authentication, enabling content management, post operations, and site configuration through natural language.32 npm116MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with WordPress sites through the REST API. Supports multiple WordPress sites with secure authentication, enabling content management, post operations, and site configuration through natural language.32 npmMIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with WordPress sites through REST APIs, allowing programmatic management of posts, users, comments, categories, and tags with secure authentication.2948MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to manage WordPress sites through natural conversation, supporting post creation, content updates, site queries, and draft-to-publish workflows via the WordPress REST API.9MIT