30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Connect OpenCode to WordPress

Connect OpenCode to WordPress — AcrossAI setup guide

Connect OpenCode to your own WordPress site over the Model Context Protocol. OpenCode talks to your site directly — there is no relay in between, no account to create, and your credentials never leave your machine. Setup takes about a minute once MCP Manager is installed.

Free plugin · No account · Runs on your own server · Any WordPress host

Config file

~/.config/opencode/opencode.json

Top-level key

mcp — not mcpServers

Scope

Global, or per project

Before you start

You need AcrossAI MCP Manager installed and active on the WordPress site you want OpenCode to reach, plus an administrator account on that site. If you have not installed it yet, follow the Get Started guide first — it takes about a minute, and the MCP server ships bundled with the plugin.

You also need Node.js available on the machine running OpenCode, because the connection runs through an npx bridge. Nothing is installed permanently — npx fetches the bridge on demand.

How to connect OpenCode to WordPress

Step 1

Open Quick Connect and choose OpenCode

In wp-admin go to AcrossAI → MCP, open the server you want to expose, and start Quick Connect. Pick OpenCode from the client list. Everything below is generated for you with your real site URL and username already filled in — the snippets here are only so you know what to expect.

Step 2

Generate an Application Password

Click Generate password in the wizard. This creates a standard WordPress Application Password — not your login password — scoped to this connection and revocable at any time from your user profile.

The password is shown once, at creation. Copy it whole, including the spaces — WordPress accepts them. If you lose it, generate a new one rather than trying to recover it.

Step 3

Merge the config into opencode.json under mcp

Copy the JSON from the wizard and open ~/.config/opencode/opencode.json to make the connection available everywhere, or opencode.json in a project root to scope it to that project. Create the file if it does not exist.

The top-level key is mcp. Three letters, nothing more. It is shorter than the key every other MCP client uses, and writing mcpServers out of habit is the single most common reason this setup fails — OpenCode simply ignores a key it does not recognise, so there is no error to read.

opencode.json also holds your model, provider, theme and agent settings, so merge the new server into the existing mcp object rather than pasting over the file. If mcp is not there yet, add it alongside the keys already present.

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "your-site-mcp-adapter-default-server": {
      "type": "local",
      "enabled": true,
      "command": ["npx", "-y", "@automattic/mcp-wordpress-remote@latest"],
      "environment": {
        "WP_API_URL": "https://example.com/wp-json/acrossai/mcp",
        "WP_API_USERNAME": "your-wp-username",
        "WP_API_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
      }
    }
  }
}

Connecting to a local development site with a self-signed certificate? Add "NODE_TLS_REJECT_UNAUTHORIZED": "0" to environment. Never do this for a production site.

Step 4

Restart OpenCode and check the tools

Quit OpenCode and start it again so it re-reads opencode.json — it loads the file at startup and will not pick up an edit made while it is running. Your site should appear as an MCP server, and the toolsets it exposes become available in the session. Ask something harmless to confirm it is live — “Which plugins on this site need updating?” is a good first test.

What OpenCode can do once it is connected

With Abilities Manager installed alongside it, OpenCode reaches 350+ abilities across 14 toolsets — rising past 800 once it detects the plugins you already run. From the terminal, in the same session you are writing code in, it can:

  • Read and edit content — posts, pages and any custom post type with their meta and revisions, and surgically edit a page’s block tree without rewriting the page.
  • Debug a broken site — read the debug log with secrets redacted, check Site Health, list recent fatal errors and un-pause what WordPress auto-disabled.
  • Inspect the database — schema and table sizes, index health, bloated autoloaded options, or EXPLAIN on a slow query.
  • Manage plugins, themes and core — search WordPress.org, install, update, roll back, and verify files against official checksums.
  • Work with files — inside an allowlist you define, with a dangerous-extension blocklist and optional pre-image backups of everything it touches.
  • Reach the plugins you already run — WooCommerce, Elementor, ACF, Rank Math, Yoast, WPCode and more, each registering only when that plugin is active.

Every ability runs WordPress’s own capability check for the calling user, so OpenCode can never do anything your account could not already do. See the full platform overview for the complete catalogue.

Frequently asked questions

Is connecting OpenCode to WordPress free?

Yes. AcrossAI MCP Manager and Abilities Manager are both free and GPL on WordPress.org, and there is no AcrossAI account to create. OpenCode keeps using whichever model provider you have already configured — AcrossAI never charges for AI inference, because none of it runs here.

Does my site data pass through AcrossAI servers?

No. OpenCode connects straight to your own domain and every request terminates at your /wp-json/ route. There is no relay, no gateway and no telemetry. Whatever OpenCode reads is still processed by your AI provider, so treat it as you would any other prompt.

Should I configure this globally or per project?

Put it in ~/.config/opencode/opencode.json if you work on one WordPress site and want it available from any directory. Put it in the project’s own opencode.json when a repository maps to a specific site — that keeps a staging connection out of an unrelated project, and the file can be committed for the rest of the team. The Application Password should not be committed; keep it in the global file.

Can OpenCode break my site?

Every ability runs WordPress’s own capability check for the calling user, so OpenCode can never exceed what your account can already do. Higher-risk operations refuse to run without an explicit confirmation flag, file access is confined to an allowlist you define, search-and-replace is a dry run by default, and any ability can be disallowed site-wide.

How do I disconnect OpenCode again?

Revoke the Application Password from your WordPress user profile, or set "enabled": false on the entry — or remove it from mcp altogether. Access is re-checked on every request, so revoking takes effect immediately even if the config is still on the machine.

Troubleshooting

OpenCode does not list the server at all

Check the key first. OpenCode uses mcp, not mcpServers — that one difference accounts for most failed setups, and because OpenCode ignores keys it does not recognise, nothing is reported. Then confirm the file is valid JSON: a trailing comma or a missing brace makes OpenCode fall back to defaults. Finally, restart it — the config is read at startup, not watched.

My model, theme or agent settings stopped working after I edited the file

You replaced opencode.json instead of merging into it. Unlike a dedicated MCP config file, opencode.json is OpenCode’s whole configuration — pasting the wizard’s snippet over the top removes everything else. Restore your previous settings and add mcp as one more top-level key alongside them.

It works in one directory but not another

A project opencode.json only applies when OpenCode is started inside that project. If you added the server to a project file and then launched OpenCode elsewhere, it is not in scope. Move the entry to ~/.config/opencode/opencode.json to have it everywhere.

The server appears but has no tools

That is the connection working and the catalogue being empty. Either Abilities Manager is not installed — MCP Manager will serve an empty catalogue quite happily — or the abilities exist but are not exposed to this particular server. Open AcrossAI → MCP, select the server, and check its Tools and Abilities tabs. After changing what a server exposes, restart OpenCode: MCP clients receive their tool list once, at connection time.

Authentication fails, or the request is refused

Application Passwords are shown once and are not your login password. Generate a fresh one from Quick Connect rather than retyping an old one, and copy it complete with spaces. Note that OpenCode expects the variables under environment, not env. If the request is being refused rather than failing, check the server’s access rules — a new server requires manage_options until you add a rule, and the gate fails closed.

npx is not found

The bridge runs through npx, which ships with Node.js. Install Node.js on the machine running OpenCode and restart it. If Node is installed through a version manager, put the absolute path to npx as the first element of the command array.

Connect a different AI client

The same server works with every MCP client — only the config file and top-level key change. See the guides for Claude Desktop, Claude Code, Cursor, VS Code, GitHub Copilot, Windsurf, Zed, Codex and every other client.

Not installed yet?

Install MCP Manager on your site, then come back and run Quick Connect.


Keep reading