WordPress MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@WordPress MCP Servershow me the latest 5 posts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
WordPress MCP Server (using PHP SDK)
A professional WordPress MCP (Model Context Protocol) server that enables AI assistants like Claude to interact with your WordPress site through a standardized protocol.
What is this?
This server exposes your WordPress content, taxonomies, and site information through MCP tools, allowing AI assistants to:
List, read, create, update, and delete WordPress content (posts, pages, custom post types)
Manage taxonomies (categories, tags, custom taxonomies) and terms
Discover content types and taxonomies
Search content by URL or slug
Related MCP server: WordPress MCP Server
Features
⨠17 WordPress Tools
Content Management:
list_content,get_content,create_content,update_content,delete_contentContent Discovery:
discover_content_types,get_content_by_slug,find_content_by_urlTaxonomy Management:
list_terms,get_term,create_term,update_term,delete_termTaxonomy Discovery:
discover_taxonomies,get_taxonomyTerm Assignment:
assign_terms_to_content,get_content_terms
š Secure & Production Ready
Built with official PHP MCP SDK
Comprehensive validation using Respect/Validation
Proper error handling and logging
110+ passing unit tests
š Easy Integration
HTTP transport via StreamableHTTP (no complicated setup)
Works with Claude Desktop via mcp-remote
Simple installation in WordPress root
Installation
Step 1: Install in WordPress
Download this repository
Place the entire directory in your WordPress root folder (where
wp-config.phpis located)Rename the directory to something simple like
mcp-server
Your directory structure should look like:
/your-wordpress-site/
āāā wp-admin/
āāā wp-content/
āāā wp-includes/
āāā wp-config.php
āāā mcp-server/ ā This directory
ā āāā index.php
ā āāā vendor/
ā āāā ...Step 2: Install Dependencies
Open terminal in the mcp-server directory and run:
composer install --no-devStep 3: Configure WordPress Path
The MCP server needs to know where your WordPress installation is located.
Copy the configuration template:
cp config.example.php config.phpEdit
config.phpand set thewordpress_pathto your WordPress installation:If MCP server is in WordPress root subdirectory (recommended):
'wordpress_path' => '../wp-load.php',If WordPress is in a subdirectory (development):
'wordpress_path' => 'wp/wp-load.php',Using absolute path:
// Linux/macOS 'wordpress_path' => '/var/www/html/wp-load.php', // Windows (use forward slashes) 'wordpress_path' => 'C:/xampp/htdocs/mysite/wp-load.php',
Important: The config.php file is git-ignored and specific to your installation. Never commit it to version control.
Step 3.5: (Optional) Enable Safe Mode
Safe mode prevents destructive delete operations, providing an extra layer of protection for your WordPress content.
What Safe Mode Does:
Blocks:
delete_contentanddelete_termoperationsAllows: All read operations and write operations (create, update)
When to Enable Safe Mode:
Production environments where accidental deletions must be prevented
Shared environments with multiple users
Read-mostly or limited-write access scenarios
Testing and development where data preservation is important
To Enable Safe Mode:
Edit config.php and set:
'safe_mode' => true,When a delete operation is attempted with safe mode enabled, the tool will return an error message:
Operation blocked: Safe mode is enabled. Deleting content is not allowed.Default: Safe mode is OFF (false), allowing all operations including deletions.
Step 4: Verify Access
Make sure your web server (Apache/Nginx) can access the mcp-server directory.
Access URL:
The server will be accessible at: https://your-site.com/mcp-server/index.php
Step 5: Test the Server
Visit https://your-site.com/mcp-server/index.php in your browser. You should see a JSON response indicating the MCP server is running.
Claude Desktop Integration
This server supports two connection methods:
Option 1: HTTP Transport (Recommended for Remote Sites)
Use this method when connecting to a remote WordPress site via HTTP/HTTPS.
Install mcp-remote (optional, Claude Desktop can do this itself):
npm install -g mcp-remoteConfigure Claude Desktop:
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"wordpress": {
"command": "npx",
"args": [
"mcp-remote",
"https://your-site.com/mcp-server/index.php"
]
}
}
}Note: Replace https://your-site.com/mcp-server/index.php with your actual URL.
For local development (HTTP without SSL):
{
"mcpServers": {
"wordpress": {
"command": "npx",
"args": [
"mcp-remote",
"http://your-local-site.test/mcp-server/index.php",
"--allow-http"
]
}
}
}Option 2: Stdio Transport (Recommended for Local Sites)
Use this method when running WordPress locally on the same machine as Claude Desktop. This is faster and doesn't require HTTP.
Configure Claude Desktop:
{
"mcpServers": {
"wordpress": {
"command": "php",
"args": [
"/absolute/path/to/your-wordpress-site/mcp-server/server.php"
]
}
}
}Example for macOS/Linux:
{
"mcpServers": {
"wordpress": {
"command": "php",
"args": [
"/Users/yourname/Sites/mywordpress/mcp-server/server.php"
]
}
}
}Example for Windows:
{
"mcpServers": {
"wordpress": {
"command": "php",
"args": [
"C:\\xampp\\htdocs\\mywordpress\\mcp-server\\server.php"
]
}
}
}Note:
Make sure
phpis in your system PATHUse the absolute path to
server.phpStdio transport doesn't require a web server to be running
Restart Claude Desktop
After adding the configuration, restart Claude Desktop completely (quit and reopen).
Using with Claude
Once configured, you can ask Claude things like:
"List all my blog posts"
"Create a new draft post titled 'Hello World'"
"What categories do I have?"
"Update post ID 5 to published status"
"Find the post with URL https://mysite.com/my-post"
"Show me all pages on my site"
Claude will use the MCP tools to interact with your WordPress site automatically!
Example Prompts
Content Management:
"List my latest 5 published posts"
"Create a new post titled 'My New Article' with some sample content"
"Update the post titled 'About Us' to change its status to draft"
"Show me all draft posts"
Taxonomy Management:
"List all categories"
"Create a new category called 'Technology'"
"What tags exist on my site?"
"Assign the 'Technology' category to post ID 10"
Discovery:
"What content types does my WordPress site have?"
"What taxonomies are registered?"
"Find the post at URL https://mysite.com/2024/hello-world"
Troubleshooting
Server not responding
Check URL: Make sure the URL in your Claude config is correct and accessible
Clear sessions: Delete the
sessions/directory contents:rm -rf mcp-server/sessions/*Check permissions: Ensure the web server can read/write to the
sessions/directory
chmod -R 755 mcp-server/
chmod -R 777 mcp-server/sessions/"Connection refused" or "Cannot connect"
Verify the server is running: Visit the URL in your browser
Check firewall: Ensure your firewall allows access to the web server
Check SSL: For HTTPS sites, ensure your SSL certificate is valid
Tools not working
Check WordPress path: Verify that
config.phphas the correct path to your WordPress installation:'wordpress_path' => '../wp-load.php', // Update this pathClear sessions:
rm -rf sessions/*Check error logs: Look at
php-errors.login the mcp-server directory
Claude can't see the tools
Restart Claude Desktop completely (quit and reopen, don't just close the window)
Check config syntax: Ensure your
claude_desktop_config.jsonis valid JSONCheck logs: Claude Desktop logs are at:
macOS:
~/Library/Logs/Claude/Windows:
%APPDATA%\Claude\logs\
Testing the Server
You can test the MCP server directly using the MCP inspector:
# Install inspector
npm install -g @modelcontextprotocol/inspector
# List all tools
npx @modelcontextprotocol/inspector --cli https://your-site.com/mcp-server/index.php --transport http --method tools/list
# Test a tool
npx @modelcontextprotocol/inspector --cli https://your-site.com/mcp-server/index.php --transport http --method tools/call --tool-name discover_content_typesSecurity Considerations
ā ļø Important Security Notes:
Authentication: This server does NOT include authentication. Make sure to:
Use HTTPS (SSL/TLS) for all connections
Restrict access using web server configuration (IP whitelist, Basic Auth, etc.)
Consider implementing WordPress authentication in production
Access Control: The server has full access to your WordPress database through WordPress functions. Only expose it to trusted clients.
Firewall: Consider using a firewall or VPN to restrict access to trusted IPs only. You can configure IP restrictions in your web server configuration (Apache VirtualHost or Nginx server block).
Development
For developers who want to extend this server:
See
CLAUDE.mdfor development documentationRun tests:
composer testRun static analysis:
composer analyseInspector tests:
./tests/inspector-tests.sh
Requirements
PHP 8.2 or higher
WordPress 5.0 or higher
Composer
Node.js and npm (for mcp-remote)
Support
For issues, questions, or contributions, please visit the project repository.
License
This project is licensed under the MIT License.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with WordPress sites through REST APIs, allowing programmatic management of posts, users, comments, categories, and tags with secure authentication.Last updated2948MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to manage WordPress sites through natural conversation, supporting post creation, content updates, site queries, and draft-to-publish workflows via the WordPress REST API.Last updated9MIT
- Alicense-qualityDmaintenanceEnables AI assistants to manage and interact with WordPress sites through MCP, providing tools for content creation, moderation, WooCommerce operations, and governance.Last updated46GPL 2.0
- Flicense-qualityDmaintenanceEnables WordPress content management through the Model Context Protocol, allowing AI agents to create, read, update, and delete posts, metadata, taxonomies, and terms, as well as interact with Gutenberg blocks.Last updated1
Related MCP Connectors
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
WordPress MCP server: publish posts, AI images, SEO and full site management, self-hosted
WordPress MCP server: generate SEO posts, AI images, autoblog & WooCommerce on your self-hosted site
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/InstaWP/mcp-wp-php'
If you have feedback or need assistance with the MCP directory API, please join our Discord server