Skip to content
Site Agent icon

Connect your AI agent to WordPress.

Site Agent is a free WordPress MCP plugin. Claude, ChatGPT, Cursor and other AI clients sign in with OAuth, read your real content and code, and change only what you’ve switched on.

Version 1.0.0 · Requires WordPress 6.9 · Requires PHP 8.0 · GPL

Your AI client · Site Agent connected

The intro on my hosting guide runs too long. Tighten it and stage the change so I can review it.

I’ll read the post first, so I’m working from what’s actually published.

Read content block markup, SEO fields and the hashDone
Save content new intro, same hashStaged

Done. The new intro is two sentences. It’s saved as an autosave on the live post, so visitors still see the old version until you publish it.

Hosting guide

There is an autosave of this post that is more recent than the version below. View the autosave

Illustration of a real Site Agent flow: read first, then stage the edit for your review.

An AI agent that can’t see your site works from guesses and pasted snippets. Site Agent gives it the real thing: your posts, media, templates and code, through 18 tools you switch on one group at a time.

Reads before it writes

The agent checks the actual post, file or setting first, and every write must carry the hash from that read.

Edits wait for you

Changes to a published post are saved as an autosave. The live page changes only when you say publish.

Code has a safety net

PHP is checked before it’s saved, and a change that still causes a fatal error is swapped back for the old file.

Clients sign in through WordPress with OAuth. On the consent screen you tick the tool groups that client gets, and nothing else. Access tokens last an hour, refresh tokens rotate, and revoking a connection in Tools > Site Agent ends it everywhere, including sessions that are already open.

Site Agent's OAuth consent screen asking which tool groups Cursor may use
The real consent screen, shown here for Cursor.

Everything starts switched off.

New installations start with Site Agent disabled. Turn it on and your agent can read the site. Content writes, source files, PHP and WP-CLI each have their own switch, and each stays off until you need it.

In wp-config.php, SITE_AGENT_DISABLED blocks every tool and DISALLOW_FILE_EDIT blocks every source and developer tool.

Site Agent Tools > Site Agent

  • Enable Site AgentLet administrators connect to this site.
  • OAuth connectionsSign in to WordPress and approve each client.
  • Content writesDrafts, posts, pages, terms and media.
  • Source editingCreate, change, move or delete source files.
  • PHP executionRun PHP with full server privileges.
  • WP-CLI executionRun foreground WordPress commands.
Illustration of a setup for content work. Developer tools stay off.

It knows where your page builder keeps the page.

Block markup written into an Elementor or Bricks page changes nothing visitors see. Site Agent tells the agent where each layout lives, and a bundled skill shows how that builder expects it to change.

Skills also ship for Page Blocks Builder and GT Link Manager, with workflow guides for MailerHive, Core Support, FluentCart and Stackless.

BuilderLayout lives in
GutenbergBlock markup in the post
GenerateBlocksBlock markup with its own CSS
ElementorJSON in post meta, saved through Elementor
BricksBricks’ own abilities, on 2.4 and later
DiviShortcodes or Divi 5 blocks

Built for the day your agent gets it wrong.

Six checks run on every change, so the common mistakes are caught or easy to undo before visitors see them.

  • Live posts stay live

    Edits to published posts are saved as an autosave you review in the editor.

    Content
  • Broken PHP gets reverted

    Site Agent loads your site after a save and puts the old file back on a fatal error.

    Code
  • No silent overwrites

    If you or another tool changed something since the agent’s last read, the write is refused.

    Content
  • Errors the agent can fix

    Failed calls return the real message and line number, so the agent corrects its own code.

    Code
  • Permissions per client

    A client can use only the groups you approved, and only if they’re on for the site.

    Access
  • Call history

    The last 100 calls with tool, target, client and result. Content and credentials stay out.

    Access

18 core tools, in groups you control.

Only the read tools work once Site Agent is enabled. Every other group stays off until you switch it on and approve it for a client.

Tool groupWhat the agent can doDefault
Read the site 7 toolsSite context, posts and pages, terms, media and builder skillsOn once enabled
Content writes 3 toolsSave drafts and updates, upload and update mediaOff
Source inspection 2 toolsList and read plugin, theme and must-use plugin filesOff
Source editing 4 toolsWrite, create, move and delete files, with hash checksOff
PHP execution 1 toolRun PHP with WordPress loaded and get the output backOff
WP-CLI execution 1 toolRun foreground commands as the signed-in user, no shellOff
Bricks tools OptionalBricks’ own abilities on Bricks 2.4 and laterOff
Core Support tools OptionalTickets, activity, team alerts and the roadmap. Never customer replies.Off

Set up in four steps. No token to copy.

OAuth is on by default. The only thing you paste into your client is the endpoint.

  1. Install the plugin

    Upload the ZIP from your account in Plugins > Add New, then open Tools > Site Agent.

  2. Choose the tools

    Enable Site Agent and the tool groups your task needs, then save.

  3. Add the endpoint

    Add it to your client as a remote MCP server, with no credentials.

  4. Approve the client

    Sign in to WordPress, tick its tool groups and choose Allow.

Watch the whole setup on a live site: I install Site Agent, connect ChatGPT and run the first tasks (4:50).

MCP server URL

https://your-site.com/wp-json/site-agent/v1/mcp
ClientHow to connect
ChatGPTTurn on Developer mode (paid plans), add an app with the endpoint and choose OAuth.
ClaudeCustomize > Connectors > Add custom connector, paste the endpoint, then Connect.
Claude Codeclaude mcp add --transport http site-agent plus the endpoint, then /mcp to sign in.
CursorAdd the URL to ~/.cursor/mcp.json and sign in from Cursor Settings > MCP.
VS CodeAdd the server to .vscode/mcp.json. Copilot agent mode opens the sign-in.
Codexcodex mcp add site-agent --url plus the endpoint, then codex mcp login site-agent.
Gemini CLIAdd httpUrl to ~/.gemini/settings.json, then run /mcp auth site-agent.
ZedAdd the URL under context_servers in settings.json. The agent panel opens the sign-in.

Remote clients need your site on HTTPS. Connecting needs an administrator account, or a super administrator on multisite.

Site Agent is free.

Every tool, every safety check and automatic updates with the free license. The code is GPL and public on GitHub, and every tool works without activating the license.

The download and license key appear in your account right after the free checkout.

Questions

Which AI clients can connect?

Any client that supports remote MCP over Streamable HTTP with OAuth. Add the endpoint, sign in to WordPress and approve the client’s tool groups. The endpoint URL is the only thing you paste.

Is it safe to give an AI agent write access?

For content work on most sites, yes, because edits to live posts are staged and every update is checked against the last read. The developer tools run with server privileges, so I’d keep them on staging and give production clients content access only.

What happens when the agent edits a published post?

The change is saved as your autosave. WordPress shows it in the editor next to the live version, and you decide whether to publish it. The agent changes the live post only by passing a status.

Where does my site’s data go?

Your AI client connects straight to WordPress. Site Agent has no hosted proxy and no telemetry. Automatic updates send gauravtiwari.org your license key, site URL and the plugin, WordPress and PHP versions.

What can the file tools reach?

Only plugins, themes and mu-plugins inside wp-content. Hidden files, symlinks and credential files such as wp-config.php are blocked, and Site Agent can’t edit its own files.

How do updates work?

Complete the free checkout, then activate the license on the Site Agent screen. New versions appear in your Plugins screen like any other update, and you can always install a release ZIP by hand.

Straight talk

Site Agent runs on gauravtiwari.org, and I use it for my own content and page work. That’s a real record on one busy site, not a promise about yours.

The developer tools run with server privileges and aren’t a sandbox. PHP can change your database, source edits change executable code, and WP-CLI can change the installation. Give production clients content access only, and keep developer tools for a trusted client on a staging site with a current backup.

Gaurav Tiwari

Built and supported by Gaurav Tiwari. When you email about Site Agent, the person reading it wrote the code. 18+ years building websites and plugins, and my plugins run on 10,000+ WordPress sites. More about me

Start with a staging site.

Connect your agent, check what it can read, then switch on more tools when the task needs them.