Skip to main content
Glama
WordPress MCP Server

WordPress MCP Server

包括的なWordPress MCPサーバー

AIアシスタントがWordPress REST APIを介してWordPressサイトとやり取りできるようにする、包括的なモデルコンテキストプロトコル(MCP)サーバーです。このサーバーは、投稿、ユーザー、コメント、カテゴリー、タグ、カスタムエンドポイントなど、WordPressのあらゆる側面をプログラムで管理するためのツールを提供します。

特徴

ポスト管理

  • WordPressの投稿を作成、取得、更新、削除する

  • さまざまなパラメータで投稿をフィルタリング

  • 投稿リストのページネーションサポート

ユーザー管理

  • IDまたはログインでユーザー情報を取得する

  • ユーザーの詳細を更新する

  • ユーザーを削除する

コメント管理

  • コメントの作成、取得、更新、削除

  • 投稿ごとにコメントをフィルタリング

  • コメントリストのページネーションサポート

分類管理

  • カテゴリーとタグを管理する

  • 分類の作成、取得、更新、削除

  • スラッグでカテゴリとタグを探す

サイト情報

  • WordPressサイトの一般的な情報を取得する

カスタムリクエスト

  • カスタムREST APIエンドポイントのサポート

  • カスタム HTTP メソッド (GET、POST、PUT、DELETE)

  • カスタムデータとパラメータ

Related MCP server: WordPress MCP Server

前提条件

  • Node.js v18以上

  • REST API が有効になっている WordPress サイト

  • 認証用のWordPressアプリケーションのパスワード

インストール

  1. このリポジトリをクローンします:

git clone [repository-url]
cd wordpress-mcp-server
  1. 依存関係をインストールします:

npm install
  1. サーバーを構築します。

npm run build

WordPressの設定

サーバーを使用する前に、WordPress サイトを設定する必要があります。

  1. WordPressサイトでREST APIが有効になっていることを確認してください(WordPress 4.7以降ではデフォルトで有効になっています)。

  2. アプリケーションパスワードを作成します:

    • WordPress管理パネルにログインする

    • ユーザー → プロフィールへ移動

    • 「アプリケーションパスワード」までスクロールします

    • アプリケーションの名前を入力します(例:「MCP Server」)

    • 「新しいアプリケーションパスワードを追加」をクリックします

    • 生成されたパスワードをコピーします(再度表示することはできません)

MCP構成

サーバーを MCP 設定ファイル (通常は~/AppData/Roaming/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonにあります) に追加します。

{
  "mcpServers": {
    "wordpress": {
      "command": "node",
      "args": ["path/to/wordpress-mcp-server/build/index.js"]
    }
  }
}

利用可能なツール

ポスト管理

1. 投稿を作成する

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

パラメータ:

  • siteUrl (必須): WordPress サイトの URL

  • username (必須): WordPressユーザー名

  • password (必須): WordPressアプリケーションのパスワード

  • title (必須): 投稿タイトル

  • content (必須): 投稿内容

  • status (オプション): 投稿のステータス(「下書き」、「公開」、「非公開」、デフォルトは「下書き」)

例:

{
  "tool": "create_post",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "title": "My First Post",
  "content": "Hello, world!",
  "status": "draft"
}

2. get_posts

ページ区切り付きの WordPress 投稿を取得します。

パラメータ:

  • siteUrl (必須): WordPress サイトの URL

  • username (必須): WordPressユーザー名

  • password (必須): WordPressアプリケーションのパスワード

  • perPage (オプション):ページあたりの投稿数(デフォルト:10)

  • page (オプション):ページ番号(デフォルト:1)

  • customParams (オプション): 追加のクエリパラメータ

例:

{
  "tool": "get_posts",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "perPage": 5,
  "page": 1
}

3. update_post

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

パラメータ:

  • siteUrl (必須): WordPress サイトの URL

  • username (必須): WordPressユーザー名

  • password (必須): WordPressアプリケーションのパスワード

  • postId (必須): 更新する投稿のID

  • title (オプション): 新しい投稿のタイトル

  • content (オプション): 新しい投稿コンテンツ

  • status (オプション):新しい投稿のステータス(「下書き」、「公開」、または「非公開」)

例:

{
  "tool": "update_post",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "postId": 123,
  "title": "Updated Title",
  "content": "Updated content",
  "status": "publish"
}

4. 投稿を削除する

WordPress の投稿を削除します。

パラメータ:

  • siteUrl (必須): WordPress サイトの URL

  • username (必須): WordPressユーザー名

  • password (必須): WordPressアプリケーションのパスワード

  • postId (必須): 削除する投稿のID

例:

{
  "tool": "delete_post",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "postId": 123
}

ユーザー管理

1. get_users

WordPress ユーザーを取得します。

パラメータ:

  • siteUrl (必須): WordPress サイトの URL

  • username (必須): WordPressユーザー名

  • password (必須): WordPressアプリケーションのパスワード

  • perPage (オプション):ページあたりのユーザー数(デフォルト:10)

  • page (オプション):ページ番号(デフォルト:1)

2. get_user

ID で特定の WordPress ユーザーを取得します。

パラメータ:

  • siteUrl (必須): WordPress サイトの URL

  • username (必須): WordPressユーザー名

  • password (必須): WordPressアプリケーションのパスワード

  • userId (必須): 取得するユーザーのID

3. ログインによるユーザー取得

ログイン名で WordPress ユーザーを取得します。

パラメータ:

  • siteUrl (必須): WordPress サイトの URL

  • username (必須): WordPressユーザー名

  • password (必須): WordPressアプリケーションのパスワード

  • userLogin (必須): 取得するユーザーのログイン名

コメント管理

1. get_comments

WordPress のコメントを取得します。

パラメータ:

  • siteUrl (必須): WordPress サイトの URL

  • username (必須): WordPressユーザー名

  • password (必須): WordPressアプリケーションのパスワード

  • perPage (オプション):ページあたりのコメント数(デフォルト:10)

  • page (オプション):ページ番号(デフォルト:1)

  • postIdForComment (オプション): 投稿IDでコメントをフィルタリングする

2. コメントを作成する

投稿に新しいコメントを作成します。

パラメータ:

  • siteUrl (必須): WordPress サイトの URL

  • username (必須): WordPressユーザー名

  • password (必須): WordPressアプリケーションのパスワード

  • postIdForComment (必須): コメントする投稿のID

  • commentContent (必須): コメントの内容

  • customData (オプション): 追加のコメントデータ

カテゴリーとタグの管理

1. get_categories

WordPress カテゴリを取得します。

パラメータ:

  • siteUrl (必須): WordPress サイトの URL

  • username (必須): WordPressユーザー名

  • password (必須): WordPressアプリケーションのパスワード

  • perPage (オプション):ページあたりのカテゴリ数(デフォルト:10)

  • page (オプション):ページ番号(デフォルト:1)

2. カテゴリを作成する

新しい WordPress カテゴリを作成します。

パラメータ:

  • siteUrl (必須): WordPress サイトの URL

  • username (必須): WordPressユーザー名

  • password (必須): WordPressアプリケーションのパスワード

  • categoryName (必須): 作成するカテゴリの名前

  • customData (オプション): 追加のカテゴリデータ (説明、親など)

カスタムリクエスト

1. カスタムリクエスト

任意の WordPress REST API エンドポイントにカスタム リクエストを送信します。

パラメータ:

  • siteUrl (必須): WordPress サイトの URL

  • username (必須): WordPressユーザー名

  • password (必須): WordPressアプリケーションのパスワード

  • customEndpoint (必須): APIエンドポイントパス

  • customMethod (オプション): HTTP メソッド ('GET'、'POST'、'PUT'、'DELETE'、デフォルト: 'GET')

  • customData (オプション): POST/PUTリクエストのデータ

  • customParams (オプション): GETリクエストのURLパラメータ

例:

{
  "tool": "custom_request",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "customEndpoint": "wp/v2/media",
  "customMethod": "GET",
  "customParams": {
    "per_page": 5
  }
}

応答フォーマット

すべてのツールは次の形式で応答を返します。

成功レスポンス

{
  "success": true,
  "data": {
    // WordPress API response data
  },
  "meta": {
    // Optional metadata (pagination info, etc.)
  }
}

エラー応答

{
  "success": false,
  "error": "Error message here"
}

セキュリティに関する考慮事項

  • WordPressサイトでは常にHTTPS URLを使用する

  • メインのWordPressパスワードの代わりにアプリケーションパスワードを使用する

  • アプリケーションのパスワードは安全に保管し、共有しないでください

  • アクセスを制限するためにWordPressのロールと機能の使用を検討する

  • アプリケーションのパスワードを定期的に変更する

発達

開発に貢献するには:

  1. リポジトリをフォークする

  2. 機能ブランチを作成する

  3. 変更を加える

  4. テストを実行する(利用可能な場合)

  5. プルリクエストを送信する

自動再コンパイルによる開発モードの場合:

npm run dev

ライセンス

このプロジェクトは ISC ライセンスに基づいてライセンスされています。

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

Available Tools

29 tools
create-categoryC

Create a new WordPress category

Inputs: name (required), password (required), siteUrl (required), username (required), +4 more.

create-commentC

Create a new comment on a WordPress post

Inputs: content (required), password (required), postId (required), siteUrl (required), +3 more.

create-postC

Create a new WordPress post

Inputs: content (required), password (required), siteUrl (required), title (required), +17 more.

create-userC

Create a new WordPress user

Inputs: email (required), newPassword (required), newUsername (required), password (required), +11 more.

delete-categoryC

Delete a WordPress category

Inputs: categoryId (required), password (required), siteUrl (required), username (required), +1 more.

delete-postC

Delete a WordPress post

Inputs: password (required), postId (required), siteUrl (required), username (required), +1 more.

delete-userC

Delete a WordPress user

Inputs: password (required), reassignId (required), siteUrl (required), userId (required), +1 more.

get-categoryC

Get a specific category by ID

Inputs: categoryId (required), password (required), siteUrl (required), username (required), +1 more.

get-clicksC

View a site's outbound clicks

Inputs: password (required), siteId (required), siteUrl (required), username (required), +2 more.

get-commentsC

Get a list of comments from a WordPress site

Inputs: password (required), siteUrl (required), username (required), page, +2 more.

get-country-viewsC

View a site's views by country

Inputs: password (required), siteId (required), siteUrl (required), username (required), +2 more.

get-postC

Get a specific post by ID

Inputs: password (required), postId (required), siteUrl (required), username (required), +2 more.

get-post-statsC

View a specific post's views

Inputs: password (required), postId (required), siteId (required), siteUrl (required), +1 more.

get-referrersC

View a site's referrers

Inputs: password (required), siteId (required), siteUrl (required), username (required), +2 more.

get-search-termsB

View search terms used to find the site

Inputs: password (required), siteId (required), siteUrl (required), username (required), +2 more.

get-site-statsC

Get comprehensive stats for a WordPress site

Inputs: password (required), siteId (required), siteUrl (required), username (required), +1 more.

get-stats-highlightsC

Get highlight metrics for a WordPress site from the last seven days

Inputs: password (required), siteId (required), siteUrl (required), username (required).

get-stats-summaryC

View a site's summarized views, visitors, likes and comments

Inputs: password (required), siteId (required), siteUrl (required), username (required).

get-streak-statsC

Get stats for Calendar Heatmap showing publishing activity

Inputs: password (required), siteId (required), siteUrl (required), username (required).

get-top-postsC

View a site's top posts and pages by views

Inputs: password (required), siteId (required), siteUrl (required), username (required), +2 more.

get-userC

Get a specific user by ID

Inputs: password (required), siteUrl (required), userId (required), username (required), +1 more.

get-usersC

Get a list of users from a WordPress site with advanced filtering options

Inputs: password (required), siteUrl (required), username (required), capabilities, +13 more.

list-categoriesC

Get a list of categories with filtering options

Inputs: password (required), siteUrl (required), username (required), context, +11 more.

list-postsC

Get a list of posts with comprehensive filtering options

Inputs: password (required), siteUrl (required), username (required), after, +23 more.

remove-referrer-spamC

Unreport a referrer as spam

Inputs: domain (required), password (required), siteId (required), siteUrl (required), +1 more.

report-referrer-spamC

Report a referrer as spam

Inputs: domain (required), password (required), siteId (required), siteUrl (required), +1 more.

update-categoryC

Update an existing WordPress category

Inputs: categoryId (required), password (required), siteUrl (required), username (required), +5 more.

update-postC

Update an existing WordPress post

Inputs: password (required), postId (required), siteUrl (required), username (required), +18 more.

update-userC

Update an existing WordPress user

Inputs: password (required), siteUrl (required), userId (required), username (required), +12 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 29 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific resources and actions. For example, create/delete/get/update operations are separated by resource type (category, post, user), and analytics tools (get-clicks, get-country-views, etc.) each focus on different metrics without overlap.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with hyphens (e.g., create-post, get-category, update-user). The naming is uniform across all 29 tools, making them predictable and easy to understand.

    Tool Count3/5

    With 29 tools, the count feels heavy for a WordPress server, as it combines content management (posts, categories, users) with extensive analytics. While each tool is useful, the set might be overwhelming for agents, suggesting it could be split into separate servers for content vs. stats.

    Completeness5/5

    The tool surface provides complete CRUD/lifecycle coverage for core resources (posts, categories, users) and includes comprehensive analytics for site stats, referrers, and spam management. There are no obvious gaps for the WordPress domain.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      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.
      118
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with WordPress sites through the REST API. Supports multiple WordPress sites with secure authentication, enabling content management, post operations, and site configuration through natural language.
      MIT