Skip to main content
Glama
sap_analytics_cloud_mcp

sap_analytics_cloud_mcp

by JumenEngels

SAP Analytics Cloud MCP Server

An MCP (Model Context Protocol) server that exposes the SAP Analytics Cloud REST API as 90 tools consumable by any MCP-compatible client (Custom Agent, Claude Desktop, Claude Code, Cursor, etc.).

What it does

The server authenticates against an SAC tenant using OAuth 2.0 Client Credentials and manages CSRF tokens and session cookies automatically. It then exposes the full SAC REST API surface as discrete MCP tools grouped into 11 service areas:

Module

Tools

Covers

Content

10

Stories, Resources, File Repository, Repositories, Widget Query

Data Export

22

Namespaces, Providers, Subscriptions, FactData, MasterData, AuditData, Aggregation, Difference, Currency/Unit tables, Public Dimensions

Data Import

24

Models, Import Jobs lifecycle (create/upload/validate/run/status), One-click Import, Public Dimensions, Currency Conversions, Unit Conversions

Multi Actions

2

Execute and poll status

Calendar

3

Get, update, copy calendar events

Content Transport

7

Export/import jobs, packages, permissions

User Management

10

SCIM v2 Users, Teams/Groups, Bulk operations

Monitoring

2

Audit activity export, model monitoring

Schedule & Publication

4

Schedule CRUD

Translation

4

Artifact metadata, XLIFF download (single + bulk)

Smart Query

1

Intelligent routing (Relational vs Analytical)

Plus a ping connectivity check tool (90 total), and Prompt support for guided workflows.

Related MCP server: SAP OData to MCP Server

Prerequisites

  • Node.js >= 18.0 (required for native fetch and Headers.getSetCookie)

  • npm

  • An SAP Analytics Cloud tenant with an OAuth client (see below).

SAC Tenant Setup

  1. Open your SAC tenant and go to System > Administration > App Integration > Add a New OAuth Client.

  2. Set the purpose to Interactive Usage and API Access.

  3. Note down the following four values:

    • Base URL -- https://<tenant>.<datacenter>.sapanalytics.cloud

    • Token URL -- shown on the OAuth client detail page

    • Client ID

    • Client Secret

Installation & Build

git clone https://github.com/JumenEngels/sap_analytics_cloud_mcp
cd sap_analytics_cloud_mcp
npm install
npm run build

Quick Start: Agent Client

The easiest way to test the server locally (after doing mcp setup above) is using the included Agent Client. It connects to the server and uses an LLM (SAP AI Core, Anthropic, OpenAI, etc.) to interact with your SAC tenant.

1. Setup Configuration

Navigate to the client directory and run the setup script:

cd AgentClient
npm install
npm run setup

This creates mcp_agentclient.json. Open this file and fill in your credentials:

  1. SAC Credentials: Fill in sac section with the values from "SAC Tenant Setup".

  2. LLM Credentials: Fill in aicore, anthropic, or openai sections.

  3. Default Provider: Set "defaultProvider" to your preferred LLM (e.g., "genaicore", "anthropic").

2. Run the Client

npm run build
npm start

The client will automatically load all necessary configuration (both for the LLM and the SAC Server) from your JSON file.


Configuration (For standard MCP Clients)

If you are using Claude Desktop, Cursor, or another MCP client, you need to configure the server environment variables directly.

The server reads four required environment variables at runtime:

Variable

Description

Example

SAC_BASE_URL

Tenant root URL (no trailing slash)

https://mytenant.eu10.sapanalytics.cloud

SAC_TOKEN_URL

OAuth token endpoint

https://mytenant.authentication.eu10.hana.ondemand.com/oauth/token

SAC_CLIENT_ID

OAuth Client ID

sb-abc123-def456

SAC_CLIENT_SECRET

OAuth Client Secret

AbC123...

MCP Client Configuration

Claude Desktop

To automatically generate a configuration file with the correct absolute path:

npm run setup

This creates an mcp_config.json file in the project root. fill in your SAC credentials there and copy the content to your Claude Desktop config file.

Cursor / Other Clients

Add the server with the command node build/index.js and set the 4 environment variables in the client's configuration UI.

Smart Query

The smart_query tool simplifies data access by intelligently routing your request:

  • Relational: Simple SELECT * queries are routed to the OData API for raw entity data.

  • Analytical: Queries with aggregations (SUM, COUNT, GROUP BY) are analyzed and routed to the Widget Query API.

SELECT SUM(Amount) FROM Model123 GROUP BY Region

Prompts

The server provides pre-defined prompts to guide users through common workflows:

  1. explore_content: Discover stories and files in your tenant.

  2. analyze_story: Deep dive into a specific story's metadata and dependencies.

  3. system_health_check: Quick status check of connectivity and recent failures.

Deployment

Docker

docker build -t sac-mcp-server .
docker run -e SAC_BASE_URL="..." ... sac-mcp-server

Development

Watch mode recompiles on every file change:

npm run dev

Security Notes

  • Write Operations: All tools that modify data require allowalteration=true argument.

Available Tools

90 tools
pingA

Returns pong — useful for verifying connectivity

Inputs: no named parameters.

sac_audit_exportC

Export audit activity logs with OData query params.

Inputs: $top, $skip, $filter, $select, +1 more.

sac_calendar_copy_eventC

Copy/create a calendar event.

Inputs: body (required), allowalteration.

sac_calendar_get_eventB

Get a calendar event by ID.

Inputs: eventId (required).

sac_calendar_update_eventC

Update a calendar event (partial).

Inputs: body (required), eventId (required), allowalteration.

sac_export_admin_metadataC

Get OData metadata for admin service.

Inputs: $format.

sac_export_create_subscriptionB

Create data export subscription for delta tracking.

Inputs: ProviderID (required), NamespaceID (required), EntitySetName (required), Filter, +4 more.

sac_export_delete_subscriptionB

Delete data export subscription(s).

Inputs: providerId (required), namespaceId (required), deleteChain, subscriptionId, +2 more.

sac_export_get_audit_dataB

Get audit data (change history). Requires Data Audit enabled on model.

Inputs: provider (required), namespace (required), $top, $skip, +5 more.

sac_export_get_conversion_ratesC

Get unit conversion rates. Namespace: sac_unit_conversion.

Inputs: provider (required), $top, $skip, $filter, +3 more.

sac_export_get_currency_tableC

Get currency conversion rates. Namespace: sac_currency_tables.

Inputs: provider (required), $top, $skip, $filter, +3 more.

sac_export_get_dataC

Generic: get data from any provider entity set. For Distinct queries use '{col}___Distinct'.

Inputs: provider (required), entitySet (required), namespace (required), $top, +11 more.

sac_export_get_dimension_masterC

Get master data for a single dimension ({DimensionName}Master entity set).

Inputs: provider (required), dimension (required), namespace (required), $top, +5 more.

sac_export_get_dimension_master_hierarchyC

Get master data with parent-child hierarchy for a dimension.

Inputs: provider (required), dimension (required), namespace (required), $top, +5 more.

sac_export_get_fact_dataC

Get fact data. Supports OData params, delta tracking (trackChanges/deltaid/externalid), CSV export.

Inputs: provider (required), namespace (required), $top, $skip, +10 more.

sac_export_get_fact_data_aggregationA

Get aggregated fact data grouped by dimensions and measures. PREREQUISITE: call sac_import_get_model_metadata first to discover valid dimension and measure names for $select. Use $select for dims/measures. 'provider' is the model ID — resolve name→ID via sac_filerepository_list ($filter=name eq 'MODEL_NAME' and resourceType eq 'ANALYTIC_MODEL'). Namespace for analytic models is 'sac'.

Inputs: $select (required), provider (required), namespace (required), $top, +7 more.

sac_export_get_fact_data_differenceB

Get measure value differences over subscription period. Requires trackChanges or deltaid.

Inputs: provider (required), namespace (required), $top, $skip, +5 more.

sac_export_get_master_dataB

Get master data and level-based hierarchies for all dimensions.

Inputs: provider (required), namespace (required), $top, $skip, +5 more.

sac_export_get_namespaceC

Get namespace details.

Inputs: namespaceId (required).

sac_export_get_provider_entitiesC

List available entity sets for a provider.

Inputs: provider (required), namespace (required).

sac_export_get_provider_metadataB

Get OData metadata (EDMX) for a provider.

Inputs: provider (required), namespace (required), $format.

sac_export_get_public_dimension_dataB

Get public dimension master data. Namespace: sac_public_dimensions.

Inputs: provider (required), $top, $skip, $filter, +3 more.

sac_export_get_subscriptionC

Get subscription by composite key.

Inputs: providerId (required), namespaceId (required), subscriptionId (required).

sac_export_list_namespacesA

List data export namespaces (sac, sac_currency_tables, sac_public_dimensions, sac_unit_conversion).

Inputs: no named parameters.

sac_export_list_providersB

List data providers (models) in a namespace.

Inputs: namespaceId (required).

sac_export_list_provider_subscriptionsC

List subscriptions for a provider.

Inputs: providerId (required), namespaceId (required).

sac_export_list_subscriptionsA

List all data export subscriptions.

Inputs: no named parameters.

sac_filerepository_listA

List story types, enumerate content types, and filter file repository resources via GET /api/v1/filerepository/Resources. Use to list all story types (standard story, story template, analytic application), enumerate design experiences (Classic vs Optimized), or filter stories/apps by user, date, or type. OData $filter, $top, $orderby, $select, $count all work. IMPORTANT — visibility scope: By default (applyManagePrivilege=false), only content the service account has Read access to is returned (typically a small subset of tenant content). Set applyManagePrivilege=true to get ALL tenant content (all users' private folders, public folders, workspaces) — requires the service account to have the "Manage" permission for Private Files and Public Files. Always use applyManagePrivilege=true when the user wants to search/list across the whole tenant. Response fields: resourceId, objectId, name, description, resourceType, resourceSubtype, createdTime, createdBy, modifiedTime, modifiedBy, folderType, workspaceId, workspaceName, openURL, isMobile, isFeatured. Filterable fields: resourceType (values: STORY, APPLICATION, DATAACTION, PLANNINGSEQUENCE, MULTIACCOUNT, DIMENSION, ANALYTIC_MODEL), createdBy (exact username/ID), modifiedBy, createdTime, modifiedTime, name, folderType (PUBLIC, PRIVATE, SYSTEM, INPUT_SCHEDULE). STORY TYPES — resourceSubtype and objectId encoding: resourceSubtype="" (empty) → standard story (covers both Classic and Optimized design experience) resourceSubtype="TEMPLATE" → story template resourceSubtype="APPLICATION" → Analytic Application (scripted, code-based) Design experience is NOT in resourceSubtype — it is encoded in the objectId prefix: objectId prefix "t.D:" → Classic design experience (legacy) objectId prefix "t.B:" → Optimized design experience (recommended, newer) To list story types: $select=name,resourceSubtype,objectId and $orderby=resourceSubtype asc — groups stories by subtype and lets you read the objectId prefix for design experience. Filter examples: $filter=resourceType eq 'STORY' — all stories $filter=resourceType eq 'STORY' and createdBy eq 'USERNAME' — stories by a specific user $filter=resourceType eq 'STORY' and modifiedBy eq 'USERNAME' — stories last modified by user $filter=resourceType eq 'STORY' and createdTime gt 2024-01-01T00:00:00Z — recently created WORKSPACE / TEAM FILES: To list all workspaces (team files spaces), filter by folderType eq 'INPUT_SCHEDULE' and workspaceId ne null. This returns exactly one entry per workspace with its workspaceId and workspaceName. Example: $filter=folderType eq 'INPUT_SCHEDULE' and workspaceId ne null with $select=workspaceId,workspaceName and $orderby=workspaceName asc.

Inputs: $top, $skip, $count, $filter, +3 more.

sac_import_create_currency_conversion_jobB

Create import job for a currency conversion table.

Inputs: currencyConversionId (required), Mapping, importType, JobSettings, +1 more.

sac_import_create_jobC

Create import job for a model. Returns JobID/JobURL.

Inputs: modelId (required), Mapping, importType, JobSettings, +1 more.

sac_import_create_public_dimension_jobB

Create import job for a public dimension.

Inputs: publicDimensionId (required), Mapping, allowalteration.

sac_import_create_unit_conversion_jobC

Create import job for a unit conversion table.

Inputs: unitConversionId (required), Mapping, importType, JobSettings, +2 more.

sac_import_delete_jobC

Delete an import job.

Inputs: jobId (required), allowalteration.

sac_import_get_currency_conversionC

Get currency conversion import types and settings.

Inputs: currencyConversionId (required).

sac_import_get_currency_conversion_metadataB

Get currency conversion metadata: columns, types, keys.

Inputs: currencyConversionId (required).

sac_import_get_invalid_rowsB

Get rejected rows with rejection reasons.

Inputs: jobId (required).

sac_import_get_job_statusB

Get job status: READY_FOR_DATA, READY_FOR_WRITE, PROCESSING, COMPLETED, FAILED.

Inputs: jobId (required).

sac_import_get_modelB

Get model import types, versions, settings, and metadata URL.

Inputs: modelId (required).

sac_import_get_model_metadataA

Get model dimension names, measure names and field types. Call this BEFORE sac_export_get_fact_data_aggregation to discover valid $select fields (e.g. PD_O_BusinessUnit, SignedData). Required whenever field names are unknown. Use when: aggregating fact data, exporting by dimension, querying model structure.

Inputs: modelId (required).

sac_import_get_public_dimensionB

Get public dimension import types and metadata URL.

Inputs: publicDimensionId (required).

sac_import_get_public_dimension_metadataB

Get public dimension metadata: columns, types, keys.

Inputs: publicDimensionId (required).

sac_import_get_unit_conversionC

Get unit conversion import types and settings.

Inputs: unitConversionId (required).

sac_import_get_unit_conversion_metadataA

Get unit conversion metadata: columns, types, keys.

Inputs: unitConversionId (required).

sac_import_list_currency_conversionsC

List currency conversion tables for import.

Inputs: top.

sac_import_list_jobsC

List all import jobs.

Inputs: top.

sac_import_list_modelsA

List models available for data import. Does NOT support name filtering — returns all models. To find a model ID by name, use sac_filerepository_list with $filter=name eq 'MODEL_NAME' and resourceType eq 'ANALYTIC_MODEL' — the returned resourceId is the model ID.

Inputs: top.

sac_import_list_public_dimensionsA

List public dimensions available for import.

Inputs: top.

sac_import_list_unit_conversionsC

List unit conversion tables for import.

Inputs: top.

sac_import_oneclickB

One-click: create job, upload, validate, run in one request.

Inputs: Data (required), modelId (required), Mapping, importType, +3 more.

sac_import_run_jobC

Execute validated import job.

Inputs: jobId (required), allowalteration, overrideExecuteWithFailedRows.

sac_import_upload_dataB

Upload data to an import job. Returns upserted/failed row counts.

Inputs: Data (required), jobId (required), Mapping, DeletedData, +2 more.

sac_import_validate_jobB

Validate import job before running.

Inputs: jobId (required).

sac_metadata_getA

Get OData metadata document for the SAC REST API.

Inputs: no named parameters.

sac_monitoring_getC

Get monitoring data for a model.

Inputs: modelId (required).

sac_multi_action_executeB

Execute a multi action. ID format: :. Body requires parameterValues array (empty if none).

Inputs: multiActionId (required), allowalteration, parameterValues.

sac_multi_action_get_statusC

Get execution status of a multi action.

Inputs: executionId (required), multiActionId (required).

sac_repositories_listC

List repositories. Supports OData query params.

Inputs: $top, $skip, $expand, $filter, +4 more.

sac_resources_getC

Get a single resource by ID.

Inputs: resourceId (required).

sac_resources_listA

List resources via GET /api/v1/Resources (OData v2, returns XML/Atom format — not recommended for filtering). Use sac_filerepository_list for JSON responses with working OData $filter support.

Inputs: $top, $skip, $expand, $filter, +4 more.

sac_schedule_createC

Create a publication schedule.

Inputs: body (required), allowalteration.

sac_schedule_deleteB

Delete a publication schedule.

Inputs: scheduleId (required), body, allowalteration.

sac_schedule_get_templateB

Get schedule creation template with defaults.

Inputs: no named parameters.

sac_schedule_updateC

Update a publication schedule (partial).

Inputs: body (required), scheduleId (required), allowalteration.

sac_stories_copyD

Copy a story.

Inputs: sourceStoryId (required), newName, copyToFolder, allowalteration.

sac_stories_deleteB

Delete a story.

Inputs: storyId (required), allowalteration.

sac_stories_listA

List stories via GET /api/v1/stories. WARNING: This endpoint does NOT support OData filtering. All query parameters ($filter, $top, $orderby, etc.) are silently ignored by the SAC API — it always returns every story on the tenant (3000+). The response does NOT include an 'owner' field. Response fields per story: storyId, name, createdBy, changedBy (and optionally model metadata). TO FILTER STORIES BY USER OR TYPE use sac_filerepository_list instead, which supports real OData $filter on createdBy, modifiedBy, resourceType, createdTime, etc.

Inputs: includeModels.

sac_stories_renameC

Rename a story.

Inputs: newName (required), storyId (required), allowalteration.

sac_teams_createB

Create a team/group (SCIM v2).

Inputs: body (required), allowalteration, createTeamFolder.

sac_teams_listA

List user security groups via SCIM v2 (/api/v1/scim2/Groups). Returns groups used for role assignments and access control (e.g. T_SALES, T_HR). These are identity/authorization groups, not file storage folders.

Inputs: count, filter, startIndex.

sac_teams_patchB

Partial update of a team/group (SCIM v2 PATCH).

Inputs: body (required), groupId (required), allowalteration.

sac_translation_download_xliffB

Download XLIFF translation file for an artifact.

Inputs: artifactId (required).

sac_translation_download_xliff_bulkC

Download XLIFF files for multiple artifacts.

Inputs: body (required).

sac_translation_get_artifactC

Get metadata for a translatable artifact.

Inputs: artifactId (required).

sac_translation_list_artifactsC

List translatable artifacts.

Inputs: $top, $skip, $filter.

sac_transport_create_export_jobC

Create a content transport export job.

Inputs: body (required), allowalteration.

sac_transport_create_import_jobC

Create a content transport import job.

Inputs: body (required), allowalteration.

sac_transport_delete_contentC

Delete a content item.

Inputs: itemId (required), allowalteration.

sac_transport_get_content_itemB

Get content item details within a wave.

Inputs: itemId (required), waveItemId (required).

sac_transport_get_job_statusB

Get content transport job status.

Inputs: jobId (required).

sac_transport_get_permissionsB

Get permissions for a content item.

Inputs: itemId (required).

sac_transport_move_itemC

Move a content item to a target location.

Inputs: itemId (required), targetId (required), body, allowalteration.

sac_users_bulkB

Bulk SCIM operations (create/update/delete multiple users/groups).

Inputs: body (required), allowalteration.

sac_users_createB

Create a user (SCIM v2).

Inputs: body (required), allowalteration.

sac_users_deleteC

Delete a user.

Inputs: userId (required), allowalteration.

sac_users_getA

Get a user by UUID.

Inputs: userId (required).

sac_users_listC

List users (SCIM v2).

Inputs: count, filter, startIndex.

sac_users_patchC

Partial update of a user (SCIM v2 PATCH).

Inputs: body (required), userId (required), allowalteration.

sac_users_updateB

Full replace of a user (SCIM v2 PUT).

Inputs: body (required), userId (required), allowalteration.

sac_widget_get_dataC

Get widget data from a story.

Inputs: storyId (required), widgetId (required), type.

smart_queryB

Execute a SQL-like query against SAC. Auto-selects OData vs Widget Query based on query type.

Inputs: query (required), model_id, space_id.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 90 tools

    Disambiguation4/5

    Tools are well-organized by domain with clear prefixes (sac_export_, sac_import_, sac_users_, etc.), and descriptions are detailed. However, the sheer number (90 tools) can still cause confusion, especially with multiple tools for similar purposes (e.g., sac_filerepository_list vs sac_stories_list).

    Naming Consistency5/5

    All tools follow a consistent pattern: sac_<domain>_<action> with snake_case (e.g., sac_export_get_fact_data, sac_import_create_job). No mixing of conventions.

    Tool Count2/5

    With 90 tools, the server is extremely large for an MCP server. While it covers many SAP Analytics Cloud features, the number is excessive and overwhelms the typical scope (3-15 tools). Many tools could be consolidated or omitted.

    Completeness4/5

    The tool set covers a wide range of SAC operations: data export/import, user and team management, content management, transport, translation, scheduling, monitoring, and more. Minor gaps exist (e.g., no direct story update tool), but overall it is comprehensive.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Transforms SAP S/4HANA or ECC systems into conversational AI interfaces by exposing all OData services as dynamic MCP tools. Enables natural language interactions with ERP data for querying, creating, updating, and deleting business entities through SAP BTP integration.
      54 npm
      143
      MIT
    • A
      license
      C
      quality
      D
      maintenance
      Transforms SAP S/4HANA or ECC systems into conversational AI interfaces by exposing all OData services as dynamic MCP tools. Enables natural language interactions with ERP data including querying, creating, updating, and deleting entities through SAP BTP integration.
      19
      54 npm
      6
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Transforms SAP S/4HANA or ECC systems into conversational AI interfaces by exposing OData services as dynamic MCP tools. Enables natural language interactions with ERP data for querying, creating, updating, and deleting business entities.
      54 npm
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server for SAP Analytics Cloud, enabling AI assistants to interact with SAC stories, models, data, users, and audit logs via the SAC REST API.
      34
      ISC