How to connect your WordPress site to Gemini
The Gemini CLI can operate your self-hosted WordPress site straight from the terminal — publishing posts, updating WooCommerce prices, and reading the error log to explain what broke. Install the free Cowboy MCP plugin, generate an API key under Settings → Cowboy MCP, and run one gemini mcp add command to register your site as a remote MCP server — no browser sign-in needed. New to MCP? Start with the WordPress MCP server guide.
What can Gemini do on your live WordPress site once it's connected?
Once connected, the Gemini CLI acts on your live site with real tools, not just text it prints back to you. From the terminal it can draft and schedule posts, keep plugins updated, update WooCommerce products and prices in bulk, and read the PHP error log to explain a fatal in plain language. Cowboy MCP exposes 137 WordPress tools that Gemini calls directly over HTTPS.
How do you connect Gemini to WordPress in three steps?
Connecting takes three steps and one command. Install the Cowboy MCP plugin, generate an API key under Settings → Cowboy MCP, then run a single gemini mcp add command in your terminal to register the site. Because the Gemini CLI is an API-key client, it authenticates with that key over an HTTP Bearer header — there's no browser sign-in and no Google Cloud project to set up.
- 1
Install the free plugin
In WordPress, go to Plugins → Add New, search for Cowboy MCP, and click Install then Activate.
- 2
Generate an API key
Open Settings → Cowboy MCP, name a key on the Connection tab, and generate it — it's shown once, so copy it now.
- 3
Run the add command
Paste the one-line gemini mcp add command below into your terminal, swapping in your site and key.
Then run gemini mcp list — your site should show as connected.
Why does Gemini connect through your site's own endpoint instead of a browser sign-in?
The Claude desktop and web apps sign in through a one-click browser connector, but the Gemini CLI takes the terminal path instead. Cowboy MCP publishes a Streamable HTTP endpoint as an ordinary WordPress REST route at /wp-json/cowboy-mcp/v1/endpoint, so the Gemini CLI reaches your site directly over HTTPS with a Bearer API key — no browser sign-in, no proxy process, and nothing extra running on your machine. The plugin is itself the MCP server.
One endpoint serves every MCP client, so the same site you wire into the Gemini CLI is ready for whatever agent you reach for next — Claude Code, the Claude desktop and web apps, Cursor, and Codex all reach the same tools. Only the setup command changes from one client to the next.
Is it safe to run the Gemini CLI against your live production site?
Yes, with the same guardrails the plugin applies to every client. Safe mode is on by default, so destructive tools ask before they run. Any write can be previewed as a dry run, every change lands in an undo journal you can roll back, and requests are rate-limited to 120 per minute. Give the Gemini CLI its own API key you can revoke — it all runs on your own server. More on security →
Questions, answered.
Which Gemini works with this — the app or the CLI?
The Gemini CLI — Google's open-source command-line agent. It speaks MCP, so you register your site from the terminal with one gemini mcp add command and an API key, and Cowboy MCP shows up as a set of tools the CLI can call. The connection lives in your terminal, not in a browser sign-in.
Do I need Google Cloud or a Google API key?
Not for Cowboy MCP. The only key the plugin needs is the one you generate in WordPress under Settings → Cowboy MCP, which the Gemini CLI sends as a Bearer token — no Google Cloud project required. Signing in to the Gemini CLI itself is handled on Google's side; see Google's Gemini CLI authentication docs (opens in new tab) for the options.
Can Gemini manage my WooCommerce store?
Yes. When WooCommerce is active, 40 store tools light up — products and variations, orders and refunds, coupons, customers, stock, and sales reports — so the Gemini CLI can update prices, adjust inventory, and process refunds in bulk, not just describe them.
Does this work only on self-hosted WordPress?
Yes. Cowboy MCP installs into a WordPress site you control, so it runs on any self-hosted (WordPress.org) install on your own hosting. It can't be added to WordPress.com plans that don't allow custom plugins. Your site needs WordPress 6.2 or newer on PHP 8.0+.
Ready to connect the Gemini CLI to your WordPress site?
Install the free, open-source Cowboy MCP plugin, generate an API key, and run one command — the Gemini CLI is managing your site minutes later. It works on any self-hosted WordPress site running version 6.2 or newer on PHP 8.0+. Prefer a different agent? The same site connects to Claude Code and the Claude desktop and web apps too.