WordPress.org 提供 MCP(Model Context Protocol)服务器,允许 AI 开发工具协助准备、验证和提交插件到插件目录。它通过 MCP 协议连接 AI 助手,提供插件指南、readme 验证、提交状态等功能,旨在优化工作流程,而非替代审核过程。
{
"mcpServers": {
"wporg-mcp-server": {
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote@^0.2"],
"env": {
"WP_API_URL": "https://wordpress.org/wp-json/mcp/wporg",
"WP_API_USERNAME": "your-username",
"WP_API_PASSWORD": "xxxx xxxx xxxx xxxx"
}
}
}
}WordPress.org provides an MCP (Model Context Protocol) server that lets AI-powered development tools help you prepare, validate, and submit plugins to the Plugin Directory. If you use tools like Claude, Cursor, or VS Code with AI capabilities, you can connect them to WordPress.org so they have direct access to plugin guidelines, readme validation, submission status, and more.
This is a tool to assist your workflow, not a replacement for the review process. All plugins submitted through the MCP server go through the same review as plugins submitted through the web form. All Plugin Guidelines apply in full.
Model Context Protocol (MCP) is an open standard that lets AI assistants connect to external services. Instead of copying and pasting between your AI tool and WordPress.org, an MCP connection allows your AI assistant to read plugin guidelines, validate your readme, check your submission status, and submit your plugin, all within your existing development environment.
Run this command in your terminal:
npx -y @wporg/mcp
This opens your browser to authorize the connection and create an application password, then automatically detects and configures your installed MCP clients (currently Claude Desktop, Claude Code, Cursor, and VS Code).
If your client isn’t supported yet, please let us know and use the manual setup below.
If you prefer to configure the connection yourself, or if your client isn’t yet supported by the quick setup, follow these steps.
Visit the authorization page to get started:
If you’re not already logged in, you’ll be prompted to log in to your WordPress.org account first. Once logged in, you’ll see an authorization screen for “WordPress.org MCP.” Click Approve to generate your connection credentials.
After approving, you’ll see a JSON configuration block that looks like this:
{
"mcpServers": {
"wporg-mcp-server": {
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote@^0.2"],
"env": {
"WP_API_URL": "https://wordpress.org/wp-json/mcp/wporg",
"WP_API_USERNAME": "your-username",
"WP_API_PASSWORD": "xxxx xxxx xxxx xxxx"
}
}
}
}
Click Copy to copy this configuration to your clipboard. Your application password is shown only once. If you lose it, you’ll need to authorize again to generate a new one.
Where you paste the configuration depends on which client you use:
claude_desktop_config.json file..mcp.json file in your project directory..vscode/mcp.json. Use servers as the top-level key instead of mcpServers.Once saved, restart your client or reload the MCP configuration. Your AI assistant should now have access to the WordPress.org Plugin Directory tools.
The MCP server provides three types of capabilities: tools your AI assistant can execute, reference resources it can read, and guided prompts for common workflows.
Tools are actions your AI assistant can perform on your behalf:
readme.txt or readme.md for errors, warnings, and suggestions before submission.Resources are reference documents your AI assistant can read to give you accurate, up-to-date guidance:
Prompts are guided workflows that walk you and your AI assistant through multi-step processes:
Using the MCP server does not change your responsibilities as a plugin developer. Whether you write every line of code by hand or use AI assistance, the following applies:
You are responsible for all code in your plugin. The Plugin Review Team evaluates every submission the same way, regardless of how the code was produced. If your plugin is rejected, you are expected to understand the issues and make the necessary changes.
The Detailed Plugin Guidelines are not relaxed for AI-assisted submissions. Your plugin must be original, secure, performant, and distributed under a GPL-compatible license. Trademark and copyright law must be respected.
AI tools can introduce security vulnerabilities, license violations, unnecessary external service calls, or code that doesn’t match your intent. You must review every change your AI assistant makes before submitting your plugin. Running Plugin Check locally is a good way to catch common issues, and a prerequisite before submitting a plugin for review.
Here are some common ways developers use the MCP server. In each case, you’re talking to your AI assistant in your development tool. The assistant handles the MCP server communication for you.
Ask your AI assistant to help you get your plugin ready:
Help me prepare my plugin for submission to WordPress.org.
Your assistant will walk through a multi-step checklist: reviewing your plugin against the guidelines, verifying your plugin headers, validating your readme, running Plugin Check, checking for reserved slugs, and producing a submission readiness report.
After submitting, you can check on your plugin’s status:
What's the review status of my plugin "my-awesome-plugin"?
Your assistant will retrieve the current status, including any feedback from the review team.
If your plugin needs changes, your assistant can help you work through the feedback:
Help me address the review feedback for "my-awesome-plugin".
Your assistant will fetch the reviewer’s comments, help you understand what’s being asked, suggest fixes, and help you re-validate and resubmit.
If you see authentication errors, your application password may have expired or been revoked. Visit the authorization page again to generate a new one. Going through the authorization flow again will automatically replace your existing application password. Update your client configuration with the new credentials.
To revoke your MCP connection, go to your Account & Security settings on profiles.wordpress.org and open the Application Passwords section. From there you can find and delete the application password created for the MCP connection.