|
Some checks failed
Lint and Test / PHP Lints (push) Has been cancelled
Lint and Test / PHPStan (push) Has been cancelled
Lint and Test / PHP 8.2 - WP latest (push) Has been cancelled
Lint and Test / PHP 8.4 - WP trunk (push) Has been cancelled
Lint and Test / PHP 8.3 - WP latest (push) Has been cancelled
Nightly Build / Nightly Build (push) Has been cancelled
Nightly Build / Deployment (push) Has been cancelled
Bumps [dealerdirect/phpcodesniffer-composer-installer](https://github.com/PHPCSStandards/composer-installer) from 1.1.2 to 1.2.0. - [Release notes](https://github.com/PHPCSStandards/composer-installer/releases) - [Changelog](https://github.com/PHPCSStandards/composer-installer/blob/main/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/composer-installer/compare/v1.1.2...v1.2.0) --- updated-dependencies: - dependency-name: dealerdirect/phpcodesniffer-composer-installer dependency-version: 1.2.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|---|---|---|
| .github | ||
| bin | ||
| src | ||
| tests | ||
| .distignore | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .markdownlint.json | ||
| codecov.yml | ||
| composer.json | ||
| composer.lock | ||
| LICENSE | ||
| mcp.php | ||
| phpcs.xml.dist | ||
| phpstan.neon.dist | ||
| phpunit-multisite.xml.dist | ||
| phpunit.xml.dist | ||
| README.md | ||
MCP Server for WordPress
Model Context Protocol server using the WordPress REST API.
Try it by installing and activating the latest nightly build on your own WordPress website:
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.
- Run
wp plugin install --activate https://github.com/mcp-wp/mcp-server/archive/refs/heads/main.zip - Run
wp plugin install --activate ai-services - Run
wp package install mcp-wp/ai-command:dev-main - Run
wp mcp server add "mysite" "https://example.com/wp-json/mcp/v1/mcp" - Run
wp ai "Greet my friend Pascal"or so
Note: The WP-CLI command also works on a local WordPress installation without this plugin.