Skip to content

Feature request: MCP server for AI agents #324

Description

@tomasz-sobczyk-wttech

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions