- Explore MCP Servers
- mcp-for-wordpress
Mcp For Wordpress
What is Mcp For Wordpress
mcp-for-wordpress is a streamlined version of the Model Context Protocol (MCP) TypeScript SDK designed specifically for integrating with WordPress. It facilitates interaction with WordPress sites through the WordPress REST API using the MCP protocol.
Use cases
Use cases include automating the creation of blog posts, retrieving and displaying posts on external applications, and updating existing content programmatically, making it ideal for developers and content managers.
How to use
To use mcp-for-wordpress, clone the repository and install the dependencies using ‘npm install’. Configure the integration by setting environment variables for your WordPress site URL, username, and application password, or by providing these credentials directly in the request parameters.
Key features
Key features include creating new WordPress posts, retrieving existing posts, and updating posts. It allows for flexible configuration and secure authentication using WordPress application passwords.
Where to use
mcp-for-wordpress can be used in web development projects that require integration with WordPress, particularly for automating content management tasks and enhancing the functionality of WordPress sites.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp For Wordpress
mcp-for-wordpress is a streamlined version of the Model Context Protocol (MCP) TypeScript SDK designed specifically for integrating with WordPress. It facilitates interaction with WordPress sites through the WordPress REST API using the MCP protocol.
Use cases
Use cases include automating the creation of blog posts, retrieving and displaying posts on external applications, and updating existing content programmatically, making it ideal for developers and content managers.
How to use
To use mcp-for-wordpress, clone the repository and install the dependencies using ‘npm install’. Configure the integration by setting environment variables for your WordPress site URL, username, and application password, or by providing these credentials directly in the request parameters.
Key features
Key features include creating new WordPress posts, retrieving existing posts, and updating posts. It allows for flexible configuration and secure authentication using WordPress application passwords.
Where to use
mcp-for-wordpress can be used in web development projects that require integration with WordPress, particularly for automating content management tasks and enhancing the functionality of WordPress sites.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
WordPress MCP Integration
This is a streamlined version of the Model Context Protocol (MCP) TypeScript SDK that focuses specifically on WordPress integration. It enables interaction with WordPress sites through the WordPress REST API using the MCP protocol.
Overview
The WordPress MCP integration allows you to:
- Create new WordPress posts
- Retrieve existing WordPress posts
- Update existing WordPress posts
Installation
- Clone this repository
- Install dependencies:
npm install
Configuration
There are two ways to configure the WordPress integration:
1. Environment Variables
Set the following environment variables:
WORDPRESS_SITE_URL: Your WordPress site URLWORDPRESS_USERNAME: WordPress usernameWORDPRESS_PASSWORD: WordPress application password
2. Request Parameters
Provide the credentials directly in the request parameters when calling the tools.
Security Note
For security, it’s recommended to use WordPress application passwords instead of your main account password. You can generate an application password in your WordPress dashboard under Users → Security → Application Passwords.
Available Tools
create_post
Creates a new WordPress post.
Parameters:
siteUrl: (optional if set in env) WordPress site URLusername: (optional if set in env) WordPress usernamepassword: (optional if set in env) WordPress application passwordtitle: Post titlecontent: Post contentstatus: (optional) ‘draft’ | ‘publish’ | ‘private’ (default: ‘draft’)
Example:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_post",
"arguments": {
"title": "My New Post",
"content": "Hello World!",
"status": "draft"
}
}
}
get_posts
Retrieves WordPress posts.
Parameters:
siteUrl: (optional if set in env) WordPress site URLusername: (optional if set in env) WordPress usernamepassword: (optional if set in env) WordPress application passwordperPage: (optional) Number of posts per page (default: 10)page: (optional) Page number (default: 1)
Example:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_posts",
"arguments": {
"perPage": 5,
"page": 1
}
}
}
update_post
Updates an existing WordPress post.
Parameters:
siteUrl: (optional if set in env) WordPress site URLusername: (optional if set in env) WordPress usernamepassword: (optional if set in env) WordPress application passwordpostId: ID of the post to updatetitle: (optional) New post titlecontent: (optional) New post contentstatus: (optional) ‘draft’ | ‘publish’ | ‘private’
Example:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "update_post",
"arguments": {
"postId": 123,
"title": "Updated Post Title",
"status": "publish"
}
}
}
Running the Server
Start the WordPress MCP server:
npm run server
This will start the server on stdio by default. To run it on a specific port (e.g., 3000):
npm run server 3000
Requirements
- Node.js 18.0.0 or higher
- WordPress site with REST API enabled
- WordPress application password for authentication
License
MIT License - See LICENSE file for details
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










