Cover image
Try Now
2025-01-05

此MCP服务器可让您与WordPress自动交互

3 years

Works with Finder

2

Github Watches

11

Github Forks

44

Github Stars

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",
    "password": "your-app-password",
    "title": "My New Post",
    "content": "Hello World!",
    "status": "draft"
  }
}

Requirements

  • Node.js 20.0.0 or higher
  • WordPress site with REST API enabled
  • WordPress application password for authentication

License

MIT License - See LICENSE file for details

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • appcypher
  • 很棒的MCP服务器 - 模型上下文协议服务器的策划列表

  • chongdashu
  • 使用模型上下文协议(MCP),启用Cursor,Windsurf和Claude Desktop等AI助手客户,以通过自然语言控制虚幻引擎。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

    Reviews

    3 (1)
    Avatar
    user_rjso3ShO
    2025-04-17

    As a dedicated user of the wordpress-mcp-server by stefans71, I'm genuinely impressed with its performance and reliability. The seamless integration and ease of use make managing my WordPress site a breeze. The detailed documentation available on the [GitHub page](https://github.com/stefans71/wordpress-mcp-server) is extremely helpful for both beginners and advanced users. Highly recommended for anyone looking to streamline their WordPress management process!