MCP WordPress Post Server

by kentaroh7777

Not rated
GitHub

About

Manage WordPress posts and upload images directly from file paths.

Details

Author
kentaroh7777
Categories
Developer Tools, Other, File Management

Setup

Install MCP WordPress Post Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/kentaroh7777/mcp-wordpress-post

Follow the installation instructions in the repository README, then restart your MCP client.

Manage WordPress posts and upload images directly from file paths.

WordPress投稿管理に特化したファイルパス方式画像アップロード機能を持つMCP(Model Context Protocol)サーバーです。

本プロジェクトは@prathammanocha氏の優秀なwordpress-mcp-serverをベースに、画像処理機能を大幅に改善したものです。

- ファイルパス方式: ファイルシステムへの直接アクセス(Base64エンコード不要)
- 大容量ファイル対応: WordPressの制限内でデータ損失なしに処理
- multipart/form-data: WordPress標準メディアアップロードAPI使用
- 自動最適化: WordPress内蔵画像処理機能を活用
- レスポンシブ画像: 異なる画面サイズ用のsrcsetを自動生成

- 投稿作成: 複数画像添付対応
- 投稿更新: 既存投稿の編集
- 投稿一覧: ページネーション対応
- 投稿詳細取得: フルコンテンツ表示
- 下書き/公開ワークフロー: ステータス管理

- メモリ使用量33%削減: Base64エンコードの排除
- データ整合性: Base64方式で発生していた95-98%のデータ損失を解決
- エラーハンドリング: ファイル存在確認やアップロード検証の充実
- デバッグログ: トラブルシューティング用の詳細ログ

- Node.js v18以上
- REST API有効なWordPressサイト
- WordPressアプリケーションパスワード

git clone [your-repo-url] cd mcp-wordpress-post
cp .env.example .env # .envファイルを編集してWordPressの認証情報を設定
{ "mcpServers": { "wordpress-post": { "command": "node", "args": ["/path/to/mcp-wordpress-post/build/posts-only.js"] } } }
// 新しいファイルパス方式(推奨) { "tool": "create-post", "title": "画像付きの投稿", "content": "この画像をご覧ください: {IMAGE1}", "images": [{ "filePath": "/絶対パス/to/image.png", "filename": "カスタム名.png", // 省略可能 "placeholder": "{IMAGE1}" }] }

- siteUrl(文字列): WordPressサイトURL
- username(文字列): WordPressユーザー名
- password(文字列): アプリケーションパスワード
- title(文字列): 投稿タイトル
- content(文字列): 画像プレースホルダーを含む投稿内容
- status(列挙型):"draft"|"publish"|"private"(デフォルト:"draft")
- images(配列, 省略可能):filePathplaceholder、省略可能なfilenameを持つ画像オブジェクト

images: [{ data: "iVBORw0KGgoAAAANSUhEUgAAAAE...", // 大きなBase64文字列 filename: "image.png", placeholder: "{IMAGE1}" }]
images: [{ filePath: "/path/to/image.png", // ファイルシステムパス filename: "カスタム名.png", // 省略可能なカスタム名 placeholder: "{IMAGE1}" }]

- WordPressのupload_max_filesize設定を確認
- post_max_sizememory_limitを確認

- プレースホルダーの形式が正確に一致していることを確認
- /tmp/mcp-debug.logのデバッグログを確認

このプロジェクトはprathammanocha/wordpress-mcp-serverの基盤の上に構築されています。

npm run debug-playwright # WordPress統合テスト npm run debug-mcp # MCPサーバーテスト

- 98%のデータ損失: 85KB → 1.5KB という深刻な問題
- メモリ効率の悪さ: 33%の無駄なメモリ使用
- 処理速度の低下: エンコード/デコード処理のオーバーヘッド

- データ損失ゼロ: 85KB → 50KB(正常な最適化)
- メモリ効率: Base64エンコード処理の排除
- 高速処理: ファイル直接読み取りによる高速化
- 安定性: WordPress標準API使用による安定動作

- @prathammanocha- オリジナルのwordpress-mcp-server
- WordPress REST API チーム - 優秀なドキュメント
- Model Context Protocol 仕様作成者

- オリジナルサーバー:prathammanocha/wordpress-mcp-server
- MCP SDK:
@modelcontextprotocol/sdk

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Manage and utilize website content within the DevHub CMS platform

A server for integrating with WordPress sites, enabling content management and interaction via the Model Context Protocol.

An MCP server for WordPress and Elementor, enabling AI assistants to manage content and build pages.

Model Context Protocol (MCP) server for Kinsta WordPress hosting

A comprehensive MCP server for managing WordPress sites, featuring a wide range of tools for performance monitoring, caching, and more.

MCP server for managing Squidex CMS content and schemas from AI agents

A WordPress plugin that transforms a WordPress site into an MCP server, allowing direct access to its content.

An MCP server for integrating with and managing WordPress sites.

Interact with WordPress sites via the REST API. Manage content, posts, and site configurations for multiple sites using natural language.

Integrates AI assistants with WordPress sites using the WordPress REST API.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.