Supports local AI model integration for AEM content management and automation without external API dependencies
Provides AI/LLM integration for conversational AEM management and automated content operations
Enables conversational AEM management through a Telegram bot interface, allowing users to manage pages, components, and assets via chat commands
This project is inspried from indrasishbanerjee/aem-mcp-server git repo
AEM MCP Server (aem-mcp-server)
AEM MCP Server is a comprehensive, production-ready Model Context Protocol (MCP) server for Adobe Experience Manager (AEM). It provides 40+ robust REST/JSON-RPC API methods for complete content, component, asset, and template management, with advanced integrations for AI, chatbots, and automation workflows. This project is designed for AEM developers, content teams, and automation engineers who want to manage AEM programmatically or via natural language interfaces.
Table of Contents
Overview
Modern, TypeScript-based AEM MCP server
REST/JSON-RPC API for AEM content, component, and asset operations
AI/LLM integration (OpenAI, Anthropic, Ollama, custom HTTP APIs)
Production-ready, modular, and extensible
Features
🚀 Core Capabilities (40+ Methods)
Page Operations (10 methods)
Page Lifecycle: Create, delete, activate/deactivate pages with proper template integration
Content Management: Get page content, properties, text extraction, and image management
Page Discovery: List pages with depth control, pagination, and filtering
Publishing: Activate/deactivate pages with tree operations
Component Operations (7 methods)
Component CRUD: Create, update, delete, and validate components
Bulk Operations: Update multiple components with validation and rollback support
Component Discovery: Scan pages to discover all components and their properties
Image Management: Update image paths with verification
Asset Operations (6 methods)
DAM Management: Upload, update, delete assets in AEM DAM
Metadata Operations: Get and update asset metadata
File Processing: Support for multiple file types with MIME type detection
Publishing: Activate or deactivate assets for the publish environment
Search & Query Operations (3 methods)
Advanced Search: QueryBuilder integration with fulltext search
JCR Queries: Execute JCR SQL2-style queries with security validation
Enhanced Page Search: Intelligent search with fallback strategies
Template Operations (2 methods)
Template Discovery: Get available templates for sites and paths
Template Analysis: Detailed template structure and metadata extraction
Site & Localization (3 methods)
Multi-site Management: Fetch sites, language masters, and available locales
Localization Support: Manage content across different languages and regions
Replication & Publishing (2 methods)
Content Replication: Replicate and publish content to selected locales
Unpublishing: Remove content from publish environments
Workflow Operations (2 methods)
Workflow Initiation: Start workflows using models and payloads
Status Tracking: Retrieve workflow instance status by ID
Legacy & Utility Operations (4 methods)
JCR Node Access: Direct node content access and child listing
System Utilities: Method listing and administrative tools
🔧 Technical Features
REST & JSON-RPC APIs: Dual API support for maximum compatibility
Interactive Dashboard: Web-based interface for API exploration and testing
Comprehensive Testing: Built-in test suite with automated issue tracking
Enhanced Error Handling: Structured error responses with retry mechanisms
Security: Authentication, path validation, and safe operation defaults
Performance: Connection pooling, caching, and optimized queries
Quick Start
Prerequisites
Node.js 18+
Access to an AEM instance (local or remote)
Installation
Build
Run (Production)
Run (Development, hot reload)
Usage Examples
JSON-RPC API Examples
1. List all pages under a path
2. Create a new page with template
3. Update a component property
4. Search for content
5. Upload an asset to DAM
6. Start a workflow
7. Check workflow status
REST API Examples
1. Get all available methods
2. Get method details
3. Execute method via REST
4. Start a workflow
5. Get workflow status
Method Categories and Examples
Page Operations
createPage
- Create pages with proper template integrationdeletePage
- Remove pages with force optionlistPages
- List pages with depth and paginationgetPageContent
- Extract complete page contentgetPageProperties
- Get page metadata and propertiesactivatePage
/deactivatePage
- Publish/unpublish pagesgetAllTextContent
/getPageTextContent
- Extract text contentgetPageImages
- Extract image references
Component Operations
validateComponent
- Validate component changes before applyingupdateComponent
- Update component properties with verificationscanPageComponents
- Discover all components on a pagecreateComponent
- Add new components to pagesdeleteComponent
- Remove componentsupdateImagePath
- Update image component referencesbulkUpdateComponents
- Update multiple components atomically
Asset Operations
uploadAsset
- Upload files to DAM with metadataupdateAsset
- Update asset metadata and contentdeleteAsset
- Remove assets from DAMgetAssetMetadata
- Retrieve asset metadataactivateAsset
- Publish assets to the publish environmentdeactivateAsset
- Unpublish assets from the publish environment
Search Operations
searchContent
- Query Builder search with flexible parametersexecuteJCRQuery
- Execute JCR queries (QueryBuilder wrapper)enhancedPageSearch
- Intelligent page search with fallbacks
Template Operations
getTemplates
- List available templates for sitesgetTemplateStructure
- Get detailed template structure
Site & Localization
fetchSites
- Get all available sitesfetchLanguageMasters
- Get language masters for sitesfetchAvailableLocales
- Get available locales
Workflow Operations
startWorkflow
- Start workflows using a model and payload pathgetWorkflowStatus
- Retrieve workflow instance status by ID
Interactive Dashboard
Access the web dashboard at http://localhost:3001/dashboard
for:
Interactive method testing
Parameter validation
Response visualization
API documentation
Batch testing capabilities
Configuration
Environment Variables
Create a .env
file in the project root with the following (edit as needed):
MCP Client Configuration
Sample for AI-based code editors or custom clients:
Advanced Configuration Options
API & Client Usage
REST/JSON-RPC: Exposes all AEM operations via HTTP endpoints
Supported Operations: Page/asset CRUD, component validation/update, search, rollout, publish, text/image extraction, and more
AI/LLM: Send natural language commands to the server (via API or Telegram)
Telegram Bot: Connect your bot using
TELEGRAM_BOT_TOKEN
and chat with your AEM instance
AI IDE Integration (Cursor, Cline, etc.)
AEM MCP Server is compatible with modern AI IDEs and code editors that support MCP protocol, such as Cursor and Cline.
How to Connect:
Install and run the AEM MCP Server as described above.
Configure your IDE to connect to the MCP server. Example for Cursor/Cline:
Open your IDE's MCP server settings.
Add a new server with:
Type: Custom MCP
Command:
node
Args:
["/absolute/path/to/dist/mcp-server.js"]
Port:
8080
(or as configured)Auth: Use
MCP_USERNAME
/MCP_PASSWORD
from your.env
Restart your IDE and connect. The IDE will now be able to:
List, search, and manage AEM content
Run MCP methods (CRUD, search, rollout, etc.)
Use AI/LLM features if enabled
Custom MCP Clients
You can build your own MCP client in any language that supports HTTP/JSON-RPC.
See the Usage Examples for API call patterns.
Authenticate using basic auth (
MCP_USERNAME
/MCP_PASSWORD
).All MCP methods are available via the
/api
endpoint.
Security
Auth required for all operations (see
MCP_USERNAME
/MCP_PASSWORD
)Environment-based configuration for safe deployment
All destructive operations require explicit parameters and validation
Project Structure
src/
— TypeScript source codedist/
— Compiled JS output
Integrations
AI/LLM: OpenAI, Anthropic, Ollama, custom HTTP APIs
Troubleshooting
Common Issues
Connection Issues
Authentication Problems
Verify AEM credentials in
.env
fileCheck MCP_USERNAME and MCP_PASSWORD for API access
Ensure AEM user has sufficient permissions
Page Creation Issues
Empty pages without jcr:content: Use proper template parameter
Pages not visible in Author: Ensure template exists and is valid
Template not found: Verify template path and permissions
Component Update Failures
Component not found: Verify component path exists
Update failed: Check component properties and validation
Permission denied: Ensure user has write access
Performance Optimization
Use pagination with
limit
parameter for large result setsSet appropriate
depth
values for page listingConfigure
AEM_QUERY_TIMEOUT
for slow queriesUse bulk operations for multiple component updates
Debugging
Common Use Cases
Content Migration
Bulk Content Updates
Asset Management Workflow
Search and Discovery
API Reference
Authentication
All API endpoints require HTTP Basic Authentication:
Response Format
All responses follow this structure:
Error Handling
Error responses include structured information:
Error Handling Best Practices
The AEM MCP Server follows REST API best practices by returning HTTP 200 status codes with structured error information in the response body. This approach provides several benefits:
Consistent Response Format: All responses, whether successful or not, follow the same JSON structure
Detailed Error Information: Error responses include specific codes, messages, and details
Client-Side Processing: Clients can easily parse and handle errors programmatically
Recoverable vs. Fatal Errors: The
recoverable
flag indicates if retrying might succeedRetry Guidance: When appropriate,
retryAfter
suggests a wait time before retrying
Example Error Handling in Client Code:
Common Error Codes:
Error Code | Description | Recoverable |
| Missing or invalid parameters | No |
| Specified path does not exist | No |
| Insufficient permissions | No |
| Template does not exist | No |
| Component does not exist | No |
| Connection to AEM failed | Yes |
| Operation timed out | Yes |
| Resource is locked by another process | Yes |
| Server is under heavy load | Yes |
| Content validation failed | No |
License
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A comprehensive Model Context Protocol server for Adobe Experience Manager that provides 35+ REST/JSON-RPC API methods for complete content, component, asset, and template management. Enables AI-powered AEM automation through natural language interfaces with support for page operations, component CRUD, asset management, and publishing workflows.