WordPress MCP Server with Cline in VS Code
I couldn’t find a clear explanation of this, and AI wasn’t very helpful on the topic either.
The goal was to get an MCP server functioning with VS Code’s Cline Extension on my development computer so I could leverage my AI agents to work directly with the WordPress API.
First of all, you need to create an application password, but that will only become available if your development environment is on SSL. Since I’m running my development environment in Docker, I used Caddy on my router, but you can also add Caddy to Docker to issue a localhost SSL certificate.
Once you have that running, you can go to WP-Admin Dashboard and navigate to Users > Profile and scroll down to the Application Password. Give it a name like, Cline MCP, and create it.
Next you need to install two plugins into WordPress. One plugin is the actual MCP Server and the other plugin will expose the WP API to the WP MCP Server. Maybe there’s a better solution out there, but this is what I got working, and I’m tired of wrestling with the issue to search more.
For the first plugin, install the official WordPress MCP Server. Currently, it’s not available in the WP Plugin Marketplace. Go to GitHub and download the latest release: https://github.com/WordPress/mcp-adapter. Install it manually and make sure to activate it.
For the second plugin, you need to expose the WP APIs to the MCP server. I’m using “Enable Abilities for MCP” you can check out the page here: https://wordpress.org/plugins/enable-abilities-for-mcp/. Since this one is on the marketplace, installation is easy and straightforward. Remember to activate it as well.
There aren’t any settings for either plugin that I can see. They just expose the MCP Server endpoint protected by the application password you created earlier. If you have other plugins with an MCP API it will be discovered by the WordPress MCP Server and exposed to your AI as well.
You’ll then be able to edit your cline_mcp_settings.json. Just go to Cline > MCP Servers (icon looks like a stack of servers) > Configure MCP Servers (button at the bottom). That will open the file in the editor. Modify the following JSON and add it to your file:
{
"mcpServers": {
"wordpress-wp-robot": {
"disabled": true,
"timeout": 60,
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@automattic/mcp-wordpress-remote"
],
"env": {
"WP_API_URL": "https://<localhost or example.com>/wp-json/mcp/mcp-adapter-default-server",
"WP_API_USERNAME": "<username>",
"WP_API_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx",
"OAUTH_ENABLED": "false",
}
}
}
}
You need to change, <localhost or example.com>, to the appropriate location of your dev server. and you need to change the <username> and password.
Save the cline_mcp_settings.json and cline will add the server to the list in the GUI panel and connect to the server.
Now, here’s what I got stuck on for a couple of hours. Cline connects, reports a nasty error, and the indicator next to the switch stays green. Ignore the error! If the indicator is green, that is all that matters. The error on my system looks like this:
[17-Jul-2026 02:54:13 UTC] [ERROR] Tool execution returned WP_Error | Context: {"tool_name":"mcp-adapter-discover-abilities","error_code":"ability_missing_input_schema","error_message":"Ability \\"mcp-adapter\\/discover-abilities\\" does not define an input schema required to validate the provided input.","error_data":null} | User ID: 4 [17-Jul-2026 02:54:15 UTC] [ERROR] Tool execution returned WP_Error | Context: {"tool_name":"mcp-adapter-discover-abilities","error_code":"ability_missing_input_schema","error_message":"Ability \\"mcp-adapter\\/discover-abilities\\" does not define an input schema required to validate the provided input.","error_data":null} | User ID: 4
Nasty looking but harmless. All it is saying is that Cline is requesting specific abilities and the WP MCP Server is not returning a response. Seriously, if the WP MCP Server simply returned an empty array, Cline wouldn’t generate this error. That’s all.
Furthermore, you can verify
First, add your server’s address or localhost, username and password:
curl -i -X POST "https://<localhost or example.com>/wp-json/mcp/mcp-adapter-default-server" \
-u "<username>:xxxx xxxx xxxx xxxx xxxx xxxx" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": { "name": "curl-client", "version": "1.0.0" }
}
}'
Response will look like this, you need to copy the mcp-session-id:
date: Fri, 17 Jul 2026 15:05:07 GMT
content-type: application/json; charset=UTF-8
content-length: 351
access-control-allow-headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type
access-control-expose-headers: X-WP-Total, X-WP-TotalPages, Link
allow: POST, GET, DELETE
cache-control: no-cache, must-revalidate, max-age=0, no-store, private
expires: Wed, 11 Jan 1984 05:00:00 GMT
link: <https://wp.arobotcandream.com/wp-json/>; rel="https://api.w.org/"
mcp-session-id: 7da30afb-fc84-4729-abc8-4b8b94ce32bc
pragma: no-cache
server: cloudflare
set-cookie: PHPSESSID=cf759c6ad824a86b012506ddb7f6d980; path=/
via: 1.1 Caddy
x-content-type-options: nosniff
x-powered-by: PHP/8.3.32
x-robots-tag: noindex
cf-cache-status: DYNAMIC
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=LJFYIQUrcJbybdNJoCqiQWezV4wWYs1J3DkD%2FV41aI1JvEyevuq0LY%2BDlOz6PgM8WkUb52SNjEeqJxJxWG6f8PsRGSA80K3StuxKTGFywtqQVpK5XzTY5HVz04ev90tyVsB3vuRlyk0%3D"}]}
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
cf-ray: a1ca24951840aef8-LAX
alt-svc: h3=":443"; ma=86400
{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05","capabilities":{"prompts":{"listChanged":false},"resources":{"subscribe":false,"listChanged":false},"tools":{"listChanged":false}},"serverInfo":{"name":"MCP Adapter Default Server","version":"v1.0.0"},"instructions":"Default MCP server for WordPress abilities discovery and execution"}}
Here’s the line you’re looking for: mcp-session-id: 7da30afb-fc84-4729-abc8-4b8b94ce32bc
Second command to see the communication is really working. Change the same info as above, and add the mcp-session-id from the previous command.
curl -X POST "https://<localhost or example.com>/wp-json/mcp/mcp-adapter-default-server" \
-u "<username>:xxxx xxxx xxxx xxxx xxxx xxxx" \
-H "Content-Type: application/json" \
-H "Mcp-Session-Id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}'
Response should look something like this:
{"jsonrpc":"2.0","id":1,"result":{"tools":[{"name":"mcp-adapter-discover-abilities","title":"Discover Abilities","description":"Discover all available WordPress abilities in the system. Returns a list of all registered abilities with their basic information.","inputSchema":{"type":"object"},"outputSchema":{"type":"object","properties":{"abilities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}},"required":["name","label","description"]}}},"required":["abilities"]},"annotations":{"title":"Discover Abilities","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true}},{"name":"mcp-adapter-get-ability-info","title":"Get Ability Info","description":"Get detailed information about a specific WordPress ability including its input\/output schema, description, and usage examples.","inputSchema":{"type":"object","properties":{"ability_name":{"type":"string","description":"The full name of the ability to get information about"}},"required":["ability_name"]},"outputSchema":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","description":"JSON Schema for the ability input parameters"},"output_schema":{"type":"object","description":"JSON Schema for the ability output structure"},"meta":{"type":"object","description":"Additional metadata about the ability"}},"required":["name","label","description","input_schema"]},"annotations":{"title":"Get Ability Info","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true}},{"name":"mcp-adapter-execute-ability","title":"Execute Ability","description":"Execute a WordPress ability with the provided parameters. This is the primary execution layer that can run any registered ability.","inputSchema":{"type":"object","properties":{"ability_name":{"type":"string","description":"The full name of the ability to execute"},"parameters":{"type":"object","description":"Parameters to pass to the ability"}},"required":["ability_name","parameters"]},"outputSchema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":["object","array","string","number","integer","boolean","null"],"description":"The result data from the ability execution"},"error":{"type":"string","description":"Error message if execution failed"}},"required":["success"]},"annotations":{"title":"Execute Ability","readOnlyHint":false,"destructiveHint":true,"idempotentHint":false}}]}}
Now, you can see it’s actually working. You can send other curl requests to dig in further if you need more information.
You might need to reestablish Cline’s connection to the MCP Server after running these commands. Just toggle the switch in next to the MCP Server in Cline.
I hope that helps.