Summary
Add a built-in MCP (Model Context Protocol) server to ACM, so AI agents such as Claude Code, Cursor or Copilot can validate and run Groovy scripts on AEM through ACM.
Why
- ACM already runs code inside the JVM, so an agent can reach all of AEM (JCR, Sling, OSGi, workflows, ACLs), not only the APIs someone exposed over REST.
- It is fast and token-efficient: one script instead of dozens of REST calls. In a side-by-side test on AEM as a Cloud Service it answered a content-tree question about 2.8× faster than a REST-based MCP.
- Safety comes built in: ACM feature permissions, running as the logged-in user, dry-run, and execution history as an audit log.
- We have run a local prototype on real projects, and it has proved very useful.
Killer features
- Run and validate code:
run_code (with inputs) and validate_code (compile only, never executes).
- Executions: poll, abort and list executions, and download output files such as CSVs and reports.
- Scripts: browse stored scripts and describe their inputs, so agents reuse tested scripts instead of improvising.
- Health check: instance and ACM state.
- Scripting guide prompt: teaches the model ACM conventions (
canRun()/doRun(), repo, dryRun) before it writes code.
- Dry-run by default: for any code that writes.
Summary
Add a built-in MCP (Model Context Protocol) server to ACM, so AI agents such as Claude Code, Cursor or Copilot can validate and run Groovy scripts on AEM through ACM.
Why
Killer features
run_code(with inputs) andvalidate_code(compile only, never executes).canRun()/doRun(),repo,dryRun) before it writes code.