SW

stefans71/wordpress-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

81 stars 21 forks 品質 64 トレンド 14MIT

stefans71/wordpress-mcp-server は [https://github.com/stefans71/wordpress-mcp-server.] からインポートされた MCP サーバー候補です

概要

stefans71/wordpress-mcp-server は [https://github.com/stefans71/wordpress-mcp-server.] からインポートされた MCP サーバー候補です

概要(AI 翻訳)

WordPressの統合のためのモデルコンテキストプロトコル(MCP)サーバー、Windows、macOS、Linuxと互換性があります。

概要

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

インストール

  1. リポジトリのクローン化

  2. 依存関係を取付けて下さい:

  3. プロジェクトのビルド:

設定

WordPressの認証のための環境変数を使用して、MCP設定ファイルにサーバーを追加します。

環境変数は:

  • WORDPRESS SITE URL:あなたのWordPressサイトURL
  • WORDPRESS USERNAME:WordPressのユーザー名
  • WORDPRESS PASSWORD:WordPressアプリケーションパスワード

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

利用可能なメソッド

create post は ## ## です。

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

パラメーター:

  • siteUrl:(envで設定すれば任意) WordPressのサイトURL
  • ユーザー名:(オプションでenvに設定されている場合) WordPress ユーザー名
  • パスワード: (env で設定すれば任意) WordPress アプリケーションパスワード
  • タイトル: 投稿タイトル
  • 内容:投稿内容
  • ステータス: (オプション) ‘draft’ | ‘publish’ | ‘private’ (デフォルト: ‘draft’)

の get posts

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

WordPress MCP Server

A Model Context Protocol (MCP) server for WordPress integration, compatible with Windows, macOS, and Linux.

Overview

This MCP server enables interaction with WordPress sites through the WordPress REST API. It provides tools for creating, retrieving, and updating posts using JSON-RPC 2.0 protocol.

Installation

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Build the project:
npm run build

Configuration

Add the server to your MCP settings file with environment variables for WordPress credentials:

{
  "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"
      }
    }
  }
}

The environment variables are:

  • WORDPRESS_SITE_URL: Your WordPress site URL
  • WORDPRESS_USERNAME: WordPress username
  • WORDPRESS_PASSWORD: WordPress application password

You can also provide these credentials in the request parameters if you prefer not to use environment variables.

Available Methods

create_post

Creates a new WordPress post.

Parameters:

  • siteUrl: (optional if set in env) WordPress site URL
  • username: (optional if set in env) WordPress username
  • password: (optional if set in env) WordPress application password
  • title: Post title
  • content: Post content
  • status: (optional) ‘draft’ | ‘publish’ | ‘private’ (default: ‘draft’)

get_posts

Retrieves WordPress posts.

Parameters:

  • siteUrl: (optional if set in env) WordPress site URL
  • username: (optional if set in env) WordPress username
  • password: (optional if set in env) WordPress application password
  • perPage: (optional) Number of posts per page (default: 10)
  • page: (optional) Page number (default: 1)

update_post

Updates an existing WordPress post.

Parameters:

  • siteUrl: (optional if set in env) WordPress site URL
  • username: (optional if set in env) WordPress username
  • password: (optional if set in env) WordPress application password
  • postId: ID of the post to update
  • title: (optional) New post title
  • content: (optional) New post content
  • status: (optional) ‘draft’ | ‘publish’ | ‘private’

Security Note

For security, it’s recommended to use WordPress application passwords instead of your main account password. You can generate an application password in your WordPress dashboard under Users → Security → Application Passwords.

Example Usage

Using environment variables:

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

Without environment variables:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "create_post",
  "params": {
    "siteUrl": "https://your-wordpress-site.com",
    "username": "your-username",
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "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" } } } }