Free in EMCP Tools
  • Free
  • Off by default

Custom PHP for your site, with a human in charge.

PHP Snippets run small pieces of PHP as an [emcp_snippet] shortcode, on a WordPress hook, or both. Your AI agent can write and check snippets, but they stay inactive drafts until an administrator reviews and activates them.

6
MCP tools
0
tools that can activate a snippet
3
levels of validator findings
Snippet review panel showing the PHP of a table of contents shortcode and the validator verdict Safe to activate with one note.
Validator

Checked before it can ever run.

Every snippet is parsed and scanned. Dangerous code, such as eval, shell commands, file writes, network calls and decoding of hidden payloads, blocks the snippet outright. Code worth a closer look, such as sending mail or deleting posts, is flagged for your review. The validator is a guardrail, not a guarantee, so read what you activate.

Your call

Only an administrator can switch one on.

There is no MCP tool to activate a snippet. A draft has no executable file at all. Activation writes it to a protected sandbox folder with a checksum, and only checked files are ever loaded.

PHP Snippets list filtered to an active snippet that sets a featured image from the first content image.
Snippets list with status, how it runs and the review result.
Safety net

A snippet that crashes switches itself off.

Each active snippet runs inside a guard. If one causes a fatal error, it is deactivated so the next request loads normally.

  • Writing and activating snippets needs an administrator who may add unfiltered HTML.
  • The snippet tools are off until you enable them on the Tools screen.
  • Elementor is not needed.
For AI agents

MCP tools this adds 6

What a connected AI agent can call. Tools marked "Off by default" are switched on under EMCP Tools, Tools.

  • validate-php-snippetStatically checks snippet code (parse + security scan) without storing or running it.FreeOff by default
  • create-php-snippetCreates an INACTIVE draft snippet (validated; an admin must activate it before it runs).FreeOff by default
  • update-php-snippetUpdates a snippet's code/settings and re-validates.FreeOff by default
  • get-php-snippetReturns a snippet's code, status, shortcode, and validation report.FreeOff by default
  • list-php-snippetsLists PHP snippets with their status and run context.FreeOff by default
  • delete-php-snippetPermanently deletes a snippet and its sandbox file.FreeOff by default
See PHP Snippets (Sandbox) in the tool catalog
Frequently asked

Questions, answered.

Still stuck? Drop a line at [email protected] or open an issue on GitHub. Most replies are under one business day; Pro tiers go to the front of the queue.

Open the full docs
No. There is no activate tool. Only an administrator can activate a snippet in the Sandbox.
It is switched off automatically, so the next request recovers.
No. It blocks obviously dangerous code and flags risky calls, but you should read anything you activate.
Administrators who may add unfiltered HTML.
Yes.

Add the small things, safely.

Install EMCP Tools free and open Build → Sandbox → PHP Snippets.