MCP server implementation using the WordPress REST API https://mcp-wp.github.io/
Find a file
2025-04-07 16:18:29 +02:00
.github Revert "Create JSON from GHA env in nightly-build" 2025-04-07 16:18:29 +02:00
bin Initial commit 2025-04-02 21:24:11 +02:00
src PHPStan level 7 2025-04-07 10:00:53 +02:00
tests More tests 2025-04-05 16:05:49 +02:00
.distignore Cleanup, tests 2025-04-03 11:44:51 +02:00
.editorconfig Initial commit 2025-04-02 21:24:11 +02:00
.gitattributes Initial commit 2025-04-02 21:24:11 +02:00
.gitignore Migrate PHPUnit config 2025-04-03 13:49:50 +02:00
.markdownlint.json Initial commit 2025-04-02 21:24:11 +02:00
codecov.yml Test on CI 2025-04-03 13:31:31 +02:00
composer.json Start fixing phpstan errors 2025-04-06 18:09:16 +02:00
composer.lock Start fixing phpstan errors 2025-04-06 18:09:16 +02:00
LICENSE Create LICENSE 2025-04-04 02:48:17 +02:00
mcp.php Initial commit 2025-04-02 21:24:11 +02:00
phpcs.xml.dist Add a couple of tests 2025-04-05 13:59:39 +02:00
phpstan.neon.dist PHPStan level 7 2025-04-07 10:00:53 +02:00
phpunit-multisite.xml.dist Fix coverage file paths 2025-04-03 14:03:17 +02:00
phpunit.xml.dist Fix coverage file paths 2025-04-03 14:03:17 +02:00
README.md Update readme 2025-04-04 13:36:11 +02:00

MCP Server for WordPress

Commit activity Code Coverage License

Model Context Protocol server using the WordPress REST API.

Try it by installing and activating the latest nightly build on your own WordPress website:

Download latest nightly build

Description

This WordPress plugin aims to implement the new Streamable HTTP transport, as described in the latest MCP specification.

Under the hood it uses the logiscape/mcp-sdk-php package to set up a fully functioning MCP server. Then, this functionality is exposed through a new wp-json/mcp/v1/mcp REST API route in WordPress.

Note: the Streamable HTTP transport is not fully implemented yet and there are no tests. So it might not 100% work as expected.

Usage

Given that no other MCP client supports the new Streamable HTTP transport yet, this plugin works best in companion with the WP-CLI AI command.

  1. Install plugin
  2. Install command
  3. Run wp mcp server add "mysite" "https://example.com/wp-json/mcp/v1/mcp"
  4. Run wp ai "Greet my friend Pascal" or so

Note: The WP-CLI command also works on a local WordPress installation without this plugin.