AEM Assets MCP Server

$uvicorn app.main:app --reload
README.md

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

  1. 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
  2. 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
  • gcloud CLI 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

  1. Clone the repository:
cd "SC Practice 20260130 - Assets MCP"
  1. Create virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. 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.

  1. 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)

  1. Set up GCP and GitHub Secrets
  2. Push to main branch - Automatically deploys
  3. 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 repository
list_published_assetsFind all assets that have been published
search_assetsSearch for assets by keywords (e.g., "Electric Vehicle")
list_assets_by_folderGet all assets within a specific folder
bulk_update_metadataUpdate metadata for all assets in a folder
list_assets_by_creatorFind assets uploaded by a specific user
get_asset_detailsRetrieve detailed information about a specific asset

Environment Variables

AEM_BASE_URLrequiredAEM base URL
AEM_CLIENT_IDrequiredClient ID (API Key)
AEM_CLIENT_SECRETrequiredClient Secret

Configuration

claude_desktop_config.json
{
  "mcpServers": {
    "aem-assets": {
      "command": "uvicorn",
      "args": ["app.main:app", "--host", "0.0.0.0", "--port", "8000"]
    }
  }
}

Try it

→List all folders in my AEM Assets repository.
→Search for assets by keyword 'Electric Vehicle'.
→List all assets in the folder /content/dam/we-retail.
→Get detailed information for asset /content/dam/we-retail/products/hero.jpg.
→Bulk update metadata for all assets in folder /content/dam/images to add 'category: vehicles'.

Frequently Asked Questions

How do I install AEM Assets MCP Server?

Install AEM Assets MCP Server by running: uvicorn app.main:app --reload

What MCP clients work with AEM Assets MCP Server?

AEM Assets MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use AEM Assets MCP Server with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free