PlugPress

Connect Gemini CLI to WordPress

Gemini CLI is Google’s AI agent for the terminal — and with Saddle it can manage your WordPress content: reading, writing, and organising posts, pages, and media. Setup is one command that Saddle writes for you.

What do I need before connecting?

How do I connect Gemini CLI to my WordPress site?

Step 1: Open the connect wizard

In your WordPress dashboard, go to Saddle → Connections, click Connect an app, and choose Gemini CLI.

Saddle connect wizard in WordPress showing the Choose app step with Claude, ChatGPT, Claude Code, Cursor, Gemini CLI, VS Code and Any MCP app

Step 2: Copy the setup command

Saddle setup step for Gemini CLI showing the one-line gemini mcp add terminal command

It looks like this — yours has your real address and key:

gemini mcp add --scope user --transport http saddle-your-site https://your-site.com/wp-json/saddle/v1/mcp 
  --header "Authorization: Basic PASTE-YOUR-KEY-HERE"

Copy it before closing the wizard. The key appears this once, and backing out early revokes it. Lost it? Use Rotate key on the app’s row.

Step 3: Paste it into your terminal

Open a terminal, paste, press Enter. It uses --scope user, so the connection is saved to your user profile and works from any folder.

How do I know it worked?

Run gemini in any folder and ask:

What can you see on my WordPress site?

It should report your site name, WordPress version, and content counts, and the app appears in Saddle → Connections.

What can Gemini do on my site?

Only what you allow on the Permissions screen — sites start read-only, and deletions always require a preview-and-confirm approval.

It didn’t connect — what now?

A stripped Authorization header or a mistyped key covers most failed connections, and the first has a one-click fix. Open Saddle → Connections → Connection details & health and click Test the endpoint, then see Troubleshooting and FAQ.

FAQ

Can I connect more than one WordPress site?

Yes. Each site’s wizard generates its own server name, so they register as separate servers.

How do I remove the connection?

Remove the server from Gemini CLI, and click Disconnect on the app’s row in Saddle → Connections so the key stops working.