WordPress REST API integration for content management.
## WordPress REST MCP Server: WordPress API Integration The **WordPress REST MCP Server** integrates WordPress REST API into Google Antigravity, enabling content management, custom post types, and WooCommerce integration directly from your development environment. ### Why WordPress REST MCP? - **Universal Platform**: Power 40% of the web with WordPress - **REST API**: Modern API for headless implementations - **Custom Post Types**: Support for any content structure - **WooCommerce**: E-commerce integration built-in - **Plugin Ecosystem**: Extend with thousands of plugins ### Key Features #### 1. Post Operations ```python # Get posts posts = await mcp.get_posts( per_page=10, status="publish", orderby="date", order="desc", categories=[5, 8] ) for post in posts: print(f"Post: {post['title']['rendered']}") # Get single post post = await mcp.get_post( id=123, _embed=True # Include featured image, author, etc. ) ``` #### 2. Content Management ```python # Create post post = await mcp.create_post( title="New Post", content="Post content with <strong>HTML</strong>...", status="draft", categories=[5], tags=[10, 15], featured_media=100 ) # Update post await mcp.update_post( id=post["id"], status="publish" ) # Delete post await mcp.delete_post(id=123, force=True) ``` #### 3. Media Operations ```python # Upload media media = await mcp.upload_media( file_path="./images/featured.jpg", title="Featured Image", alt_text="Article featured image" ) # Get media media_item = await mcp.get_media(id=media["id"]) print(f"URL: {media_item['source_url']}") ``` #### 4. Taxonomy Operations ```python # Get categories categories = await mcp.get_categories() for cat in categories: print(f"Category: {cat['name']} ({cat['count']} posts)") # Create tag tag = await mcp.create_tag( name="New Tag", description="Tag description" ) # Get custom taxonomy terms terms = await mcp.get_terms(taxonomy="product_cat") ``` ### Configuration ```json { "mcpServers": { "wordpress-rest": { "command": "npx", "args": ["-y", "@anthropic/mcp-wordpress"], "env": { "WORDPRESS_URL": "https://your-wordpress-site.com", "WORDPRESS_USERNAME": "your-username", "WORDPRESS_APP_PASSWORD": "your-app-password" } } } } ``` ### Use Cases **Headless WordPress**: Use WordPress as a headless CMS for modern frontends. **Content Migration**: Migrate or sync content between WordPress sites. **Publishing Automation**: Automate content publishing workflows. **WooCommerce Integration**: Manage products and orders programmatically. The WordPress REST MCP enables WordPress integration within your development environment.
{
"mcpServers": {
"wordpress-rest": {}
}
}