Local AEM Development with AI Tools: Agents, Skills, and MCP Servers for AEM as a Cloud Service
In-depth discussion
Technical
0 0 9
This Adobe Experience Manager documentation explains how to use AI coding tools (Claude Code, Cursor, GitHub Copilot) for local AEM Java-stack development on Cloud Service. It covers four components: an AGENTS.md project context file generated by the ensure-agents-md skill; agent skills for component creation, Dispatcher configuration, migration, workflows, and code assessment; the AEM Quickstart Local MCP server exposing runtime logs, OSGi diagnostics, and request traces; and the Dispatcher MCP server for validating and tracing Dispatcher/HTTPD configs. It includes installation commands, IDE configuration snippets, and tool reference tables.
main points
unique insights
practical applications
key topics
key insights
learning outcomes
• main points
1
Provides a complete, end-to-end setup for AI-assisted AEM development across four complementary components
2
Offers concrete, copy-paste installation and IDE configuration commands for multiple tools (Claude Code, Cursor, Copilot, IntelliJ)
3
Clearly differentiates skill-based workflows from MCP-based live runtime tooling, with tables mapping each sub-skill and tool to its purpose
• unique insights
1
Explains that AI agents know AEM's underlying technologies (Java, OSGi, Sling, JCR, HTL) generally but lack AEM-specific best practices, justifying the project-context and skill layers
2
Describes the design split where the Dispatcher skill handles orchestration/advisory while the Dispatcher MCP server supplies local validation evidence, with the MCP intentionally exposing tools only
• practical applications
Highly actionable for AEM Cloud Service developers: readers can install skills, generate AGENTS.md, scaffold components, run migration assessments, and connect local SDK instances to AI agents by following the documented commands and configurations.
• key topics
1
AGENTS.md project context generation for AI coding tools
2
Adobe agent skills for component creation, Dispatcher, migration, workflows, and code assessment
3
AEM Quickstart MCP server for runtime logs, OSGi diagnostics, and request tracing
4
Dispatcher MCP server for config validation and cache inspection
• key insights
1
Grounds AI agents in AEM Cloud Service-specific domain expertise, avoiding confusion with AEM 6.5 or Edge Delivery Services
2
Bridges static code generation with live local runtime data via MCP, enabling troubleshooting without leaving the IDE
3
Consolidates multi-vendor AI tooling setup into a single coherent workflow for AEM teams
• learning outcomes
1
Generate and maintain an AGENTS.md file that grounds AI coding assistants in an AEM Cloud Service project
2
Install and invoke AEM agent skills to scaffold components, assess code quality, and configure Dispatcher
3
Connect a local AEM SDK instance and Dispatcher instance to AI tools via MCP for runtime diagnostics and config validation
AI coding agents such as Claude Code, Cursor, and GitHub Copilot have broad knowledge of the technologies beneath AEM, including Java, OSGi, Sling, JCR, and HTL. However, they do not automatically know the best practices for generating AEM code and configuration, nor how to diagnose common AEM development problems. Closing this gap requires AEM-specific context, reusable workflows, and access to live runtime data. The approach described here combines four complementary components to make AI assistance accurate and practical for AEM as a Cloud Service projects.
“ Grounding Your Project with AGENTS.md
AGENTS.md is a markdown file placed at the root of an AEM project. AI tools load it automatically at the start of every session, grounding the assistant in AEM as a Cloud Service Java-stack expertise rather than other AEM flavors such as AEM 6.5 or Edge Delivery Services. The file is not copied by hand; it is generated by the ensure-agents-md skill, which reads pom.xml to resolve the project name, discover modules, and detect installed add-ons. Once AGENTS.md exists, the skill stops running, so developers should edit the file directly when the project structure changes.
“ Agent Skills for Repeatable Development Tasks
Agent skills are instruction sets that encode multi-step workflows. When a skill is invoked, the AI follows its procedure rather than relying solely on general knowledge, producing consistent, convention-compliant output. Adobe publishes AEM as a Cloud Service skills in the adobe/skills repository, covering bootstrapping AGENTS.md, component creation, Dispatcher configuration, code assessment, migration from AEM 6.x or on-premise setups, and workflow development and troubleshooting.
“ Installing the AEM Agent Skills
Skills can be installed once and reused across all projects on a machine. With Claude Code, add the Adobe Skills marketplace and then install the aem-cloud-service plugin. With NPX, run npx skills add against the adobe/skills cloud-service path using the --all flag. With the GitHub CLI, install the gh-upskill extension and run gh upskill against the same path. After installation, opening an AEM as a Cloud Service project without an AGENTS.md triggers the ensure-agents-md skill automatically.
“ Scaffolding Components with the Create-Component Skill
The create-component skill generates a complete AEM component, including the component definition, dialog XML, HTL template, Sling Model, unit tests, and clientlibs. On first use it detects the project, package, and group from pom.xml and existing components, asks for confirmation, and writes a .aem-skills-config.yaml file at the project root; this file can also be created manually and is preserved across skill updates. A developer describes the component and its dialog fields in chat, and the agent echoes the specification for confirmation before generating files. Supported patterns include multifields with nested composite items, conditional show/hide logic, Core Component extension via Sling Resource Merger, and JUnit 5 tests using AEM Mocks. Designs may come from a text description, an image, or a Figma URL via Figma's MCP server.
“ Assessing and Fixing Code with the Code-Assessment Skill
The code-assessment skill detects and fixes best-practice violations, code-quality issues, and correctness problems within the local workspace. It checks for modernized Sling Model dependency injection, outdated Maven dependencies, missing timeouts on outbound HTTP calls, unbounded queries, Sling schedulers, resource change listeners, Replication and Assets API usage, JCR and OSGi event handling, and deprecated or removed AEM APIs. A project-wide review produces a findings report without changing code, and individual patterns can then be applied one at a time. Mechanical fixes are applied directly, while judgment-based fixes are guided step by step. The skill never commits or pushes, leaving review and commits to the developer.
“ Migrating Legacy Code with the Migration Skill
The migration skill guides the migration of AEM 6.x, AMS, or on-premise Java code, OSGi configurations, legacy UI dialogs, static templates, and Dispatcher configurations to AEM as a Cloud Service. It works one pattern at a time, such as scheduler or replication, using Best Practices Analyzer findings to locate affected files and applying transformations in batches with a pause for review after each. A read-only migration-runbook.md can be generated first to summarize affected files and finding counts across all supported patterns. Supported patterns include Sling Scheduler, ResourceChangeListener, Replication API, OSGi event handling, Assets API, Guava-to-Caffeine cache swaps, HTL lint fixes, OSGi configuration conversion with Cloud Manager secrets, Coral 2 to Coral 3 dialog migration, custom design widgets, static-to-editable template modernization, and Dispatcher conversion. The skill pairs with the Cloud Migration MCP to fetch findings from Cloud Acceleration Manager, or it can use a local BPA CSV export.
“ Configuring Dispatcher with the Dispatcher Skill
The dispatcher skill handles any Dispatcher or Apache HTTPD configuration task by routing requests to one of six specialist sub-skills. The workflow-orchestrator handles broad, end-to-end work; config-authoring makes concrete changes to filters, cache rules, rewrites, vhosts, headers, and farms; technical-advisory provides citation-backed guidance; incident-response addresses runtime failures and cache anomalies; performance-tuning improves cache efficiency and throughput; and security-hardening reviews exposure and production hardening. For broad or first-time requests, the orchestrator is the recommended starting point. When local evidence is needed, the skill relies on the Dispatcher MCP server's validation and runtime tools.
“ Debugging Runtime Issues with the AEM Quickstart MCP Server
The AEM Quickstart MCP server is a content package installed into a local AEM SDK instance through Package Manager. It exposes live runtime data to connected AI tools, so agents can retrieve logs, diagnose OSGi bundle failures, and inspect request processing without leaving the IDE. Three tools are provided: aem-logs retrieves filterable AEM and OSGi log entries; diagnose-osgi-bundle explains why a bundle or DS component fails to start, reporting missing packages, unsatisfied references, and configuration problems; and recent-requests returns HTTP requests with Sling's full processing trace, filterable by path. The server is validated with AEM SDK 2026.2.24678.20260226T154829Z-260200 and newer. It is configured in Cursor, Claude Code, GitHub Copilot CLI, IntelliJ IDEA with GitHub Copilot, or any MCP client pointing to http://localhost:4502/bin/mcp with a Basic authorization header. The sample credential corresponds to the default local admin:admin account and must not be used in non-local environments.
“ Validating Dispatcher Configuration with the Dispatcher MCP Server
The Dispatcher MCP server ships with the AEM Dispatcher SDK and enables AI tools to validate Dispatcher and Apache HTTPD configuration, trace request handling, and inspect cache behavior against a Dispatcher running locally in Docker. Prerequisites are Docker Desktop 4.x or later and the Dispatcher SDK from the Software Distribution Portal. After extracting the SDK, the docker_run_mcp.sh script provides help, version, test, and diagnose commands to verify setup and troubleshoot connectivity. The server is configured in an IDE such as Cursor by adding an aem-dispatcher-mcp entry that references the script, sets the Dispatcher source path via DISPATCHER_CONFIG_PATH, and optionally enables trace logging. Seven tools are exposed: validate, lint, sdk, trace_request, inspect_cache, monitor_metrics, and tail_logs. Prompts and resources remain in the dispatcher skill layer, so the MCP server offers tools only.
We use cookies that are essential for our site to work. To improve our site, we would like to use additional cookies to help us understand how visitors use it, measure traffic to our site from social media platforms and to personalise your experience. Some of the cookies that we use are provided by third parties. To accept all cookies click ‘Accept’. To reject all optional cookies click ‘Reject’.
Comment(0)