
AEM Content Manager (ACM)
io.github.wttechv0.1.1更新於 Oct 7, 2026
Validate and run Groovy scripts on Adobe Experience Manager through AEM Content Manager (ACM).
概覽
讓助理透過 ACM 在 Adobe Experience Manager 作者執行個體上驗證、執行並追蹤 Groovy 指令碼。
- 功能
- 將 MCP 用戶端連線到 AEM 作者執行個體上的 AEM Content Manager(ACM)。工具涵蓋健康檢查、只做編譯驗證而不執行 Groovy、將指令碼排入佇列執行並輪詢狀態與主控台輸出、中止執行、讀取執行歷史、列出並讀取已儲存的指令碼、解析指令碼輸入,以及下載執行輸出檔案。它也以提示與資源形式提供 ACM Groovy 指令碼撰寫指南。
- 適用情境
- 適合使用 AEM、並希望助理透過 ACM 檢查內容或執行 Groovy 的情境,例如統計某內容路徑下的元件數量,或反覆調整指令碼。對象是 AEM 開發者與管理員,包含 AEM as a Cloud Service;沒有啟用 ACM 的 AEM 執行個體時並無用處。
- 執行需求
- 需要 Node.js 22 或更新版本,透過 npx 以 stdio 在本機執行。AEM 作者執行個體上必須安裝 ACM。必要:AEM_BASE_URL。憑證擇一:AEM_TOKEN、AEM_COOKIE、AEM_COOKIE_FILE,或 AEM_USER 搭配 AEM_PASSWORD。使用者需對 ACM 的 API、功能與指令碼節點具備 jcr:read 權限。需要能連線到該 AEM 執行個體的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 AEM Content Manager (ACM),將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
ACM MCP Server
A Model Context Protocol server that connects AI agents (Claude Code, Claude Desktop, VS Code, Cursor and other MCP clients) to AEM Content Manager (ACM) running on Adobe Experience Manager, including AEM as a Cloud Service.
An agent can validate and run Groovy scripts on AEM through ACM, follow long-running executions, read execution history and console output, and browse the scripts stored on the instance. Every call runs as the user whose credentials you configure.
[!WARNING] This server lets an AI agent run arbitrary Groovy code on AEM with your permissions. Read Security before pointing it at a shared or production instance.
[!TIP] Using VS Code? The ACM extension bundles this server and registers it for the active instance, with credentials from VS Code's secret storage. No setup below is needed.
Requirements
- Node.js 22 or later.
- ACM installed on the AEM author instance. Running code without history (
history: false) needs ACM 0.9.74 or later. - A user with access to the ACM API (see Permissions).
Setup
The server is configured entirely through environment variables set in your MCP client. There are no config files.
1. Choose credentials
Set one of these options. The server detects which one you used.
The login-token cookie expires after about 12 hours. With AEM_COOKIE you must paste a new value and reconnect the agent each time. With AEM_COOKIE_FILE you only rewrite the file.
2. Register the server with your agent
Every MCP client needs the same things. Where they go and in which format depends on the client, so this guide does not list client-specific files:
The easiest way is to ask your agent, which knows its own configuration:
Add the ACM MCP server to this tool's MCP configuration: transport stdio, command
npx, arguments-y @wppes/acm-mcp-server, environmentAEM_BASE_URL=https://author-pXXXX-eYYYY.adobeaemcloud.comandAEM_TOKENfor the credential,ACM_READONLY=true. Find in this tool's documentation where MCP servers are configured and in which format. Never write the credential into a file that may be committed and do not ask me to paste it here: reference an environment variable or the tool's secret mechanism, and tell me where to put the value. Then callacm_healthto verify.
Keep the credential out of files that are committed. Most clients can reference an environment variable or ask for the value when the server starts.
3. Check the connection
Ask the agent to call acm_health. It reports the target instance, the auth mode, and the instance state as ACM reports it.
Optional environment variables
Tools
Bare Groovy snippets are wrapped in the canRun()/doRun() structure automatically, so println "hello" is valid input for acm_validate_code and acm_run_code.
Runs without history
Every queued run is stored in ACM execution history, so iterating on a script quickly fills it up. With history: false, acm_run_code calls /apps/acm/api/execute-code.json directly and the run is not recorded. Such a run:
- has no execution ID to poll or abort, and keeps no output files;
- is cut off on the client side after
waitMs, while the script may keep running on AEM.
Use it for short read-only runs or dry runs while you develop a script. Run the final version, and anything that changes content, with the default history: true so the change stays auditable.
Running without history needs the console/execute/nohistory ACM feature (administrators only by default); without it the call fails with 403. Such runs still appear in ACM's audit log.
Scripting guide
The server ships the ACM Groovy scripting skill, so agents write valid, safe scripts without extra setup:
- Instructions. The skill's essentials (never invent API, dry runs, abort checks, validate before running) are sent to the client when it connects. Clients add them to the model's context.
- Prompt.
acm-groovy-scriptreturns the full guide. - Resources. The guide and its references are available as
acm://skill/SKILL.md,acm://skill/references/api.md(every ACM variable, class and method, generated from the ACM source),acm://skill/references/scripts.mdand the script templates underacm://skill/templates/.
Example
Ask the agent something like:
Use ACM to count how many
wknd/components/teasercomponents are under/content/wknd/us/en.
It calls acm_health, then validates and runs a script such as:
Permissions
ACM checks access at three levels. The user behind the credentials needs jcr:read on each:
- the API node under
/apps/acm/api; - the feature node under
/apps/acm/feature; - the script path under
/conf/acm/settings/script.
By default only administrators have access. See Tools Access Configuration. A 403 from any tool includes this hint. A 401 means the token or cookie has expired.
Security
- The agent acts as you. Every script runs with the permissions of the configured user. A model can make mistakes, and content it reads (pages, scripts, execution output) can try to steer it. Use the least-privileged user that can do the job.
- Use
ACM_READONLY=truefor production. Health, validation, history and script-reading tools keep working; running, describing and aborting code are blocked. This only stops the agent from calling those tools. It is not a security boundary: validation still compiles the submitted Groovy on AEM, and Groovy compile-time transforms can run code. The real control is the AEM permissions of the configured user. - Runs are traceable. Queued runs are kept in ACM history; runs that leave no history (without history, or not queued by
canRun()) are written to ACM's audit log with the user and a checksum of the code. Grantconsole/execute/nohistoryonly to users who need it. - Grant agents only what they need. A user with the
script/executefeature but withoutconsole/executecan only run the stored scripts as they are. - Review scripts before they run against shared instances. Don't auto-approve
acm_run_codein your MCP client for those instances. - Prefer dry runs for destructive changes. Use ACM's
repo.dryRun(...)pattern; the bundled scripting guide steers the model towards it. - Credentials stay local. The server runs on your machine and only talks to
AEM_BASE_URL. Keep tokens in your MCP client's secret storage or environment, not in files you commit.
Contributing
To build, test and release the server, see the development guide.
License
Part of AEM Content Manager, licensed under the Apache License, Version 2.0.
來源:tools/mcp-server/README.md,提交 1c1b56e
工具
0版本歷史
1- v0.1.1最新Oct 7, 2026


