How to connect your WordPress site to Gemini — the app or the CLI
Gemini can operate your self-hosted WordPress site — publishing posts, updating WooCommerce prices, and reading the error log to explain what broke. Install the free Cowboy MCP plugin, then add your site to the Gemini app as a custom app, or register it in the Gemini CLI with one gemini mcp add command, as a remote MCP server. Either way you click Approve on your own site. One-click sign-in means no API key to copy, store, or lose. 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, Gemini acts on your live site with real tools, not just text it prints back to you. From a chat or 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 203 WordPress tools that Gemini calls directly over HTTPS.
How do you connect the Gemini app to WordPress?
The Gemini app at gemini.google.com connects with no terminal. Install the Cowboy MCP plugin, click Open Gemini on the Connections tab under Settings → Cowboy MCP, add your site as a custom app, and click Approve on your own site — one-click sign-in. Custom apps need a personal Google account in the United States with Gemini in English; work and school accounts don't have them yet.
- 1
Install the free plugin
In WordPress, go to Plugins → Add New, search for Cowboy MCP, and click Install then Activate.
- 2
Click Open Gemini
Open Settings → Cowboy MCP, pick Gemini on the Connections tab, and click Open Gemini. It copies your site link, opens Gemini's Connected Apps page, and opens a 30-minute window for new connections.
- 3
Add it and approve
Under Custom apps, paste the link into Add a custom app link, click Next twice, tick the acknowledgement, and click Connect. Gemini opens a sign-in page on your site — pick full access, read-only, or a custom list of tools, and click Approve.
Back in Gemini, click Connect on the Save your custom app card. In a chat, type @ to pick your site; Gemini asks you to allow its first tool run. The Gemini app connects from Google's servers, so your site needs a public HTTPS address — for a local development site, use the Gemini CLI below.
How do you connect the Gemini CLI to WordPress in three steps?
Connecting takes one command and about two minutes. Install the Cowboy MCP plugin, copy the gemini mcp add command from the Connections tab under Settings → Cowboy MCP, run it, and click Approve on your own site — one-click sign-in. There's no API key to copy or keep safe and no Google Cloud project to set up, and you decide exactly what Gemini may do before it can do anything. It works on local development sites too.
- 1
Install the free plugin
In WordPress, go to Plugins → Add New, search for Cowboy MCP, and click Install then Activate.
- 2
Copy the setup command
Open Settings → Cowboy MCP, pick Gemini CLI on the Connections tab, and click Copy. That also opens a 30-minute window for new connections.
- 3
Run it and sign in
Paste the gemini mcp add command into your terminal, then start gemini. It opens a sign-in page on your site — pick full access, read-only, or a custom list of tools, and click Approve. -s user saves the server to your user settings, so it works in every folder.
If the browser doesn't open, run /mcp auth your-site inside gemini. Then run gemini mcp list — your site should show as connected.
Prefer a config file? Add your site to ~/.gemini/settings.json with "httpUrl" set to your endpoint and "oauth": { "enabled": true }. Headless or CI? Generate an API key on the Connections tab and add --header "Authorization: Bearer YOUR_API_KEY" to the command instead.
Why doesn't Gemini need a proxy to reach WordPress?
The Gemini app and the Gemini CLI sign in the same way the Claude desktop and web apps do: a one-click sign-in you approve on your own site, with no key to copy or lose. Cowboy MCP publishes a Streamable HTTP endpoint as an ordinary WordPress REST route at /wp-json/cowboy-mcp/v1/endpoint, so Gemini reaches your site directly over HTTPS — no proxy process, no Google Cloud project, 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 Gemini is ready for whatever agent you reach for next — Claude Code, the Claude desktop and web apps, ChatGPT, Cursor, Codex, Perplexity, and Grok all reach the same tools. Only the setup command changes from one client to the next.
Is it safe to let Gemini work on 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. Gemini gets only the access you approve, and you can revoke it any time — it all runs on your own server. More on security →
Questions, answered.
Which Gemini works with this — the app or the CLI?
Both. The Gemini app at gemini.google.com adds your site as a custom app with no terminal: paste your site link, then approve a one-time sign-in on your own site. The Gemini CLI, Google's open-source command-line agent, registers your site with one gemini mcp add command and the same sign-in. Either way Cowboy MCP shows up as a set of tools Gemini can call. Use whichever you already work in.
Why don't I see Custom apps in the Gemini app?
Google offers custom apps only on personal Google accounts in the United States, for users 18 or over, with Gemini set to English and Keep Activity on. Work and school accounts don't have the Custom apps section yet. Google lists no paid-plan requirement. If your account doesn't qualify, the Gemini CLI connects the same site with any Google sign-in.
Do I need Google Cloud or a Google API key?
Not for Cowboy MCP. The Gemini app and the Gemini CLI both connect to your WordPress site with one-click sign-in that you approve on your own site — no Google key and 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 Gemini 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 Gemini to your WordPress site?
Install the free, open-source Cowboy MCP plugin, add your site in the Gemini app or run one command in the Gemini CLI, and approve the sign-in — Gemini 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.