banildmcp
v2.2.0
Published
Banild MCP server for WordPress with 56 core tools (77+ with BanildTools plugin) for complete site management through AI. Dynamic tool loading via /tools endpoint discovery.
Readme
BanildMCP - WordPress MCP Server
A comprehensive MCP (Model Context Protocol) server for WordPress management with 54+ core tools (77 with BanildTools plugin) for complete site management through AI assistants like Claude.
🚀 What's New in v2.1.0
Dynamic Tool Loading - The MCP server now automatically detects whether the BanildTools WordPress plugin is installed:
- ✅ Without BanildTools: All core WordPress REST API tools work (posts, pages, media, users, comments, settings, plugins, themes, WooCommerce, SEO, etc.)
- ✅ With BanildTools: Additional 23 file operation and server management tools become available
This means users who don't have the BanildTools plugin can still use the MCP server for standard WordPress management!
BanildTools Features (when plugin is installed)
- 📄 Read/Write/Append files with line range support
- 🔄 Edit files with search & replace
- 🗑️ Delete files and directories
- 📁 List directories with filtering
- 🔍 Grep search - regex pattern matching across files
- 📂 Glob search - find files by pattern
- 📁 Create directories recursively
- 📝 Rename/move files and directories
- 📋 Copy files and directories
- ⚙️ WordPress Options - get, set, delete options and transients
- 🗄️ Database queries - read-only SELECT queries
- 🔧 Server tools - PHP lint, cache clear, debug log, server info
Note: File operations require the BanildTools WordPress plugin to be installed and active.
📦 Installation
npm install -g banildmcpOr use with npx:
npx banildmcp⚙️ Configuration
Set environment variables:
export WORDPRESS_URL="https://your-site.com"
export WORDPRESS_USERNAME="your-username"
export WORDPRESS_PASSWORD="xxxx xxxx xxxx xxxx" # Application Password
# Optional: WooCommerce credentials
export WC_CONSUMER_KEY="ck_..."
export WC_CONSUMER_SECRET="cs_..."MCP Client Configuration
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"banildmcp": {
"command": "npx",
"args": ["-y", "banildmcp"],
"env": {
"WORDPRESS_URL": "https://your-site.com",
"WORDPRESS_USERNAME": "your-username",
"WORDPRESS_PASSWORD": "xxxx xxxx xxxx xxxx"
}
}
}
}🔧 Available Tools
Core Tools (54 - Always Available)
📝 Posts (15 tools)
wordpress_create_post- Create new postswordpress_update_post- Update existing postswordpress_delete_post- Delete posts (trash or permanent)wordpress_get_posts- List posts with filteringwordpress_get_post- Get single post detailswordpress_search_posts- Search posts by keywordwordpress_schedule_post- Schedule for future publicationwordpress_publish_post- Publish immediatelywordpress_duplicate_post- Clone a postwordpress_get_post_revisions- View edit historywordpress_bulk_create_posts- Batch createwordpress_bulk_update_posts- Batch updatewordpress_bulk_delete_posts- Batch delete
📄 Pages (4 tools)
wordpress_create_page- Create pages with hierarchywordpress_update_page- Update pageswordpress_get_pages- List pageswordpress_delete_page- Delete pages
🖼️ Media (5 tools)
wordpress_upload_media- Upload from base64 or URLwordpress_get_media- List media librarywordpress_update_media- Update metadatawordpress_delete_media- Remove from librarywordpress_set_featured_image- Set post thumbnail
👥 Users (4 tools)
wordpress_create_user- Create with roleswordpress_get_users- List with filteringwordpress_update_user- Update user datawordpress_delete_user- Delete with content reassignment
📁 Categories (4 tools)
wordpress_create_category- Create with hierarchywordpress_get_categories- List allwordpress_update_category- Updatewordpress_delete_category- Delete
🏷️ Tags (2 tools)
wordpress_create_tag- Create tagswordpress_get_tags- List tags
💬 Comments (4 tools)
wordpress_create_comment- Add commentswordpress_get_comments- List with filteringwordpress_update_comment- Moderate/editwordpress_delete_comment- Remove
⚙️ Site Management (6 tools)
wordpress_get_site_info- Site information & routeswordpress_test_connection- Test authenticationwordpress_get_settings- Get site settingswordpress_update_settings- Update settingswordpress_get_plugins- List installed pluginswordpress_get_themes- List installed themes
🔌 Plugin Management (3 tools)
wordpress_install_plugin- Install by slug or URLwordpress_activate_plugin- Activate pluginswordpress_search_plugins- Search WordPress.org
🔍 SEO & Meta (2 tools)
wordpress_set_seo_meta- Yoast/Rank Math/AIOSEO supportwordpress_set_custom_meta- Custom post meta
📦 Custom Post Types (4 tools)
wordpress_get_cpt- Get CPT itemswordpress_create_cpt- Create CPT itemswordpress_update_cpt- Update CPT itemswordpress_delete_cpt- Delete CPT items
🛒 WooCommerce (4 tools)
woocommerce_get_products- List productswoocommerce_create_product- Create productswoocommerce_update_product- Update productswoocommerce_delete_product- Delete products
⚛️ React Integration (1 tool)
wordpress_create_react_page- Create pages with React components
📂 BanildTools Extended Tools (23 tools) - Requires Plugin
These tools are dynamically loaded only when BanildTools WordPress plugin is detected
File Operations (12 tools)
banildtools_read_file- Read file contents with optional line rangebanildtools_write_file- Create or overwrite filesbanildtools_append_file- Append content to files (for large files)banildtools_edit_file- Search and replace in filesbanildtools_delete_file- Delete files or directoriesbanildtools_list_dir- List directory contentsbanildtools_file_info- Get detailed file/directory infobanildtools_grep- Search for patterns in files (regex)banildtools_glob_search- Find files matching glob patternbanildtools_mkdir- Create directoriesbanildtools_rename- Rename or move files/directoriesbanildtools_copy- Copy files/directories
WordPress Options & Transients (6 tools)
banildtools_get_option- Get WordPress option valuebanildtools_set_option- Set WordPress optionbanildtools_delete_option- Delete WordPress optionbanildtools_get_transient- Get transient valuebanildtools_set_transient- Set transient with expirationbanildtools_delete_transient- Delete transient
Server & Database Tools (5 tools)
banildtools_debug_log- Read, tail, or clear debug.logbanildtools_php_lint- Check PHP syntax for errorsbanildtools_clear_cache- Clear WordPress cachesbanildtools_server_info- Get comprehensive server infobanildtools_db_query- Execute read-only SELECT queries
🔐 Authentication
Uses WordPress Application Passwords:
- Go to WordPress admin: Users → Your Profile
- Scroll to Application Passwords
- Create a new application password
- Use with your username for
WORDPRESS_PASSWORD
📋 Examples
Create a Blog Post
Create a new blog post titled "AI in 2025" with content about artificial intelligence trends. Schedule it for next Monday at 9 AM.Manage Media
Upload this image URL to WordPress and set it as the featured image for post ID 42.File Operations (requires BanildTools plugin)
Read the contents of wp-content/themes/mytheme/functions.php
Search for all PHP files containing "add_action" in the plugins directory
Create a new file at wp-content/plugins/myplugin/custom.php with this content: <?php // Custom code
Get the WordPress site URL option value
Execute a SQL query to count all published postsWooCommerce
List all products under $50 and update their prices by 10%.🛠️ BanildTools Plugin Setup
To use file operations, install the BanildTools WordPress plugin:
- Download from releases or install manually
- Activate in WordPress admin
- Configure allowed paths in Settings → BanildTools
- Enable write/delete operations as needed
Security features:
- Path restrictions to allowed directories
- Blocked file extensions
- Separate write/delete permission toggles
- Admin-only access
📄 License
MIT License - see LICENSE
🤝 Contributing
Contributions welcome! Please open an issue or PR on GitHub.
👤 Author
Banild.Ai
Made with ❤️ for the WordPress & AI community
