WordPress MCP Server
Enables AI agents to interact with WordPress websites through structured tools, supporting posts, pages, media, users, categories, tags, plugins, themes, menus, and WooCommerce with secure authentication.
README
WordPress MCP Server
A production-ready Model Context Protocol (MCP) server for WordPress integration. Enables AI agents to interact with WordPress websites through structured tools.
Features
- 39 WordPress tools covering posts, pages, media, users, categories, tags, plugins, themes, menus, and WooCommerce
- Secure authentication using WordPress Application Passwords
- Destructive operation protection requiring explicit confirmation
- Structured error handling with detailed error codes
- Pagination support for list operations
- Environment-based configuration for credentials
Prerequisites
- Node.js 18+
- WordPress site with REST API enabled
- WordPress Application Password for authentication
Installation
npm install
npm run build
Configuration
Create a .env file in the project root:
WORDPRESS_URL=https://your-wordpress-site.com
WORDPRESS_USERNAME=your-username
WORDPRESS_APP_PASSWORD=your-application-password
Generating Application Passwords
- Go to WordPress Admin → Users → Your Profile
- Scroll to "Application Passwords"
- Enter a name (e.g., "MCP Server")
- Click "Add New Application Password"
- Copy the generated password
Usage
Running the Server
# Development
npm run dev
# Production
npm start
Integration with MCP Clients
Add to your MCP client configuration:
{
"mcp": {
"wordpress": {
"type": "local",
"command": ["node", "/path/to/wordpress-mcp-server/dist/index.js"],
"environment": {
"WORDPRESS_URL": "https://your-site.com",
"WORDPRESS_USERNAME": "your-username",
"WORDPRESS_APP_PASSWORD": "your-app-password"
}
}
}
}
Available Tools
Site Operations
| Tool | Description |
|---|---|
get_site_info |
Get site name, description, URLs |
get_site_settings |
Get site configuration |
get_site_health |
Get health diagnostics |
get_performance |
Get performance metrics |
search_site |
Search content across site |
Post Operations
| Tool | Description |
|---|---|
list_posts |
List posts with filtering |
get_post |
Get single post by ID |
create_post |
Create new post |
update_post |
Update existing post |
delete_post |
Delete post (requires confirmation) |
publish_post |
Publish draft post |
Page Operations
| Tool | Description |
|---|---|
list_pages |
List pages with filtering |
get_page |
Get single page by ID |
create_page |
Create new page |
update_page |
Update existing page |
delete_page |
Delete page (requires confirmation) |
Media Operations
| Tool | Description |
|---|---|
list_media |
List media library items |
upload_media |
Upload media file |
delete_media |
Delete media (requires confirmation) |
User Operations
| Tool | Description |
|---|---|
list_users |
List users with filtering |
get_user |
Get single user by ID |
create_user |
Create new user |
update_user |
Update existing user |
Taxonomy Operations
| Tool | Description |
|---|---|
list_categories |
List categories |
create_category |
Create new category |
list_tags |
List tags |
create_tag |
Create new tag |
Plugin Operations
| Tool | Description |
|---|---|
list_plugins |
List installed plugins |
activate_plugin |
Activate plugin (requires confirmation) |
deactivate_plugin |
Deactivate plugin (requires confirmation) |
Theme Operations
| Tool | Description |
|---|---|
list_themes |
List installed themes |
activate_theme |
Activate theme (requires confirmation) |
Menu Operations
| Tool | Description |
|---|---|
get_menus |
Get navigation menus |
update_menu |
Update menu |
WooCommerce Operations
| Tool | Description |
|---|---|
get_woocommerce_products |
List products |
create_woocommerce_product |
Create product |
update_woocommerce_product |
Update product |
get_woocommerce_orders |
List orders |
get_woocommerce_customer |
List customers |
Security
- Credentials stored in environment variables (never exposed in output)
- Destructive operations require explicit confirmation
- Read-only operations execute automatically
- Authentication for all protected resources
Development
# Run in development mode
npm run dev
# Build for production
npm run build
# Run tests
npm test
Project Structure
wordpress-mcp-server/
├── src/
│ ├── index.ts # Entry point
│ ├── server.ts # MCP server setup
│ ├── client/
│ │ └── wordpress.ts # WordPress API client
│ ├── tools/
│ │ ├── index.ts # Tool registration
│ │ ├── definitions.ts # Tool schemas
│ │ ├── site.ts # Site tools
│ │ ├── posts.ts # Post tools
│ │ ├── pages.ts # Page tools
│ │ ├── media.ts # Media tools
│ │ ├── users.ts # User tools
│ │ ├── taxonomies.ts # Taxonomy tools
│ │ ├── plugins.ts # Plugin tools
│ │ ├── themes.ts # Theme tools
│ │ ├── menus.ts # Menu tools
│ │ └── woocommerce.ts # WooCommerce tools
│ ├── validation/
│ │ └── schemas.ts # Zod validation schemas
│ ├── types/
│ │ └── index.ts # TypeScript type definitions
│ └── utils/
│ ├── config.ts # Environment configuration
│ └── logger.ts # Structured logging
├── package.json
├── tsconfig.json
└── .env.example
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.