zd87pl/wpengine-mcp-server
If you are the rightful owner of wpengine-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The WP Engine MCP Server is a Model Context Protocol server designed to manage WordPress sites on the WP Engine platform.
list_sites
List all sites in your WP Engine account
get_site_info
Get detailed information about a specific site
create_site
Create a new WordPress site
update_site
Update existing site settings
delete_site
Delete a site
WP Engine MCP Server
A Model Context Protocol (MCP) server that provides site management capabilities for WP Engine managed WordPress platform.
Features
This MCP server provides the following tools for WP Engine site management:
- list_sites - List all sites in your WP Engine account
- get_site_info - Get detailed information about a specific site
- create_site - Create a new WordPress site
- update_site - Update existing site settings
- delete_site - Delete a site
Installation
Prerequisites
- Node.js (v18 or higher)
- WP Engine account with API access
- WP Engine API token
Setup
-
Clone/Download the server code:
# Clone or download the server to your desired location cd /path/to/your/mcp-servers # If cloning from git repository git clone <repository-url> wpengine-mcp-server cd wpengine-mcp-server
-
Install dependencies:
npm install
-
Build the server:
npm run build
-
Get your WP Engine API credentials:
- Log into your WP Engine account
- Navigate to the API Access section in your dashboard
- Generate a new API token ID and password
- Copy the auth token ID and password for configuration
Configuration
Claude Desktop Configuration
The server is configured in your Claude Desktop app. Update the configuration file at:
~/Library/Application Support/Claude/claude_desktop_config.json
Replace the path with your actual server location and add your WP Engine API credentials:
{
"mcpServers": {
"wpengine-mcp-server": {
"command": "node",
"args": [
"/path/to/your/wpengine-mcp-server/build/index.js"
],
"env": {
"WPENGINE_AUTH_TOKEN_ID": "your-auth-token-id",
"WPENGINE_AUTH_PASSWORD": "your-auth-password"
},
"disabled": false,
"alwaysAllow": [],
"disabledTools": []
}
}
}
Environment Variables
The server supports the following environment variables:
WPENGINE_AUTH_TOKEN_ID
(required) - Your WP Engine API auth token IDWPENGINE_AUTH_PASSWORD
(required) - Your WP Engine API auth passwordWPENGINE_API_BASE_URL
(optional) - API base URL (default: https://api.wpengineapi.com/v1)WPENGINE_REQUEST_TIMEOUT
(optional) - Request timeout in ms (default: 30000)
Deployment
WP Engine Atlas Deployment
WP Engine Atlas is a modern headless WordPress platform that supports Node.js applications. You can deploy this MCP server on Atlas for production use.
Prerequisites for Atlas Deployment
- WP Engine Atlas Account - Sign up at wpengine.com/atlas
- WP Engine CLI - Install the WP Engine CLI tool:
npm install -g @wpengine/cli
- Git Repository - Your code must be in a Git repository
- Node.js 18+ - Ensure your Atlas environment supports Node.js 18 or higher
Atlas Deployment Steps
-
Configure Atlas Application (
wpe.json
):{ "name": "wpengine-mcp-server", "repo": "your-organization/wpengine-mcp-server", "region": "US-C", "environments": [ { "name": "Production", "branch": "main", "wp_environment_name": "YOUR WordPress environment name", "domains": ["your-domain.com"], "env_variables": [ { "key": "WPENGINE_AUTH_TOKEN_ID", "value": "your-wpengine-auth-token-id" }, { "key": "WPENGINE_AUTH_PASSWORD", "value": "your-wpengine-auth-password" }, { "key": "WPENGINE_API_BASE_URL", "value": "https://api.wpengineapi.com/v1" }, { "key": "WPENGINE_REQUEST_TIMEOUT", "value": "30000" } ] } ] }
-
Deploy to Atlas:
# Login to WP Engine wpe auth login # Create Atlas application wpe apps create # Deploy your application wpe apps deploy
Atlas Configuration Options
- Region: Choose from available regions (US-C, US-E, EU-W, etc.)
- Environment Variables: Configure via the
wpe.json
file - Domains: Custom domains can be configured in the environments array
- WordPress Environment: Link to existing WP Engine WordPress environment if needed
Production Considerations
- Environment Variables: Use Atlas environment variables for API credentials
- Monitoring: Enable Atlas monitoring and logging through the dashboard
- SSL/TLS: Atlas provides automatic SSL certificates
- Custom Domains: Configure custom domains in the
wpe.json
file - Git Integration: Atlas automatically deploys from your specified Git branch
Remote MCP Server Configuration
When deployed on Atlas, configure as a remote MCP server in your Claude Desktop configuration:
{
"mcpServers": {
"wpengine-mcp-server": {
"url": "https://your-atlas-app.wpengine.com",
"disabled": false,
"alwaysAllow": [],
"disabledTools": []
}
}
}
Note: This MCP server is designed to run in stdio mode for local development. For production deployment on Atlas, you may need to implement HTTP transport for the MCP protocol.
Usage
Once configured, you can use the following tools through Claude:
List Sites
"List all my WP Engine sites"
Get Site Information
"Get information about site with ID abc123"
Create Site
"Create a new WP Engine site called 'my-blog' with PHP 8.2"
Update Site
"Update site abc123 to use PHP 8.1"
Delete Site
"Delete site with ID abc123"
Tool Schemas
list_sites
- Parameters: None
- Returns: Array of site objects with basic information
get_site_info
- Parameters:
site_id
(string, required) - Site ID
- Returns: Complete site details
create_site
- Parameters:
name
(string, required) - Site nameenvironment
(string, optional) - Environment type (production, staging, development)php_version
(string, optional) - PHP versionwp_version
(string, optional) - WordPress version
- Returns: New site details
update_site
- Parameters:
site_id
(string, required) - Site IDname
(string, optional) - New site namephp_version
(string, optional) - New PHP versionwp_version
(string, optional) - New WordPress versionbackup_enabled
(boolean, optional) - Enable/disable backupscdn_enabled
(boolean, optional) - Enable/disable CDNssl_enabled
(boolean, optional) - Enable/disable SSL
- Returns: Updated site information
delete_site
- Parameters:
site_id
(string, required) - Site ID
- Returns: Confirmation message
Error Handling
The server includes comprehensive error handling:
- Authentication errors - Invalid API token
- Authorization errors - Insufficient permissions
- Rate limiting - API rate limit exceeded
- Validation errors - Invalid input parameters
- Network errors - Connection issues
- API errors - WP Engine API specific errors
Development
Project Structure
wpengine-mcp-server/
āāā src/
ā āāā index.ts # Main server implementation
ā āāā types/ # TypeScript type definitions
ā ā āāā wpengine.ts
ā āāā services/ # API service layer
ā ā āāā wpengine-api.ts
ā āāā utils/ # Utility functions
ā āāā validation.ts
āāā build/ # Compiled JavaScript
āāā package.json
āāā tsconfig.json
āāā README.md
Build Commands
# Build the server
npm run build
# Watch for changes during development
npm run watch
# Run the server directly (for testing)
node build/index.js
Troubleshooting
- Server not starting: Check that your API credentials are valid and properly configured
- API errors: Ensure your WP Engine account has API access enabled
- Permission errors: Verify your API token has the necessary permissions
- Network issues: Check your internet connection and firewall settings
Security
- API credentials are passed via environment variables
- All API communications use HTTPS
- Input validation prevents malicious data
- Error messages don't expose sensitive information
Support
For issues related to:
- MCP Server functionality: Check the server logs and configuration
- WP Engine API: Consult WP Engine documentation and support
- Claude Desktop: Refer to Anthropic's documentation
Version: 0.1.0 Author: Generated by Claude License: MIT