- Install the MCP Adapter plugin on your WordPress site
- Create a new user named “mcp” and give it the subscriber role (you’ll change it later)
- On the “mcp” user profile, create an application password, name it “OpenCode” and copy it somewhere (it cannot be seen a second time)
- Go to the base62encode.org site and encode the text “mcp:[your app. password]”, without the double quotes
- Copy the encoded text
Now we configure OpenCode to use that MCP from a project.
- Create a folder “wp-management” and, inside that folder, the “.opencode” (this will be our project)
- Create a file inside the “.opencode” folder named “opencode.jsonc” with this content:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"wordpress": {
"type": "remote",
"url": "https://[your site domain]/wp-json/mcp/mcp-adapter-default-server",
"oauth": false,
"headers": {
"Authorization": "Basic [the encoded text]"
}
}
}
}
}
- Start opencode from “wp-management” (if you use the UI change the project to that folder)
- Write /mcps and check if it connects to the standard MCP server provided by WordPress
- Write “list tools” and you should get the list of all the tools registered
That’s all. Next time we’ll see how to expose a selection of tools via MCP; not everything is registered in WordPress by itself and third-party plugins.
Subscribe to my newsletter (but only if you're interested about WP and plugins)
