MCP server for create, edit and delete posts in your WordPress website, with optional AI-generated drafts.
-
Install dependencies and build:
npm install npm run build
-
Configure environment variables:
export WORDPRESS_URL="https://example.com" export WORDPRESS_USER="admin" export WORDPRESS_APP_PASSWORD="xxxx xxxx xxxx xxxx"
-
Run the MCP server:
npm start
create_post: Creates a post in WordPress.update_post: Updates a post.delete_post: Deletes a post.generate_post: Generates a draft using the configured AI provider.
If you want a WordPress plugin or external system to call the AI generator over HTTP, set HTTP_PORT.
export HTTP_PORT=8080
npm startEndpoints:
GET /healthPOST /generate
The wp-plugin/wp-mcp-bridge folder contains a small plugin that calls the HTTP bridge. Install it
inside wp-content/plugins and configure the bridge URL in WordPress settings.
The server ships with a NullAIProvider that just echoes data. Replace it by injecting an AIProvider
implementation and passing it to startServer in src/index.ts.
- Requires WordPress REST API access and an application password.
- App passwords are stored only in environment variables.