WordPress MCP Server
WordPress MCP 服务器
一个生产就绪的 WordPress 集成 Model Context Protocol (MCP) 服务器。使 AI 代理能够通过结构化工具与 WordPress 网站交互。
功能特性
39 个 WordPress 工具,涵盖文章、页面、媒体、用户、分类、标签、插件、主题、菜单和 WooCommerce
安全认证,使用 WordPress 应用程序密码
破坏性操作保护,需要明确确认
结构化错误处理,带有详细错误代码
分页支持,用于列表操作
基于环境的配置,用于凭据
Related MCP server: WordPress MCP Server
前提条件
Node.js 18+
WordPress 网站,已启用 REST API
WordPress 应用程序密码用于认证
安装
npm install
npm run build配置
在项目根目录创建 .env 文件:
WORDPRESS_URL=https://your-wordpress-site.com
WORDPRESS_USERNAME=your-username
WORDPRESS_APP_PASSWORD=your-application-password生成应用程序密码
转到 WordPress 后台 → 用户 → 您的个人资料
滚动到“应用程序密码”
输入名称(例如“MCP 服务器”)
点击“添加新应用程序密码”
复制生成的密码
用法
运行服务器
# Development
npm run dev
# Production
npm start与 MCP 客户端集成
添加到您的 MCP 客户端配置:
{
"mcp": {
"wordpress": {
"type": "local",
"command": ["node", "/path/to/wordpress-mcp-server/dist/index.js"],
"environment": {
"WORDPRESS_URL": "https://your-site.com",
"WORDPRESS_USERNAME": "your-username",
"WORDPRESS_APP_PASSWORD": "your-app-password"
}
}
}
}可用工具
站点操作
工具 | 描述 |
| 获取站点名称、描述、URL |
| 获取站点配置 |
| 获取健康诊断 |
| 获取性能指标 |
| 搜索整个站点内容 |
文章操作
工具 | 描述 |
| 列出文章(支持筛选) |
| 根据 ID 获取单篇文章 |
| 创建新文章 |
| 更新现有文章 |
| 删除文章(需要确认) |
| 发布草稿文章 |
页面操作
工具 | 描述 |
| 列出页面(支持筛选) |
| 根据 ID 获取单个页面 |
| 创建新页面 |
| 更新现有页面 |
| 删除页面(需要确认) |
媒体操作
工具 | 描述 |
| 列出媒体库项目 |
| 上传媒体文件 |
| 删除媒体(需要确认) |
用户操作
工具 | 描述 |
| 列出用户(支持筛选) |
| 根据 ID 获取单个用户 |
| 创建新用户 |
| 更新现有用户 |
分类法操作
工具 | 描述 |
| 列出分类 |
| 创建新分类 |
| 列出标签 |
| 创建新标签 |
插件操作
工具 | 描述 |
| 列出已安装的插件 |
| 激活插件(需要确认) |
| 停用插件(需要确认) |
主题操作
工具 | 描述 |
| 列出已安装的主题 |
| 激活主题(需要确认) |
菜单操作
工具 | 描述 |
| 获取导航菜单 |
| 更新菜单 |
WooCommerce 操作
工具 | 描述 |
| 列出产品 |
| 创建产品 |
| 更新产品 |
| 列出订单 |
| 列出客户 |
安全性
凭据存储在环境变量中(绝不会在输出中暴露)
破坏性操作需要明确确认
只读操作自动执行
对所有受保护资源进行认证
开发
# Run in development mode
npm run dev
# Build for production
npm run build
# Run tests
npm test项目结构
wordpress-mcp-server/
├── src/
│ ├── index.ts # Entry point
│ ├── server.ts # MCP server setup
│ ├── client/
│ │ └── wordpress.ts # WordPress API client
│ ├── tools/
│ │ ├── index.ts # Tool registration
│ │ ├── definitions.ts # Tool schemas
│ │ ├── site.ts # Site tools
│ │ ├── posts.ts # Post tools
│ │ ├── pages.ts # Page tools
│ │ ├── media.ts # Media tools
│ │ ├── users.ts # User tools
│ │ ├── taxonomies.ts # Taxonomy tools
│ │ ├── plugins.ts # Plugin tools
│ │ ├── themes.ts # Theme tools
│ │ ├── menus.ts # Menu tools
│ │ └── woocommerce.ts # WooCommerce tools
│ ├── validation/
│ │ └── schemas.ts # Zod validation schemas
│ ├── types/
│ │ └── index.ts # TypeScript type definitions
│ └── utils/
│ ├── config.ts # Environment configuration
│ └── logger.ts # Structured logging
├── package.json
├── tsconfig.json
└── .env.example许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceEnables AI assistants to interact with WordPress sites through the WordPress REST API. Supports multiple WordPress sites with secure authentication, enabling content management, post operations, and site configuration through natural language.24116MIT
- Alicense-qualityDmaintenanceEnables AI assistants to interact with WordPress sites through the REST API. Supports multiple WordPress sites with secure authentication, enabling content management, post operations, and site configuration through natural language.24MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with WordPress sites through REST APIs, allowing programmatic management of posts, users, comments, categories, and tags with secure authentication.2948MIT
- AlicenseCqualityBmaintenanceEnables AI agents to manage WordPress sites with 190+ tools for content management, theme/plugin customization, file system operations, WooCommerce, and complete site control through natural language.1003552MIT
Related MCP Connectors
Publish to self-hosted WordPress from AI agents: markdown, images, SEO, and Notion sync.
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
WordPress MCP server: generate SEO posts, AI images, autoblog & WooCommerce on your self-hosted site
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/abdulsammad-lgtm/WordPress-MCP-'
If you have feedback or need assistance with the MCP directory API, please join our Discord server