Skip to main content
Glama
WordPress MCP Server

WordPress MCP Server

by Leonelberio

WordPress MCP サーバー

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

概要

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

Related MCP server: WordPress MCP Server

インストール

  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ファイルを参照

Available Tools

3 tools
create_postC

Create a new WordPress post

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

get_postsC

Get WordPress posts

Inputs: page, password, perPage, siteUrl, +1 more.

update_postC

Update an existing WordPress post

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

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting different CRUD operations: create_post for creation, get_posts for retrieval, and update_post for modification. There is no overlap or ambiguity between these functions, making it easy for an agent to select the correct tool.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (create_post, get_posts, update_post) with no deviations in style or convention. This predictability enhances readability and usability for agents.

    Tool Count3/5

    With only 3 tools, the set feels thin for a WordPress server, as it lacks delete_post and other common operations like managing pages or media. While the tools cover basic post CRUD, the scope is limited and may not support full agent workflows.

    Completeness2/5

    The tool surface is significantly incomplete for WordPress management. It includes create, get, and update for posts but omits delete_post, as well as tools for pages, media, users, or settings, leaving notable gaps that could cause agent failures in broader tasks.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers