Skip to main content
Glama

MCP WordPress 远程

mcp-wordpress-remote 软件包充当本地模型上下文协议 (MCP) 客户端和远程 WordPress MCP 服务器之间的桥梁。通过利用 npx,您无需全局安装即可执行此软件包,从而简化了设置过程。

要求

  • Node.js 版本 22 或更高版本

Related MCP server: Lodestar MCP Server

WordPress MCP 插件

您必须在 WordPress 网站上安装wordpress-mcp插件,并在设置 > MCP 设置上启用 MCP 功能。

为什么

  1. 大多数客户端不支持 SSE 或 Streamable 通信协议。

  2. 提高效率。此代理不会保持与您的网站的开放连接,并且仅在需要时向您的网站发出简单的 REST API 请求。

  3. Oauth2.1 在 wordpress 上还不能直接使用。

  4. 通过 WordPress API 密码和 WooCommerce REST API 用户密钥和秘密实现安全性

  5. 易于使用。请参阅下面的安装说明。

用法

环境变量

需要以下环境变量:

  • WP_API_URL :您的 WordPress 网站的 URL(例如https://example.com

  • WP_API_USERNAME :您的 WordPress 用户名

  • WP_API_PASSWORD :您的 WordPress 应用程序密码

  • WOO_CUSTOMER_KEY :您的 Woocommerce 客户密钥(可选,如果您打算使用 WooCommerce MCP 资产)

  • WOO_CUSTOMER_SECRET :您的 WooCommerce 客户机密(可选,如果您打算使用 WooCommerce MCP 资产)

  • LOG_FILE :日志文件的可选完整路径

MCP 客户端中的配置

克劳德桌面

为了将 MCP 服务器添加到 Claude Desktop,您需要编辑位于以下位置的配置文件:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

示例配置:

{ "mcpServers": { "wordpress-mcp": { "command": "npx", "args": ["-y", "@automattic/mcp-wordpress-remote@latest"], "env": { "WP_API_URL": "https://your-wordpress-site.com", "WP_API_USERNAME": "your-username", "WP_API_PASSWORD": "your-password", "WOO_CUSTOMER_KEY": "your-woo-customer-key", "WOO_CUSTOMER_SECRET": "your-woo-customer-secret", "LOG_FILE": "optional full path to the log file" } } } }

https://woocommerce.com/document/woocommerce-rest-api/

光标

配置文件位于~/.cursor/mcp.json

示例配置:

{ "mcpServers": { "wordpress-mcp": { "command": "npx", "args": ["-y", "@automattic/mcp-wordpress-remote@latest"], "env": { "WP_API_URL": "https://your-wordpress-site.com", "WP_API_USERNAME": "your-username", "WP_API_PASSWORD": "your-password", "WOO_CUSTOMER_KEY": "your-woo-customer-key", "WOO_CUSTOMER_SECRET": "your-woo-customer-secret", "LOG_FILE": "optional full path to the log file" } } } }

VS 代码

可以在工作区/文件夹中的.vscode/mcp.json内创建配置文件。

{ "servers": { "wordpress-mcp": { "type": "stdio", "command": "npx", "args": ["-y", "@automattic/mcp-wordpress-remote@latest"], "env": { "WP_API_URL": "https://your-wordpress-site.com", "WP_API_USERNAME": "your-username", "WP_API_PASSWORD": "your-password", "WOO_CUSTOMER_KEY": "your-woo-customer-key", "WOO_CUSTOMER_SECRET": "your-woo-customer-secret", "LOG_FILE": "optional full path to the log file" } } } }

有关 VS Code 和 MCP 的更多信息,请参阅VS Code 文档

@todo

目前,此软件包尚处于早期开发阶段。欢迎任何建议、错误报告和 PR。

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Automattic/mcp-wordpress-remote'

If you have feedback or need assistance with the MCP directory API, please join our Discord server