A comprehensive Model Context Protocol (MCP) server for WordPress management through the WordPress REST API v2. Completely written in TypeScript for maximum type safety and better developer experience.
- 54 WordPress Management Tools across 8 categories
- 100% TypeScript - Complete type safety and IntelliSense
- Modern ES Modules - Optimized for performance
- Interactive Setup Wizard - Easy configuration
- Comprehensive Testing - Complete test suite
- Flexible Authentication - Supports App Passwords, JWT, Basic Auth
- Debug & Monitoring - Structured logging and error tracking
The easiest way to get started - no installation required:
# Run directly with NPX
npx @aiondadotcom/mcp-wordpress
# Or install globally
npm install -g @aiondadotcom/mcp-wordpress
mcp-wordpress
git clone https://github.com/AiondaDotCom/mcp-wordpress.git
cd mcp-wordpress
npm install
npm run setup
npm start
# For NPX users
npx @aiondadotcom/mcp-wordpress setup
# For local installation
npm run setup
The setup wizard guides you through:
- WordPress site configuration
- Authentication method selection
- Connection testing
- Claude Desktop configuration
If you want the absolute easiest setup, just paste this prompt into Claude Desktop:
Set up the MCP WordPress server using NPX for my Claude Desktop.
My WordPress details:
- Site URL: [YOUR_WORDPRESS_URL]
- Username: [YOUR_USERNAME]
Please:
1. Help me create a WordPress Application Password
2. Configure my Claude Desktop mcp.json file with the NPX command
3. Test the connection to make sure everything works
4. Show me how to use the WordPress tools
I want to use the NPX version (@aiondadotcom/mcp-wordpress) so I don't need to install anything locally.
For local development and customization:
Build and configure the MCP WordPress server project from https://github.com/AiondaDotCom/mcp-wordpress locally on my computer.
Please:
1. Clone the repository to an appropriate directory
2. Install all dependencies
3. Run the setup wizard and help me configure my WordPress connection
4. Test the connection to make sure everything works
5. Set up the Claude Desktop MCP configuration
6. Run a quick test to verify all tools are working
My WordPress site URL is: [YOUR_WORDPRESS_URL]
My WordPress username is: [YOUR_USERNAME]
Guide me through any steps that require manual input, and let me know if you need any additional information from me.
Just replace [YOUR_WORDPRESS_URL]
and [YOUR_USERNAME]
with your actual WordPress site details, and Claude will handle the rest!
WORDPRESS_SITE_URL=https://your-wordpress-site.com
WORDPRESS_USERNAME=your-username
WORDPRESS_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx
WORDPRESS_AUTH_METHOD=app-password
DEBUG=false
Configure MCP WordPress Server in your Claude Desktop mcp.json
configuration file:
{
"mcpServers": {
"mcp-wordpress": {
"command": "npx",
"args": ["@aiondadotcom/mcp-wordpress"],
"env": {
"WORDPRESS_SITE_URL": "https://your-site.com",
"WORDPRESS_USERNAME": "your-username",
"WORDPRESS_APP_PASSWORD": "your-app-password",
"WORDPRESS_AUTH_METHOD": "app-password"
}
}
}
}
{
"mcpServers": {
"mcp-wordpress": {
"command": "mcp-wordpress",
"env": {
"WORDPRESS_SITE_URL": "https://your-site.com",
"WORDPRESS_USERNAME": "your-username",
"WORDPRESS_APP_PASSWORD": "your-app-password",
"WORDPRESS_AUTH_METHOD": "app-password"
}
}
}
}
{
"mcpServers": {
"mcp-wordpress": {
"command": "node",
"args": ["/path/to/mcp-wordpress/dist/index.js"],
"env": {
"WORDPRESS_SITE_URL": "https://your-site.com",
"WORDPRESS_USERNAME": "your-username",
"WORDPRESS_APP_PASSWORD": "your-app-password",
"WORDPRESS_AUTH_METHOD": "app-password"
}
}
}
}
If you prefer to use a .env
file instead of environment variables in the config:
{
"mcpServers": {
"mcp-wordpress": {
"command": "npx",
"args": ["@aiondadotcom/mcp-wordpress"],
"env": {
"NODE_ENV": "production"
}
}
}
}
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
- Create or locate your Claude Desktop config file at the path above
- Add the MCP server configuration using one of the options above
- Restart Claude Desktop for changes to take effect
- Verify the connection - you should see WordPress tools available in Claude Desktop
Here's a complete claude_desktop_config.json
file with MCP WordPress:
{
"mcpServers": {
"mcp-wordpress": {
"command": "npx",
"args": ["@aiondadotcom/mcp-wordpress"],
"env": {
"WORDPRESS_SITE_URL": "https://your-site.com",
"WORDPRESS_USERNAME": "your-username",
"WORDPRESS_APP_PASSWORD": "your-app-password",
"WORDPRESS_AUTH_METHOD": "app-password"
}
}
}
}
# Compile
npm run build
# Watch mode
npm run build:watch
# Type checking
npm run typecheck
# Development mode with debug output
npm run dev
# Check status
npm run status
# Re-run setup
npm run setup
- WordPress Admin β Users β Profile
- Scroll to Application Passwords
- Enter name (e.g., "MCP WordPress Server")
- Click Add New Application Password
- Copy generated password (format:
xxxx xxxx xxxx xxxx xxxx xxxx
)
# JWT Authentication (requires JWT plugin)
WORDPRESS_AUTH_METHOD=jwt
WORDPRESS_JWT_SECRET=your-jwt-secret
# Basic Authentication (not recommended for production)
WORDPRESS_AUTH_METHOD=basic
WORDPRESS_PASSWORD=your-actual-password
# API Key Authentication (requires API Key plugin)
WORDPRESS_AUTH_METHOD=api-key
WORDPRESS_API_KEY=your-api-key
wp_list_posts
- List and filter blog postswp_get_post
- Get specific postwp_create_post
- Create new postswp_update_post
- Edit postswp_delete_post
- Delete postswp_get_post_revisions
- Get post revisions
wp_list_pages
- List pageswp_get_page
- Get specific pagewp_create_page
- Create new pageswp_update_page
- Edit pageswp_delete_page
- Delete pageswp_get_page_revisions
- Get page revisions
wp_list_media
- Browse media librarywp_get_media
- Get media detailswp_upload_media
- Upload fileswp_update_media
- Edit media metadatawp_delete_media
- Delete mediawp_get_media_sizes
- Get available image sizes
wp_list_users
- List userswp_get_user
- Get user detailswp_create_user
- Create new userswp_update_user
- Edit user profileswp_delete_user
- Delete userswp_get_current_user
- Get current user
wp_list_comments
- List commentswp_get_comment
- Get comment detailswp_create_comment
- Create new commentswp_update_comment
- Edit commentswp_delete_comment
- Delete commentswp_approve_comment
- Approve commentswp_spam_comment
- Mark comments as spam
wp_list_categories
- List categorieswp_get_category
- Get category detailswp_create_category
- Create new categorieswp_update_category
- Edit categorieswp_delete_category
- Delete categorieswp_list_tags
- List tagswp_get_tag
- Get tag detailswp_create_tag
- Create new tagswp_update_tag
- Edit tagswp_delete_tag
- Delete tags
wp_get_site_settings
- Get site settingswp_update_site_settings
- Update site settingswp_get_site_stats
- Get site statisticswp_search_site
- Site-wide searchwp_get_application_passwords
- List app passwordswp_create_application_password
- Create new app passwordswp_delete_application_password
- Delete app passwords
wp_test_auth
- Test authenticationwp_get_auth_status
- Get authentication statuswp_start_oauth_flow
- Start OAuth flowwp_complete_oauth_flow
- Complete OAuth flowwp_refresh_oauth_token
- Refresh OAuth tokenwp_switch_auth_method
- Switch authentication method
# Run all tests
npm test
# Tests with coverage
npm run test:coverage
# Quick tests
npm run test:fast
# MCP integration tests
npm run test:mcp
# Tool integration tests
npm run test:tools
# Tests in watch mode
npm run test:watch
# Check connection status
npm run status
# Debug mode
DEBUG=true npm run dev
# Lint code
npm run lint
# Auto-fix linting errors
npm run lint:fix
mcp-wordpress/
βββ src/ # TypeScript source code
β βββ index.ts # Main MCP server
β βββ server.ts # Server compatibility
β βββ types/ # TypeScript definitions
β β βββ wordpress.ts # WordPress API types
β β βββ mcp.ts # MCP protocol types
β β βββ client.ts # Client interface types
β β βββ index.ts # Type exports
β βββ client/ # WordPress API client
β β βββ api.ts # HTTP client
β β βββ auth.ts # Authentication
β βββ tools/ # MCP tool implementations
β β βββ posts.ts # Post management
β β βββ pages.ts # Page management
β β βββ media.ts # Media management
β β βββ users.ts # User management
β β βββ comments.ts # Comment management
β β βββ taxonomies.ts # Categories/Tags
β β βββ site.ts # Site settings
β β βββ auth.ts # Authentication
β βββ utils/ # Utility functions
β βββ debug.ts # Debug logger
βββ dist/ # Compiled JavaScript files
βββ bin/ # Utility scripts
β βββ setup.js # Setup wizard
β βββ status.js # Status checker
βββ tests/ # Test suite
βββ scripts/ # Build and test scripts
βββ tsconfig.json # TypeScript configuration
βββ jest.config.json # Jest test configuration
βββ package.json # Node.js project configuration
- Complete Type Safety - Compile-time validation
- IntelliSense Support - Better IDE integration
- Type-safe API Client - Typed HTTP methods
- Comprehensive WordPress Types - 400+ lines of precise definitions
- MCP Protocol Types - Tool definitions and handlers
- Enhanced Error Handling - Typed exceptions
- Source Maps - Debugging support
- WordPress 5.0+ with REST API enabled
- HTTPS (recommended for production)
- User with appropriate permissions
- Application Passwords enabled (WordPress 5.6+)
Role | Access |
---|---|
Administrator | Full access to all functions |
Editor | Posts, pages, comments, media |
Author | Own posts and media |
Contributor | Own posts (drafts only) |
Subscriber | Read only |
-
"Cannot connect to WordPress"
- Check WORDPRESS_SITE_URL
- Ensure REST API is accessible
- Test:
curl https://your-site.com/wp-json/wp/v2/
-
"Authentication failed"
- Verify username and app password
- Ensure Application Passwords are enabled
- Try running
npm run setup
again
-
"TypeScript compilation errors"
- Run
npm run typecheck
- Ensure all dependencies are installed
- Run
DEBUG=true npm run dev
- Fork the repository
- Create feature branch:
git checkout -b feature/new-feature
- Commit changes:
git commit -m 'Add new feature'
- Push branch:
git push origin feature/new-feature
- Create pull request
MIT License - see LICENSE file for details
π Powered by TypeScript for better development experience and type safety!