MCP server for AEM Assets Author API: browse, search, update metadata.
AEM Assets MCP Server
A Model Context Protocol (MCP) server for Adobe Experience Manager (AEM) Assets Author API built with Python and FastAPI. Can be deployed to Vercel (Phase 1) or Google Cloud Run (Phase 2) and used with ChatGPT.
š Features
This MCP server provides tools to interact with AEM Assets:
- List folders - Browse folders in your AEM Assets repository
- List published assets - Find all assets that have been published
- Search assets - Search for assets by keywords (e.g., "Electric Vehicle")
- List assets by folder - Get all assets within a specific folder
- Bulk update metadata - Update metadata for all assets in a folder
- List assets by creator - Find assets uploaded by a specific user
- Get asset details - Retrieve detailed information about a specific asset
š Prerequisites
General Requirements
Adobe Experience Manager Assets Author API Access
- AEM base URL
- OAuth Server-to-Server credentials:
- Client ID (API Key)
- Client Secret
- Scopes
- See GET_CREDENTIALS.md for how to obtain these
Python 3.11+
Phase 1 Requirements (Vercel)
- Vercel account
- ChatGPT Plus/Pro (to use MCP servers)
Phase 2 Requirements (Google Cloud Run)
- Google Cloud Platform account
gcloudCLI installed- Terraform installed (for infrastructure as code)
- Docker installed
- GitHub account (for CI/CD)
š ļø Tech Stack
- Python 3.11 - Core language
- FastAPI - Modern async web framework
- HTTPX - Async HTTP client
- Pydantic - Data validation
- OAuth Server-to-Server - Automatic token refresh
- Docker - Containerization
- Terraform - Infrastructure as Code
- GitHub Actions - CI/CD
š Project Structure
.
āāā app/
ā āāā __init__.py # Package initialization
ā āāā main.py # FastAPI application
ā āāā aem_client.py # AEM Assets API client
ā āāā models.py # Pydantic models
āāā terraform/
ā āāā main.tf # Main Terraform configuration
ā āāā variables.tf # Terraform variables
ā āāā terraform.tfvars.example
āāā .github/workflows/
ā āāā deploy-cloud-run.yml # Cloud Run deployment
ā āāā terraform-apply.yml # Terraform workflow
ā āāā test.yml # Testing workflow
āāā Dockerfile # Docker configuration
āāā requirements.txt # Python dependencies
āāā vercel.json # Vercel configuration
āāā env.example # Environment template
āāā README.md
š Quick Start
Local Development
- Clone the repository:
cd "SC Practice 20260130 - Assets MCP"
- Create virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Configure environment:
# Option 1: Interactive setup (recommended)
./create-env.sh
# Option 2: Manual setup
cp env.example .env
nano .env # Edit with your AEM credentials
See GET_CREDENTIALS.md for how to get your OAuth credentials.
- Run locally:
uvicorn app.main:app --reload
Visit http://localhost:8000 to see the server info.
Docker Development
# Build image
docker build -t aem-mcp-server .
# Run container
docker run -p 8080:8080 \
-e AEM_BASE_URL="https://author-p12345-e67890.adobeaemcloud.com" \
-e AEM_CLIENT_ID="your_client_id_here" \
-e AEM_CLIENT_SECRET="your_client_secret_here" \
aem-mcp-server
š¦ Phase 1: Deploy to Vercel
See DEPLOYMENT_VERCEL.md for detailed instructions.
Quick steps:
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# Add environment variables in Vercel dashboard
# Deploy to production
vercel --prod
Your API will be available at: https://your-project.vercel.app/api/mcp
šļø Phase 2: Deploy to Google Cloud Run
See DEPLOYMENT_CLOUDRUN.md for detailed instructions.
Option 1: Using GitHub Actions (Recommended)
- Set up GCP and GitHub Secrets
- Push to main branch - Automatically deploys
- Service URL will be shown in Actions log
Option 2: Using Terraform
cd terraform
# Copy and edit variables
cp terraform.tfvars.example terraform.tfvars
nano terraform.tfvars
# Initialize Terraform
terraform init
# Preview changes
terraform plan
# Deploy infrastructure
terraform apply
Option 3: Manual Docker Deployment
# Build and tag
docker build -t gcr.io/YOUR_PROJECT/aem-mcp-server .
# Push to Container Registry
docker push gcr.io/YOUR_PROJECT/aem-mcp-server
# Deploy to Cloud Run
gcloud run deploy aem-assets-mcp-server \
--image gcr.io/YOUR_PROJECT/aem-mcp-server \
--platform managed \
--region us-central1 \
--allow-unauthenticated
š§ Configuration
Environment Variables
Create a .env file
Tools (7)
list_foldersBrowse folders in your AEM Assets repositorylist_published_assetsFind all assets that have been publishedsearch_assetsSearch for assets by keywords (e.g., "Electric Vehicle")list_assets_by_folderGet all assets within a specific folderbulk_update_metadataUpdate metadata for all assets in a folderlist_assets_by_creatorFind assets uploaded by a specific userget_asset_detailsRetrieve detailed information about a specific assetEnvironment Variables
AEM_BASE_URLrequiredAEM base URLAEM_CLIENT_IDrequiredClient ID (API Key)AEM_CLIENT_SECRETrequiredClient SecretConfiguration
{
"mcpServers": {
"aem-assets": {
"command": "uvicorn",
"args": ["app.main:app", "--host", "0.0.0.0", "--port", "8000"]
}
}
}