WP-CLI as an MCP Host
Enabling AI-Powered WordPress Development
π CF Hackathon 2025 Project Results π
The team developed a solution to enable AI-powered WordPress site manipulation via a terminal by implementing the Model Context Protocol (MCP) in the WordPress ecosystem through a command line interface (WP-CLI). Their versatile interface is capable of connecting not only with WordPress MCP servers but with any MCP server.
Despite working with bleeding-edge technology, the team successfully implemented a robust server that exposes REST API routes and WP-CLI commands as function-calling capabilities. They complemented this with an MCP client able to connect to multiple servers and a provider-agnostic LLM integration for natural language processing. Their innovation extended to image editing capabilities using a newly released Gemini API that had only become available days before the hackathon.
The project holds promising potential for future development, particularly the possibility of implementing the MCP server in WordPress core or as a plugin. The team has made their work available through GitHub for ongoing collaboration and development. The activity of influential participants on their team across social media platforms earned them the Social Media Master Award, generating the highest engagement among all hackathon projects.
Pitch Video Interview
Project Description
WordPress development workflows currently lack seamless integration with AI capabilities, particularly during local development. While REST API endpoints enable AI interactions with live sites, developers working with local WordPress installations have limited options for AI-assisted content creation and site management. This project aims to bridge this gap by implementing the Model Context Protocol (MCP) in the WordPress ecosystem, specifically integrating it with WP-CLI.
The core innovation is transforming WordPress into an MCP Server and WP-CLI into an MCP Host through a new package, enabling direct AI interactions with WordPress installations during development. This approach provides developers with powerful AI capabilities without requiring a live site or REST API endpoints.
WordPress MCP Server Layer:
- Implementation of MCP Server interfaces in WordPress
- Resource providers for posts, pages, media, and other WordPress content types
- Tool definitions for common WordPress actions (content creation, media handling)
- Context providers for WordPress configuration and site state
WP-CLI MCP Host Package:
- MCP Host implementation within WP-CLI framework
- New command namespace for AI operations
- Integration with (local and remote) LLM providers
- Transport layer for local WordPress communication
Target Audience
- WordPress developers working with local environments
- DevOps teams managing multiple WordPress installations
- Content creators using WP-CLI in their workflow
- Plugin and theme developers requiring testing data
Hackathon Goals
- Core Implementation
- Functional WP-CLI MCP Host package
- Basic WordPress MCP Server implementation
- Example commands for content generation
- Developer Experience
- Documentation and setup guides
- Debug tooling integration
- Example workflows and use cases
- Demo Scenarios
- Content generation with context awareness
- Media handling and featured image generation
- Bulk operations with AI assistance
Project Lead

Pascal Birchler
Software Engineer at Google
WP-CLI Maintainer

Project Link π
π GitHub Repository
#AI
#MCP
#LLM
#WP-CLI
#WordPress