SAP Analytics Cloud MCP Server
Create a powerful Model Context Protocol (MCP) server for SAP Analytics Cloud (SAC) in minutes with our AI Gateway. This guide walks you through setting up seamless business intelligence integration with comprehensive analytics, planning, and predictive capabilities with instant OAuth authentication.
About SAP Analytics Cloud API
SAP Analytics Cloud is an all-in-one cloud analytics platform that combines business intelligence, planning, and predictive analytics in a single solution. The API provides access to data visualization, story/dashboard management, planning scenarios, and advanced analytics capabilities.
Key Capabilities
- Business Intelligence: Data visualization and reporting
- Planning: Integrated business planning and forecasting
- Predictive Analytics: Machine learning and predictive models
- Data Discovery: Self-service data exploration
- Story Creation: Interactive dashboards and narratives
- Data Modeling: Semantic layer and data models
- Collaboration: Shared analytics and commenting
- Mobile Analytics: Access on any device
API Features
- REST API: Modern RESTful interface
- OAuth 2.0: Secure authentication
- Real-time Data: Live connections to data sources
- Bulk Operations: Mass data processing
- Custom Extensions: SDK for custom widgets
- Integration: Connect to SAP and non-SAP sources
- Embedding: Embed analytics in applications
- Multi-tenant: Enterprise-grade architecture
What You Can Do with SAP Analytics Cloud MCP Server
The MCP server transforms SAP Analytics Cloud API into a natural language interface, enabling AI agents to:
Business Intelligence & Visualization
-
Story & Dashboard Creation
- "Create executive sales dashboard"
- "Build revenue analysis story with visualizations"
- "Design KPI dashboard for operations team"
- "Generate financial performance report"
-
Chart & Visualization
- "Add bar chart showing sales by region"
- "Create trend line for quarterly revenue"
- "Build heat map for product performance"
- "Design waterfall chart for cost breakdown"
-
Data Exploration
- "Explore sales data by multiple dimensions"
- "Drill down into regional performance details"
- "Filter data by date range and product category"
- "Create ad-hoc analysis of customer trends"
Data Modeling
-
Model Creation
- "Create new data model from S/4HANA"
- "Build model connecting multiple data sources"
- "Define calculated measures and dimensions"
- "Set up live connection to BW system"
-
Model Management
- "Update model with new data source"
- "Refresh model data from source systems"
- "Optimize model performance"
- "Version and publish model changes"
-
Data Preparation
- "Transform and clean imported data"
- "Create blended dataset from multiple sources"
- "Define data hierarchies and relationships"
- "Apply data security and access controls"
Planning & Forecasting
-
Plan Creation
- "Create annual budget planning model"
- "Set up rolling forecast scenario"
- "Build sales quota planning template"
- "Design workforce planning model"
-
Planning Scenarios
- "Create what-if scenario for revenue"
- "Compare budget vs forecast vs actual"
- "Simulate impact of cost reduction"
- "Model different growth scenarios"
-
Data Entry & Collaboration
- "Enable decentralized planning data entry"
- "Collect department budget inputs"
- "Track planning submission status"
- "Consolidate planning data from regions"
Predictive Analytics
-
Forecasting
- "Generate sales forecast using time series"
- "Predict demand for next quarter"
- "Forecast revenue with confidence intervals"
- "Create automated forecast refresh"
-
Classification & Regression
- "Build customer churn prediction model"
- "Classify leads by conversion probability"
- "Predict product returns likelihood"
- "Analyze factors driving performance"
-
Anomaly Detection
- "Detect unusual spending patterns"
- "Identify outliers in sales data"
- "Alert on abnormal KPI values"
- "Monitor data quality issues"
Data Connectivity
-
SAP Systems
- "Connect to SAP S/4HANA tables"
- "Link to SAP BW/4HANA queries"
- "Access SAP ERP data live"
- "Import from SAP HANA database"
-
Non-SAP Sources
- "Connect to Salesforce data"
- "Import Excel and CSV files"
- "Link to SQL database"
- "Access cloud data warehouses"
-
Data Federation
- "Blend data from multiple sources"
- "Create unified view across systems"
- "Join SAP and non-SAP datasets"
- "Synchronize data refresh schedules"
Collaboration & Sharing
-
Content Sharing
- "Share dashboard with finance team"
- "Publish story to executive portal"
- "Email report schedule to stakeholders"
- "Embed analytics in web application"
-
Discussion & Comments
- "Add comment on data point"
- "Tag team members for review"
- "Track discussion threads on insights"
- "Resolve action items from analytics"
-
Access Control
- "Set row-level security by region"
- "Restrict sensitive data visibility"
- "Manage user roles and permissions"
- "Audit content access history"
Reporting & Distribution
-
Report Generation
- "Create paginated financial report"
- "Generate pixel-perfect invoice layout"
- "Build multi-page operational report"
- "Design formatted compliance document"
-
Report Scheduling
- "Schedule monthly board report"
- "Auto-distribute weekly KPI summary"
- "Trigger report on data update"
- "Send alerts when thresholds exceeded"
-
Export & Integration
- "Export dashboard to PDF"
- "Download data to Excel"
- "Integrate with Microsoft Teams"
- "Push metrics to mobile app"
Advanced Analytics
-
Calculations & Formulas
- "Create custom calculated measure"
- "Define variance analysis formula"
- "Build time intelligence calculations"
- "Implement currency conversion"
-
Statistical Analysis
- "Calculate correlation between metrics"
- "Perform trend analysis"
- "Generate statistical summaries"
- "Analyze data distribution"
-
Smart Features
- "Generate automatic insights from data"
- "Get AI-powered recommendations"
- "Explain unexpected trends"
- "Suggest relevant visualizations"
Performance Management
-
KPI Tracking
- "Define company-wide KPIs"
- "Track KPI targets and actuals"
- "Monitor KPI performance trends"
- "Alert on KPI threshold breaches"
-
Balanced Scorecard
- "Create strategic scorecard"
- "Link KPIs to strategic objectives"
- "Track initiative progress"
- "Cascade scorecards across org"
-
Value Driver Trees
- "Build profitability driver tree"
- "Analyze revenue components"
- "Track cost breakdown hierarchy"
- "Identify performance levers"
Mobile Analytics
-
Mobile Access
- "View dashboards on mobile device"
- "Access planning on tablet"
- "Enable offline analytics"
- "Sync data when reconnected"
-
Mobile Optimization
- "Optimize story for mobile viewing"
- "Create mobile-first dashboard"
- "Design touch-friendly interface"
- "Test responsive layout"
Administration & Monitoring
-
User Management
- "Create new user account"
- "Assign user to team and roles"
- "Manage user licenses"
- "Monitor user activity"
-
System Monitoring
- "Track system performance metrics"
- "Monitor data refresh status"
- "Review query execution times"
- "Analyze storage utilization"
-
Audit & Compliance
- "Generate audit log report"
- "Track content access history"
- "Monitor data lineage"
- "Document governance compliance"
Integration & APIs
-
Custom Applications
- "Embed SAC dashboard in web app"
- "Integrate analytics in portal"
- "Build custom widget using SDK"
- "Create branded analytics experience"
-
Data Integration
- "Automate data import from API"
- "Schedule data refresh from sources"
- "Push data updates to SAC"
- "Orchestrate ETL workflows"
-
Third-Party Tools
- "Connect to Tableau for migration"
- "Integrate with Microsoft BI"
- "Link to Python analytics"
- "Export to data science tools"
Prerequisites
Before you begin, ensure you have:
-
SAP Analytics Cloud Account
- Active SAP Analytics Cloud tenant
- Appropriate user permissions for API access
- Tenant URL (e.g.,
https://your-tenant.cloud.sap
)
-
OAuth 2.0 Configuration
- OAuth Client registered in SAC
- Client ID and Client Secret
- Appropriate API scopes granted (
read
,write
,admin
,planning
,model
,story
,user
)
-
AI Gateway Account
- Active account at AI Gateway Portal
- API key for authentication
Setup Instructions
Step 1: Configure OAuth in SAP Analytics Cloud
-
Access SAC Administration
- Log in to SAP Analytics Cloud
- Navigate to System → Administration → App Integration
-
Create OAuth Client
- Click Add a New OAuth Client
- Set Purpose: API Access
- Set Client Name: AI Gateway Integration
- Note the generated Client ID and Client Secret
-
Configure OAuth Settings
- Set Authorization Grant: Authorization Code
- Add redirect URI:
https://gateway.aigateway.cequence.ai/oauth/callback
- Select required API Scopes:
read
- Read analytics contentwrite
- Create and modify contentadmin
- Administrative accessplanning
- Planning operationsmodel
- Data model accessstory
- Story/dashboard accessuser
- User management
- Save the OAuth client configuration
-
Grant User Permissions
- Ensure your user or service account has appropriate roles
- Assign roles: Content Creator, Modeler, Planner (as needed)
- Grant access to required folders and content
Step 2: Create MCP Server in AI Gateway
-
Access AI Gateway Portal
- Log in to https://portal.aigateway.cequence.ai
- Navigate to Gateways → Create New Gateway
-
Select SAP Analytics Cloud
- Choose SAP Analytics Cloud from the application list
- Click Next to proceed
-
Configure OAuth Settings
- Authorization URL:
https://analyticscloud.cloud.sap/oauth/authorize
- Token URL:
https://analyticscloud.cloud.sap/oauth/token
- Client ID: Paste from SAC OAuth client
- Client Secret: Paste from SAC OAuth client
- Scopes: Select required scopes
- Authorization URL:
-
Complete OAuth Flow
- Click Authorize to initiate OAuth flow
- Log in to SAP Analytics Cloud when prompted
- Approve the authorization request
- Verify successful connection
-
Configure Gateway Settings
- Set gateway name (e.g., "Enterprise Analytics Platform")
- Configure rate limiting if needed
- Set usage quotas based on your plan
- Click Create Gateway
Step 3: Test the Connection
-
Verify Setup
curl -X GET "https://gateway.aigateway.cequence.ai/v1/analytics/stories" \
-H "Authorization: Bearer YOUR_GATEWAY_TOKEN" -
Test Basic Operations
- Retrieve story list
- Query model data
- Check data connections
- Verify access
Using Your SAP Analytics Cloud MCP Server
Setup Instructions:
Example Prompts
Try these natural language queries:
"Create a sales dashboard with regional breakdown"
"Show me revenue forecast for next quarter"
"Generate budget vs actual variance report"
"Build predictive model for customer churn"
"What are the key insights from Q4 performance?"
"Create planning scenario for 10% cost reduction"
API Scopes & Permissions
Available Scopes
Scope | Description | Required For |
---|---|---|
read | Read analytics content | Viewing stories, dashboards |
write | Create and modify content | Creating stories, models |
admin | Administrative access | System configuration |
planning | Planning operations | Planning, forecasting |
model | Data model access | Model creation, data prep |
story | Story/dashboard access | Story management |
user | User management | User administration |
Best Practices
- Use minimum required scopes for security
- Create service accounts for integrations
- Rotate credentials regularly for compliance
- Monitor API usage to stay within limits
- Enable audit logging for all API calls
Rate Limits & Quotas
- Standard API: 300 requests per minute
- Data Operations: 100 requests per minute
- Planning: 50 requests per minute
- Model Refresh: 20 requests per minute
Security Considerations
- Store credentials securely using secrets management
- Enable IP whitelisting if available
- Use row-level security for data access
- Implement proper error handling and logging
- Regular security audits and access reviews
- Follow data residency requirements
Troubleshooting
Common Issues
-
"Access denied to story"
- Verify user has folder access
- Check story sharing settings
- Ensure OAuth scopes include
story
-
"Model refresh failed"
- Check data source connectivity
- Verify credentials for data source
- Review model configuration
-
"OAuth token expired"
- Refresh access token
- Check refresh token validity
- Re-authorize if needed
Support
- Documentation: SAP Analytics Cloud API Docs
- AI Gateway Support: Support Portal
- Community: SAP Community