This is part of the AI Building Blocks for WordPress initiative. The main projects are PHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/preface.php. AI Client SDK, Abilities API An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways., MCP Adapter, and the AI Experiments Plugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party.
Introduction
Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to LLMs. In WordPress, the MCP Adapter (GitHub) implements this open standard, exposing Abilities to AI assistants, while also connecting to other MCP servers.
MCP’s applications are transformative for various users. Content creators can manage their WordPress sites conversationally, while developers can automate complex workflows across systems. Agencies can build sophisticated integrations, from content migration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. to performance optimization.
Consider a typical workflow: an AI assistant receives a request to publish a blog post. Through MCP, it can research topics using external tools, generate content, create images, optimize for SEO, and schedule publication. This entire process happens via natural conversation, respecting permissions and requiring approval when configured.
Two-Way Communication
WordPress can operate as both an MCP server and client, exposing its functionality and connecting to other tools within the MCP ecosystem. This bidirectional functionality allows major AI applications and assistants to discover and directly execute actions on your WordPress site.
As an MCP server, WordPress makes its capabilities registered via the Abilities API available as MCP tools and resources. AI assistants can discover, understand, and execute actions like creating posts, managing media, and moderating comments, all through the standardized protocol.
As an MCP client, WordPress can integrate with other MCP servers. Your site (though an embedded Agent, REST API, WP-CLI, PHP functions…) could leverage AI writing tools for content, specialized services for data analysis, or project management systems, becoming an active participant in a network of interconnected capabilities.
To start, we will focus on building the server side of the MCP Adapter.
Flexible Transport and Security
As an MCP server, WordPress supports the Streamable HTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. transport via the existing REST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. as well as the stdio transport via WP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/. This ensures compatibility with the wider MCP ecosystem and enables compatibility with local development.
For security, the MCP adapter will leverage the built-in application password mechanism for authentication and the capabilities system for granular authorization. When acting as a MCP Client, we plan for WordPress to implement common user approval controls.
Building for Tomorrow
MCP is a rapidly evolving protocol. The WordPress MCP implementation is designed for adaptability, ensuring it can accommodate future changes and emerging standards. This is achieved through the underlying Abilities API, which represents WordPress functionality in a standard-agnostic way. The MCP adapter translates this functionality into MCP’s format, but other adapters could be developed for different protocols as they emerge.
This approach future-proofs WordPress for an AI-driven world. It allows for quick adaptation to new AI systems and protocols without requiring a restructuring of core Core is the set of software required to run WordPress. The Core Development Team builds WordPress. functionality.
Getting Started
The MCP Adapter requires the Abilities API to expose WordPress functionality and works seamlessly with the PHP Client SDK and AI Experiments Plugin. Whether you’re connecting your site to AI assistants, building AI-powered applications, or contributing to development, join us in #core-ai on Slack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. or explore the MCP adapter code.
The future of WordPress is one where sites and AI assistants work together as partners. The MCP Adapter is making that future possible today.
#ai-building-blocks
Related