AEM Assets MCP Server
An MCP server that enables interaction with Adobe Experience Manager (AEM) Assets through the Author API. It allows users to browse folders, search for assets, retrieve detailed asset information, and perform bulk metadata updates using natural language.
README
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 with:
# AEM Instance
AEM_BASE_URL=https://author-p12345-e67890.adobeaemcloud.com
# OAuth Server-to-Server Credentials
AEM_CLIENT_ID=your_client_id_here
AEM_CLIENT_SECRET=your_client_secret_here
Get AEM Credentials
Quick Setup:
./create-env.sh # Interactive credential setup
Manual Setup:
See GET_CREDENTIALS.md for detailed instructions.
Summary:
- Go to Adobe Developer Console
- Create/select project
- Add "AEM Assets Author API"
- Configure "OAuth Server-to-Server" authentication
- Copy Client ID and Client Secret
- Copy Scopes from the credential page
Key Benefits:
- ✅ Automatic token refresh (every ~1 hour)
- ✅ No manual token management
- ✅ Production-ready authentication
- ✅ Based on Adobe's OAuth S2S guide
🤖 Connect to ChatGPT
See CHATGPT_SETUP.md for complete integration guide.
Quick summary:
- Create Custom GPT in ChatGPT
- Add Action with OpenAPI schema
- Point to your deployed URL
- Test with natural language prompts
💬 Usage Examples
Once connected to ChatGPT:
✅ "List all the folders in the root directory"
✅ "Show me all published assets"
✅ "Find assets related to Electric Vehicle"
✅ "Update all assets in /content/dam/products with jancode: ABCDEFG"
✅ "List all assets uploaded by user@example.com"
🔌 API Reference
Endpoints
GET /- Server informationGET /api/mcp- Server informationPOST /api/mcp- Execute MCP toolGET /health- Health check
Available Tools
1. list_folders
{
"tool": "list_folders",
"arguments": {
"path": "/content/dam"
}
}
2. list_published_assets
{
"tool": "list_published_assets",
"arguments": {
"limit": 50
}
}
3. search_assets
{
"tool": "search_assets",
"arguments": {
"query": "Electric Vehicle",
"limit": 100
}
}
4. list_assets_by_folder
{
"tool": "list_assets_by_folder",
"arguments": {
"folderPath": "/content/dam/products"
}
}
5. bulk_update_metadata
{
"tool": "bulk_update_metadata",
"arguments": {
"folderPath": "/content/dam/products",
"metadata": {
"jancode": "ABCDEFG",
"category": "Electronics"
}
}
}
6. list_assets_by_creator
{
"tool": "list_assets_by_creator",
"arguments": {
"createdBy": "user@example.com",
"limit": 50
}
}
7. list_all_assets
{
"tool": "list_all_assets",
"arguments": {
"path": "/content/dam",
"limit": 200
}
}
8. get_asset_details
{
"tool": "get_asset_details",
"arguments": {
"assetId": "urn:aaid:aem:12345"
}
}
🧪 Testing
Manual Testing
# Test health endpoint
curl http://localhost:8000/health
# Test tool call
curl -X POST http://localhost:8000/api/mcp \
-H "Content-Type: application/json" \
-d '{
"tool": "list_folders",
"arguments": {"path": "/"}
}'
Run Tests (when available)
pytest tests/ -v
🔐 Security
- ✅ Environment variables for credentials
- ✅ CORS configured for API access
- ✅ Secret Manager for Cloud Run
- ✅ Service Account with minimal permissions
- ✅ HTTPS enforced
Important:
- Never commit
.envorterraform.tfvars - Rotate AEM tokens regularly
- Use Workload Identity Federation for GitHub Actions
- Restrict Cloud Run access as needed
🐛 Troubleshooting
Common Issues
Import errors in FastAPI:
pip install --upgrade -r requirements.txt
Docker build fails:
# Check Docker is running
docker ps
# Build with no cache
docker build --no-cache -t aem-mcp-server .
Terraform errors:
# Re-initialize
cd terraform
rm -rf .terraform
terraform init
Cloud Run deployment fails:
- Check Secret Manager has correct values
- Verify service account permissions
- Check Artifact Registry has image
- Review Cloud Run logs
📚 Additional Documentation
- DEPLOYMENT_VERCEL.md - Phase 1 deployment guide
- DEPLOYMENT_CLOUDRUN.md - Phase 2 deployment guide
- CHATGPT_SETUP.md - ChatGPT integration guide
- AEM Assets API Docs
🤝 Contributing
- Fork the repository
- Create feature branch
- Make changes
- Test thoroughly
- Submit pull request
📄 License
MIT License - See LICENSE file for details
🔗 Resources
- FastAPI Documentation
- Google Cloud Run
- Terraform Documentation
- Adobe Developer Console
- Model Context Protocol
💡 Tips
- Start with Phase 1 (Vercel) for quick testing
- Use Terraform for reproducible infrastructure
- Monitor logs in Cloud Run console
- Set up alerts for production deployments
- Use Secret Manager for all sensitive data
Need Help? Check the documentation files or open an issue on GitHub.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。