A personality-based MCP server for WordPress, providing role-appropriate tools for content management.
A personality-based Model Context Protocol (MCP) server for WordPress that provides role-appropriate tools for content management. This server enables AI assistants like Claude to create, edit, and manage WordPress content through natural language interactions.
This MCP server is not just an API wrapper. It provides intelligent semantic operations that map human workflows to WordPress actions, with sophisticated state management and format conversion.
flowchart TB
WP[WordPress HTML Post]:::wordpress
PFE[pull-for-editing]:::operation
H2M[HTMLβMarkdown Conversion]:::converter
DS[Document Session<br/>Handle: abc123]:::session
LES[Local Edit State<br/>β’ Clean Markdown<br/>β’ Line Numbers<br/>β’ No HTML Entities]:::state
EDL[edit-document-line]:::edit
IAL[insert-at-line]:::edit
SR[search-replace]:::edit
MLS[Modified Local State<br/>Multiple Edits Applied]:::state
STW[sync-to-wordpress]:::operation
M2H[MarkdownβHTML Conversion]:::converter
WPU[WordPress Update<br/>Single API Call]:::wordpress
WP -->|1| PFE
PFE --> H2M
H2M --> DS
DS --> LES
LES --> EDL
LES --> IAL
LES --> SR
EDL --> MLS
IAL --> MLS
SR --> MLS
MLS -->|2| STW
STW --> M2H
M2H --> WPU
classDef wordpress fill:#1e40af,stroke:#3730a3,color:#ffffff
classDef operation fill:#059669,stroke:#047857,color:#ffffff
classDef converter fill:#7c3aed,stroke:#6d28d9,color:#ffffff
classDef session fill:#ea580c,stroke:#dc2626,color:#ffffff
classDef state fill:#0891b2,stroke:#0e7490,color:#ffffff
classDef edit fill:#64748b,stroke:#475569,color:#ffffff
flowchart LR
subgraph "Human Intent"
H1[I want to write about MCP servers]:::human
H2[Fix that typo in my article]:::human
H3[What do people think of my post?]:::human
end
subgraph "AI Intent"
AI1[Create article]:::intent
AI2[Edit my post]:::intent
AI3[Review feedback]:::intent
end
subgraph "Semantic Operations"
SO1[draft-article]:::semantic
SO2[pull-for-editing<br/>+ edit-document<br/>+ sync-to-wordpress]:::semantic
SO3[view-editorial-feedback]:::semantic
end
subgraph "WordPress API"
API1[POST /wp/v2/posts<br/>+ Category lookups<br/>+ Tag creation<br/>+ Status setting]:::api
API2[GET /wp/v2/posts/:id<br/>+ GET categories<br/>+ GET tags<br/>+ PUT /wp/v2/posts/:id]:::api
API3[GET /wp/v2/comments<br/>+ Filter by post_author<br/>+ Parse editorial notes]:::api
end
H1 --> AI1
H2 --> AI2
H3 --> AI3
AI1 --> SO1
AI2 --> SO2
AI3 --> SO3
SO1 --> API1
SO2 --> API2
SO3 --> API3
classDef human fill:#ec4899,stroke:#db2777,color:#ffffff
classDef intent fill:#10b981,stroke:#059669,color:#ffffff
classDef semantic fill:#f59e0b,stroke:#d97706,color:#000000
classDef api fill:#6366f1,stroke:#4f46e5,color:#ffffff
Document Session Manager
Format Conversion Layer
Semantic Operation Engine
Line-Based Edit System
flowchart TD
subgraph "MCP Configuration"
P1[Contributor Personality]:::personality
P2[Author Personality]:::personality
P3[Admin Personality]:::personality
end
subgraph "Available Tools"
T1[Limited Tools<br/>draft, edit, submit]:::tools
T2[Extended Tools<br/>+ publish, media]:::tools
T3[All Tools<br/>+ bulk ops, categories]:::tools
end
subgraph "WordPress User"
U1[Contributor Account]:::user
U2[Author Account]:::user
U3[Admin Account]:::user
end
subgraph "Actual Capabilities"
C1[Can only draft]:::capability
C2[Can publish own]:::capability
C3[Full control]:::capability
end
P1 --> T1
P2 --> T2
P3 --> T3
T1 --> |Filtered by| U1
T1 --> |Filtered by| U2
T1 --> |Filtered by| U3
T2 --> |Filtered by| U1
T2 --> |Filtered by| U2
T2 --> |Filtered by| U3
T3 --> |Filtered by| U1
T3 --> |Filtered by| U2
T3 --> |Filtered by| U3
U1 --> C1
U2 --> C2
U3 --> C3
WP[WordPress Always Has<br/>Final Authority]:::wordpress
C1 --> WP
C2 --> WP
C3 --> WP
classDef personality fill:#8b5cf6,stroke:#7c3aed,color:#ffffff
classDef tools fill:#0ea5e9,stroke:#0284c7,color:#ffffff
classDef user fill:#f97316,stroke:#ea580c,color:#ffffff
classDef capability fill:#22c55e,stroke:#16a34a,color:#000000
classDef wordpress fill:#dc2626,stroke:#b91c1c,color:#ffffff
Before using this MCP server, you need:
WordPress Application Password
Users > Your Profile > Application Passwords
WordPress Feature API Plugin
Appropriate WordPress User Permissions
Once prerequisites are met:
# Clone and install
git clone https://github.com/aaronsb/wordpress-mcp
cd wordpress-mcp
npm install
# Run interactive setup
npm run setup
The setup wizard will:
.env
configuration fileImportant: The personality you choose determines which tools are available, but your actual WordPress user permissions always take precedence.
src/features/
config/personalities.json
git clone https://github.com/aaronsb/wordpress-mcp
cd wordpress-mcp
npm install
The server looks for credentials in this order:
WORDPRESS_URL
, WORDPRESS_USERNAME
, WORDPRESS_APP_PASSWORD
).env
file in ~/.wordpress-mcp/
(recommended for global use).env
file in the server directory (for development)Run the interactive setup:
npm run setup
This will:
.env
file automaticallyCreate a .env
file in ~/.wordpress-mcp/
:
mkdir -p ~/.wordpress-mcp
cat > ~/.wordpress-mcp/.env << EOF
WORDPRESS_URL=https://your-site.com
WORDPRESS_USERNAME=your-username
WORDPRESS_APP_PASSWORD=your-app-password
EOF
Note: Use Application Passwords for better security. Generate one at:
Users > Your Profile > Application Passwords
in your WordPress admin.
First, ensure your credentials are configured (run npm run setup
if needed).
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"wordpress-author": {
"command": "node",
"args": [
"/path/to/wordpress-mcp/src/server.js",
"--personality=author"
]
}
}
}
The server will read credentials from its .env
file.
First, ensure your .env
file is configured (run npm run setup
if needed).
Then, in your project directory, run:
claude mcp add wordpress-author \
node /path/to/wordpress-mcp/src/server.js -- \
--personality=author
The server will read credentials from the .env
file in the wordpress-mcp directory.
Alternatively, add to your project's .claude/settings.json
:
{
"mcpServers": {
"wordpress-author": {
"command": "node",
"args": [
"/path/to/wordpress-mcp/src/server.js",
"--personality=author"
]
}
}
}
Note: The server reads credentials from its .env
file, not from the Claude configuration.
Note: Adjust the personality parameter (--personality=
) to one of:
contributor
- Limited tools for content creationauthor
- Full authoring capabilities (recommended)administrator
- Complete site managementOnce configured, the WordPress tools will be available in Claude. You can:
Semantic Search Examples:
Natural Language Workflows:
find-posts
β suggests pull-for-editing
β guides you through editsview-editorial-feedback
Page-Specific Workflows:
draft-page
or create-page
with clear semantic contextpull-for-editing
with type: "page"
Direct ID-Based Operations (when you know the ID):
The find-posts
operation understands what you want to do:
Intent-based filtering:
intent: "edit"
β Prioritizes drafts you can modifyintent: "review"
β Shows pending posts awaiting approvalintent: "publish"
β Finds drafts ready to go liveintent: "comment"
β Shows published posts with feedbackWorkflow guidance: Each search result includes:
Example:
"Find posts about baking I can edit"
β Returns drafts with suggested actions: ["pull-for-editing", "submit-for-review"]
β Guidance: "π Use 'pull-for-editing' with a post ID to start editing..."
π Transparent Format Conversion:
βοΈ Flexible Editing Tools:
read-document
- View content with line numbersedit-document-line
- Replace specific lines by numberinsert-at-line
- Insert content at precise positionsreplace-lines
- Replace multi-line blockssearch-replace
- Context-aware search with line proximityedit-document
- Traditional string replacement (fallback)1. Pull for editing: pull-for-editing postId=42
β Returns documentHandle="wp-session-abc123" (no filesystem paths!)
2. Read and edit using various methods:
β read-document documentHandle="wp-session-abc123"
β edit-document-line lineNumber=5 newLine="Better content"
β insert-at-line lineNumber=10 content="New paragraph"
β search-replace searchTerm="old" replacement="new" nearLine=15
3. Sync back:
β sync-to-wordpress documentHandle="wp-session-abc123"
β Single WordPress update with all formatting preserved
Key Benefits:
The tool mappings are defined in config/personalities.json
:
Content Creation:
draft-article
- Create draft postsdraft-page
- Create draft pages for static contentedit-draft
- Edit existing draftssubmit-for-review
- Submit drafts for editorial reviewview-editorial-feedback
- See editor commentsDocument Session Workflow:
pull-for-editing
- Fetch posts/pages into editing sessionsread-document
- Read documents with line numbersedit-document-line
- Replace specific lines by numberinsert-at-line
- Insert content at line positionsreplace-lines
- Replace line rangessearch-replace
- Context-aware search and replaceedit-document
- String replacement (fallback)sync-to-wordpress
- Push all changes backlist-editing-sessions
- View active sessionsclose-editing-session
- Manual session cleanupPublishing:
create-article
- Create and publish posts immediatelycreate-page
- Create and publish pages with hierarchypublish-workflow
- Publish or schedule postsmanage-media
- Upload and manage media filesContent Management:
trash-own-content
- Move your own posts or pages to trashSite Management:
bulk-content-operations
- Bulk actions on posts/pages (trash, restore, delete, change status)manage-all-content
- View and manage all postsreview-content
- Review pending posts and commentsmoderate-comments
- Approve, reject, or manage commentsmanage-categories
- Create, update, and organize categoriesEditorial Management:
bulk-content-operations
- Bulk actions on posts/pages (trash, restore, delete, change status)review-content
- Review pending posts and commentsmoderate-comments
- Approve, reject, or manage commentsmanage-categories
- Create, update, and organize categoriesEdit config/personalities.json
to create custom role mappings:
{
"custom-editor": {
"name": "Custom Editor",
"description": "Custom editorial team member",
"features": ["manage-all-content", "edit-draft", "publish-workflow", "bulk-content-operations"],
"context": {
"can_publish": true,
"can_edit_others": true
}
}
}
Then launch with:
npx wordpress-author-mcp --personality=editor
See CUSTOMIZATION.md for detailed instructions on:
The MCP server presents tools based on personality, but WordPress always has final authority:
# Run in development mode with auto-reload
npm run dev
MIT
An MCP server for Google Calendar, enabling LLMs to read, create, and manage calendar events.
Exposes portfolio tracking tools for AI clients.
Convert Markdown files to high-quality, print-ready PDFs using LaTeX.
A sound tool for MCP-compatible IDEs like Cursor. Plays sounds for events like completion, error, and notification.
Human-in-the-loop platform - Allow AI agents and automations to send requests for approval to your gotoHuman inbox.
A spellchecker and grammar checker for developers, requiring a Hyperspell token for authentication.
Generate short URLs using the Rebrandly API.
An MCP server for managing Yandex Browser tabs with extended functionality.
Interact with task, doc, and project data in Dart, an AI-native project management tool
Access data from the BakalΓ‘Εi school system, including schedules, absences, and grades, through a standardized API.