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
Can AI activate a snippet?
No. There is no activate tool. Only an administrator can activate a snippet in the Sandbox.
What if a snippet breaks the site?
It is switched off automatically, so the next request recovers.
Is the validator a guarantee?
No. It blocks obviously dangerous code and flags risky calls, but you should read anything you activate.
Who can activate snippets?
Administrators who may add unfiltered HTML.
Is it free?
Yes.

Add the small things, safely.

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

Your EMCP guide

Answers from our docs

YOUR CHAT, YOUR CHOICE

Before we chat

MSR Builds processes your question and up to four recent messages on our server to answer from the EMCP docs. AI is optional and needs your separate permission.

The chat is kept in this page's memory, not saved as a conversation in our database or browser storage. Our hosting and security services process connection information, such as your IP address, to prevent abuse.

Cloudflare Turnstile checks your browser and connection to prevent automated abuse when you send a question. No login is required.

Please leave out personal, sensitive or confidential information, passwords and API keys.

You can withdraw consent and clear this page's chat at any time. This cannot undo a request already sent or erase provider/security records.

Chat privacy, retention & your rights ↗ · Privacy contact

Starting chat consents to this processing. You can browse our docs without using the chat.