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

Start free trial

Connect Gemini CLI to WordPress

Connect Gemini CLI to WordPress — AcrossAI setup guide

Connect Gemini CLI to your own WordPress site over the Model Context Protocol. Gemini CLI 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

~/.gemini/settings.json

Top-level key

mcpServers

Transport

npx bridge over HTTP

Before you start

You need AcrossAI MCP Manager installed and active on the WordPress site you want Gemini CLI 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 on the machine running Gemini CLI, because the connection runs through an npx bridge. Gemini CLI itself already requires Node, so if the CLI runs, npx is there. Nothing is installed permanently — npx fetches the bridge on demand.

How to connect Gemini CLI to WordPress

Step 1

Open Quick Connect and choose Gemini CLI

In wp-admin go to AcrossAI → MCP, open the server you want to expose, and start Quick Connect. Pick Gemini CLI 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

Paste the config into ~/.gemini/settings.json

Gemini CLI keeps its user-level configuration in ~/.gemini/settings.json. That file often does not exist yet — a fresh install creates the ~/.gemini directory for its own state but no settings file — so create it if it is missing, with the whole document wrapped in a single pair of braces. If the file is already there, add your entry under the existing mcpServers key instead of replacing the file, and leave the other settings alone.

The generated config looks like this, with your own values in place of the placeholders:

{
  "mcpServers": {
    "your-site-mcp-adapter-default-server": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "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"
      }
    }
  }
}

To scope the connection to one project rather than your whole account, put the same mcpServers entry in .gemini/settings.json inside the project directory. Project settings take precedence over the file in your home directory.

Step 4

Restart Gemini CLI and run /mcp

Quit the CLI and start it again so it reads the new settings, then type /mcp at the prompt. Your site should be listed as a connected server together with the tools it exposes. Ask something harmless to confirm it is live — “Which plugins on this site need updating?” is a good first test.

What Gemini CLI can do once it is connected

With Abilities Manager installed alongside it, Gemini CLI reaches 350+ abilities across 14 toolsets — rising past 800 once it detects the plugins you already run. From the terminal you are already 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 Gemini CLI can never do anything your account could not already do. See the full platform overview for the complete catalogue.

Frequently asked questions

Is this the same as connecting Gemini in the browser?

No, and it is worth being precise about it. Gemini CLI is the open-source terminal agent you install with npm and configure in ~/.gemini/settings.json — that is what this page covers. Gemini in the browser is a separate product with its own connector interface, where you add your site by URL rather than by editing a file; follow Connect Gemini to WordPress for that. The two share a name and a model family, nothing else. Configuring one does not configure the other, and connecting both is fine.

Is connecting Gemini CLI 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. You use whatever Gemini CLI access you already have — AcrossAI never charges for AI inference, because none of it runs here.

Does my site data pass through AcrossAI servers?

No. The bridge runs on your own machine and connects straight to your own domain; every request terminates at your /wp-json/ route. There is no relay, no gateway and no telemetry. Whatever Gemini CLI reads from the site is still sent to Google’s models for processing, so treat it as you would any other prompt.

Do I need to install the WordPress MCP Adapter separately?

No. The official WordPress MCP Adapter ships bundled inside MCP Manager, so there is nothing else to download and no second plugin to keep in step. MCP Manager needs WordPress 7.0 or later; Abilities Manager needs WordPress 6.9 or later. Both need PHP 8.1 or later, and all of it works on shared hosting, a VPS or managed WordPress.

Can Gemini CLI break my site?

Every ability runs WordPress’s own capability check for the calling user, so Gemini CLI 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. Gemini CLI also asks before running a tool unless you have told it otherwise.

How do I disconnect Gemini CLI again?

Revoke the Application Password from your WordPress user profile, or remove the entry from ~/.gemini/settings.json. Access is re-checked on every request, so revoking takes effect immediately even if the config is still on the machine.

Troubleshooting

~/.gemini/settings.json does not exist

That is normal — Gemini CLI does not write the file until something needs it, and the ~/.gemini directory may hold only its own state. Create the file yourself. It must be a complete JSON document, so the first version is the whole snippet from Step 3, outermost braces included, not just the server entry. Create the directory too if it is missing: mkdir -p ~/.gemini.

I edited ~/.gemini/config/mcp_config.json and nothing happened

That file belongs to Antigravity, not Gemini CLI. Both live under ~/.gemini, which catches people out. Gemini CLI reads ~/.gemini/settings.json and expects the mcpServers key at the top level of that file; Antigravity reads ~/.gemini/config/mcp_config.json. Editing one has no effect on the other. If you are setting up Antigravity, follow Connect Antigravity to WordPress instead.

/mcp lists no servers, or lists the server with no tools

Settings are read at startup, so quit the CLI and start it again — editing the file in another window changes nothing in a running session. If /mcp still shows nothing, the JSON is probably invalid: a trailing comma or a missing brace makes Gemini CLI fall back to defaults and ignore the file. Check too that mcpServers sits at the top level, and that a project-level .gemini/settings.json in the directory you launched from is not overriding your home-directory file.

If the server is listed but carries 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 server. Open AcrossAI → MCP, select the server, and check its Tools and Abilities tabs. After changing what a server exposes, restart the CLI: MCP clients receive their tool list once, at connection time.

Authentication fails

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. 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.

It worked yesterday and stopped today

Access is re-checked on every request, not just at setup. A change to your role, capability or membership takes effect immediately, and a saved config does not keep working. Revoking the Application Password has the same effect.

Connecting to a local site fails on the certificate

Local development sites usually present a self-signed certificate, which the bridge rejects. Add "NODE_TLS_REJECT_UNAUTHORIZED": "0" to the env block alongside the three WP_API_* variables. Use it only for local sites — it disables certificate verification for that process.

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 Gemini in the browser, Antigravity, Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Codex and every other client.

Not installed yet?

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


Keep reading