How to connect WordPress to OpenCode

Connect OpenCode to your WordPress site with the free Llamly MCP plugin. Create an access key, add it to opencode.json and check with opencode mcp list.

With the free Llamly MCP plugin, OpenCode can work on your WordPress site from the terminal: create and edit pages and posts, change Gutenberg blocks, upload media, organize menus, categories and tags, and undo its own changes. You create an access key in wp-admin and add one entry to OpenCode’s configuration. It works with a WordPress site on your computer too.

What you need

  • A WordPress site where you can install plugins (public or local).
  • OpenCode installed and set up with the model you use.

Steps

  1. Install Llamly MCP from Plugins › Add New in wp-admin and activate it.
  2. Open Llamly › Connections and choose OpenCode.
  3. Create an access key. Give it a name (for example “OpenCode · my computer”) and choose the access: full access, read only, or chosen tools by category. Click Create key. It’s shown only once, so copy it now.
  4. Add it to the configuration file. Choose For all projects (~/.config/opencode/opencode.json) or Only in this project (opencode.json in the project root), add the snippet from the recipe and restart OpenCode. It looks like this, with your site and key filled in:
{
  "mcp": {
    "my-site": {
      "type": "remote",
      "url": "https://your-site.example/wp-json/llamly/v1/endpoint",
      "oauth": false,
      "headers": { "Authorization": "Bearer YOUR_KEY" }
    }
  }
}
  1. Check that it works. Run opencode mcp list. Your site should show up as connected.

Your first request

Ask OpenCode:

List the drafts on my site that haven’t been published yet.

After the first request, Llamly marks OpenCode as connected and the request shows up in Llamly › Logs.

What OpenCode can and can’t do on your site

The key acts as your WordPress user, with your content permissions and never administrator ones: no site settings, users, plugins, themes, code files, SQL or shell on the server. Every change is listed in Llamly › Activity with an Undo button, and safe mode makes the agent confirm before it deletes something or undoes a change. Lost the key? Create another one and revoke the old one in Connections.

Watch the tutorial

The 2-minute video walks through a connection from install to first request: watch it on YouTube.

Get Llamly MCP

Llamly MCP is free on WordPress.org. Download Llamly MCP from WordPress.org. Using another app? Compare all apps.