MCP server implementation using the WordPress REST API
Find a file
Pascal Birchler f46751c216
Update tests
2025-04-30 12:29:15 +02:00
.github Fix svn install step 2025-04-28 15:05:41 +02:00
bin Initial commit 2025-04-02 21:24:11 +02:00
src Check auth first for SSE requests 2025-04-30 11:36:43 +02:00
tests Update tests 2025-04-30 12:29:15 +02:00
.distignore Fix nightly build, take 2 2025-04-07 16:47:12 +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 Update .gitignore 2025-04-22 11:54:51 +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 Composer update 2025-04-23 20:08:45 +02:00
composer.lock Composer update 2025-04-25 10:51:32 +02:00
LICENSE Create LICENSE 2025-04-04 02:48:17 +02:00
mcp.php Actually support updating from GitHub 2025-04-25 20:01:34 +02:00
phpcs.xml.dist Update nightly build config 2025-04-07 16:22:52 +02:00
phpstan.neon.dist PHPStan level 9 2025-04-24 15:49:34 +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 Merge pull request #12 from szepeviktor/patch-3 2025-04-09 12:05:45 +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. Run wp plugin install --activate https://github.com/mcp-wp/mcp-server/archive/refs/heads/main.zip
  2. Run wp plugin install --activate ai-services
  3. Run wp package install mcp-wp/ai-command:dev-main
  4. Run wp mcp server add "mysite" "https://example.com/wp-json/mcp/v1/mcp"
  5. Run wp ai "Greet my friend Pascal" or so

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