MCP WordPressリモート
mcp-wordpress-remote パッケージは、ローカルの Model Context Protocol (MCP) クライアントとリモートの WordPress MCP サーバー間のブリッジとして機能します。npx を利用することで、グローバルインストールなしでこのパッケージを実行でき、セットアッププロセスを簡素化できます。
要件
Node.js バージョン 22 以上
Related MCP server: Lodestar MCP Server
WordPress MCPプラグイン
WordPress ウェブサイトにwordpress-mcpプラグインをインストールし、「設定」>「MCP 設定」で MCP 機能を有効にする必要があります。
なぜ
ほとんどのクライアントは SSE または Streamable 通信プロトコルをサポートしていません。
効率性が向上しました。このプロキシはウェブサイトへの接続を開いたままにせず、必要な場合にのみウェブサイトにシンプルな REST API リクエストを送信します。
Oauth2.1 は、WordPress ではまだそのままでは利用できません。
WordPress APIパスワードとWooCommerce REST APIコンシューマキーとシークレットによるセキュリティ
使い方は簡単です。下記のインストール手順をご覧ください。
使用法
環境変数
次の環境変数が必要です。
WP_API_URL: WordPress サイトの URL (例:https://example.com)WP_API_USERNAME: WordPressのユーザー名WP_API_PASSWORD: WordPress アプリケーションのパスワードWOO_CUSTOMER_KEY: Woocommerce 顧客キー(WooCommerce MCP アセットを使用する場合はオプション)WOO_CUSTOMER_SECRET: WooCommerce の顧客シークレット (WooCommerce MCP アセットを使用する場合はオプション)LOG_FILE: ログファイルへのフルパス(オプション)
MCPクライアントでの構成
クロードデスクトップ
Claude Desktop に MCP サーバーを追加するには、次の場所にある構成ファイルを編集する必要があります。
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
構成例:
{
"mcpServers": {
"wordpress-mcp": {
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
"env": {
"WP_API_URL": "https://your-wordpress-site.com",
"WP_API_USERNAME": "your-username",
"WP_API_PASSWORD": "your-password",
"WOO_CUSTOMER_KEY": "your-woo-customer-key",
"WOO_CUSTOMER_SECRET": "your-woo-customer-secret",
"LOG_FILE": "optional full path to the log file"
}
}
}
}https://woocommerce.com/document/woocommerce-rest-api/
カーソル
設定ファイルは~/.cursor/mcp.jsonにあります。
構成例:
{
"mcpServers": {
"wordpress-mcp": {
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
"env": {
"WP_API_URL": "https://your-wordpress-site.com",
"WP_API_USERNAME": "your-username",
"WP_API_PASSWORD": "your-password",
"WOO_CUSTOMER_KEY": "your-woo-customer-key",
"WOO_CUSTOMER_SECRET": "your-woo-customer-secret",
"LOG_FILE": "optional full path to the log file"
}
}
}
}VSコード
構成ファイルは、ワークスペース/フォルダー内の.vscode/mcp.json内に作成できます。
{
"servers": {
"wordpress-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
"env": {
"WP_API_URL": "https://your-wordpress-site.com",
"WP_API_USERNAME": "your-username",
"WP_API_PASSWORD": "your-password",
"WOO_CUSTOMER_KEY": "your-woo-customer-key",
"WOO_CUSTOMER_SECRET": "your-woo-customer-secret",
"LOG_FILE": "optional full path to the log file"
}
}
}
}VS CodeとMCPの詳細については、VS Codeのドキュメントをご覧ください。
@todo
現在、このパッケージはまだ開発初期段階です。ご提案、バグレポート、PRなど、何でも歓迎いたします。