WordPress MCP Server

by Leonelberio
MIT License
1
  • Apple
  • Linux

Integrations

  • Enables interaction with WordPress sites through the WordPress REST API, providing tools for creating, retrieving, and updating posts with support for different publication statuses.

WordPress MCP サーバー

Windows、macOS、Linux と互換性のある、WordPress 統合用のモデル コンテキスト プロトコル (MCP) サーバー。

概要

このMCPサーバーは、WordPress REST APIを介してWordPressサイトとのやり取りを可能にします。JSON-RPC 2.0プロトコルを使用して投稿を作成、取得、更新するためのツールを提供します。

インストール

  1. リポジトリをクローンする
  2. 依存関係をインストールします:
npm install
  1. プロジェクトをビルドします。
npm run build

構成

WordPress 資格情報の環境変数を使用して、サーバーを MCP 設定ファイルに追加します。

{ "mcpServers": { "wordpress": { "command": "node", "args": ["path/to/build/index.js"], "env": { "WORDPRESS_SITE_URL": "https://your-wordpress-site.com", "WORDPRESS_USERNAME": "your-username", "WORDPRESS_PASSWORD": "your-app-password" } } } }

環境変数は次のとおりです。

  • WORDPRESS_SITE_URL: WordPressサイトのURL
  • WORDPRESS_USERNAME: WordPressユーザー名
  • WORDPRESS_PASSWORD: WordPressアプリケーションのパスワード

環境変数を使用したくない場合は、リクエストパラメータでこれらの資格情報を提供することもできます。

利用可能な方法

投稿を作成

新しい WordPress 投稿を作成します。

パラメータ:

  • siteUrl: (env で設定されている場合オプション) WordPress サイトの URL
  • ユーザー名: (envで設定されている場合オプション) WordPressユーザー名
  • パスワード: (env で設定されている場合オプション) WordPress アプリケーションのパスワード
  • タイトル: 投稿タイトル
  • コンテンツ: 投稿内容
  • ステータス: (オプション)「下書き」 | 「公開」 | 「非公開」(デフォルト:「下書き」)

get_posts

WordPress の投稿を取得します。

パラメータ:

  • siteUrl: (env で設定されている場合オプション) WordPress サイトの URL
  • ユーザー名: (envで設定されている場合オプション) WordPressユーザー名
  • パスワード: (env で設定されている場合オプション) WordPress アプリケーションのパスワード
  • perPage: (オプション) ページあたりの投稿数 (デフォルト: 10)
  • ページ: (オプション) ページ番号 (デフォルト: 1)

更新投稿

既存の WordPress 投稿を更新します。

パラメータ:

  • siteUrl: (env で設定されている場合オプション) WordPress サイトの URL
  • ユーザー名: (envで設定されている場合オプション) WordPressユーザー名
  • パスワード: (env で設定されている場合オプション) WordPress アプリケーションのパスワード
  • postId: 更新する投稿のID
  • タイトル: (オプション) 新しい投稿のタイトル
  • コンテンツ: (オプション) 新しい投稿の内容
  • ステータス: (オプション)「下書き」 | 「公開」 | 「非公開」

セキュリティに関する注意事項

セキュリティのため、メインアカウントのパスワードではなく、WordPressアプリケーションパスワードを使用することをお勧めします。アプリケーションパスワードは、WordPressダッシュボードの「ユーザー」→「セキュリティ」→「アプリケーションパスワード」で生成できます。

使用例

環境変数の使用:

{ "jsonrpc": "2.0", "id": 1, "method": "create_post", "params": { "title": "My New Post", "content": "Hello World!", "status": "draft" } }

環境変数なし:

{ "jsonrpc": "2.0", "id": 1, "method": "create_post", "params": { "siteUrl": "https://your-wordpress-site.com", "username": "your-username", "password": "your-app-password", "title": "My New Post", "content": "Hello World!", "status": "draft" } }

要件

  • Node.js 20.0.0以上
  • REST API が有効になっている WordPress サイト
  • 認証用のWordPressアプリケーションのパスワード

ライセンス

MITライセンス - 詳細はLICENSEファイルを参照

-
security - not tested
A
license - permissive license
-
quality - not tested

REST API を介して WordPress サイトとのやり取りを可能にし、ユーザーが JSON-RPC 2.0 プロトコルを使用して投稿を作成、取得、更新できるようにするサーバー。

  1. 概要
    1. インストール
      1. 構成
        1. 利用可能な方法
          1. 投稿を作成
          2. get_posts
          3. 更新投稿
        2. セキュリティに関する注意事項
          1. 使用例
            1. 要件
              1. ライセンス

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  Enables AI assistants to interact with WordPress sites through the WordPress REST API. Supports multiple WordPress sites with secure authentication, enabling content management, post operations, and site configuration through natural language.
                  Last updated 3 months ago
                  18
                  31
                  MIT License
                • A
                  security
                  A
                  license
                  A
                  quality
                  This server facilitates interaction with cosense/Scrapbox projects, enabling users to retrieve, list, search, and create pages while supporting various query operations and secure access to private projects.
                  Last updated 18 days ago
                  4
                  12
                  TypeScript
                  MIT License
                  • Apple
                • A
                  security
                  A
                  license
                  A
                  quality
                  A server allowing interaction with Reddit via the public API, enabling browsing frontpage posts, retrieving subreddit details, and reading post comments through a Model Context Protocol.
                  Last updated 21 days ago
                  8
                  30
                  Python
                  MIT License
                  • Apple
                  • Linux
                • -
                  security
                  A
                  license
                  -
                  quality
                  A server implementation that provides a unified interface for OpenAI services, Git repository analysis, and local filesystem operations through REST API endpoints.
                  Last updated 10 days ago
                  Python
                  GPL 3.0
                  • Linux
                  • Apple

                View all related MCP servers

                ID: lxdgiq68ml