mcp-server

mcp-serverは、WordPress REST APIを使用してMCP(Model Context Protocol)サーバーを実装するプラグインです。このプラグインは、最新のMCP仕様に基づくStreamable HTTPトランスポートを実装することを目的としています。内部では、logiscape/mcp-sdk-phpパッケージを使用して完全なMCPサーバーをセットアップし、その機能をWordPress内の新しいREST APIルートを通じて公開します。現在、Streamable HTTPトランスポートは完全には実装されておらず、テストもないため、期待通りに動作しない可能性があります。

GitHubスター

51

ユーザー評価

未評価

お気に入り

0

閲覧数

11

フォーク

12

イシュー

6

README
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.