Skip to main content
Glama
sap-cpi-mcp
by linusdevx

@linusdevx/cpi-mcp-server

MCP server for SAP Cloud Platform Integration (CPI). Query packages, iFlows, message processing logs, partner directory entries, security material, and manage artifact lifecycle via the CPI OData API.

47 tools across 9 modules — all backed by the CPI OData v2 API.

Install

Requires Node.js ≥20.

Claude Code (CLI)

claude mcp add sap-cpi \
  -e MCP_CPI_BASE_URL="https://your-tenant.it-cpi017.cfapps.eu10-002.hana.ondemand.com/api/v1" \
  -e MCP_CPI_TOKEN_URL="https://your-tenant.authentication.eu10.hana.ondemand.com/oauth/token" \
  -e MCP_CPI_CLIENT_ID="..." \
  -e MCP_CPI_CLIENT_SECRET="..." \
  -- npx -y @linusdevx/cpi-mcp-server

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "sap-cpi": {
      "command": "npx",
      "args": ["-y", "@linusdevx/cpi-mcp-server"],
      "env": {
        "MCP_CPI_BASE_URL": "https://your-tenant.it-cpi017.cfapps.eu10-002.hana.ondemand.com/api/v1",
        "MCP_CPI_TOKEN_URL": "https://your-tenant.authentication.eu10.hana.ondemand.com/oauth/token",
        "MCP_CPI_CLIENT_ID": "...",
        "MCP_CPI_CLIENT_SECRET": "..."
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project root (or ~/.cursor/mcp.json globally):

{
  "mcpServers": {
    "sap-cpi": {
      "command": "npx",
      "args": ["-y", "@linusdevx/cpi-mcp-server"],
      "env": {
        "MCP_CPI_BASE_URL": "https://your-tenant.it-cpi017.cfapps.eu10-002.hana.ondemand.com/api/v1",
        "MCP_CPI_TOKEN_URL": "https://your-tenant.authentication.eu10.hana.ondemand.com/oauth/token",
        "MCP_CPI_CLIENT_ID": "...",
        "MCP_CPI_CLIENT_SECRET": "..."
      }
    }
  }
}

Related MCP server: SAP CPI MCP Server

Environment variables

Variable

Description

MCP_CPI_BASE_URL

OData API base URL (ends in /api/v1)

MCP_CPI_TOKEN_URL

OAuth2 token endpoint

MCP_CPI_CLIENT_ID

Service key client ID

MCP_CPI_CLIENT_SECRET

Service key client secret

Get a service key from the BTP cockpit: navigate to your CPI subaccount → Instances and Subscriptions → your CPI runtime instance → Service Keys → create one with role WorkflowDeveloper (or whichever scopes you need).

Tool inventory

Design-time content (designTime, 12 tools)

Tool

Purpose

get_integration_packages

List all integration packages

search_integration_packages

Filter packages client-side by Id/Version/Name/Vendor/Mode

get_integration_flows

List iFlows in a package

search_integration_flows

Look up iFlow by Id+Version or Name

get_integration_runtime_artifacts

List deployed runtime artifacts

search_integration_runtime_artifacts

Filter runtime artifacts by Id/Version/Name/Type/Status

get_message_mappings / search_message_mappings

Message mappings

get_script_collections / search_script_collections

Script collections

get_value_mappings / search_value_mappings

Value mappings

Message processing logs (mpl, 5 tools)

Tool

Purpose

get_message_processing_logs

List MPLs (defaults: top=20, ordered by LogEnd desc)

get_message_processing_log_errors

Error details for a message

get_message_processing_log_attachments

Payloads & traces for a message

get_message_processing_log_properties

Custom header properties for a message

get_message_processing_log_runs

Per-step runs for a message

Partner directory (partnerDirectory, 5 tools)

Tool

Entity

get_partners

Partners

get_string_parameters

StringParameters

get_binary_parameters

BinaryParameters

get_alternative_partners

AlternativePartners

get_authorized_users

AuthorizedUsers

Security material (security, 5 tools)

Tool

Purpose

get_keystore_entries

Deployed certificates and key pairs

get_user_credentials

Basic-auth credentials

get_oauth2_credentials

OAuth2 client credentials

get_certificate_resources

Certificate chain for a keystore entry (requires hex_alias)

get_secure_parameters

Encrypted configuration values

Data stores & JMS (dataStores, 6 tools)

Tool

Purpose

get_data_store_entries

Persisted records (no $top server-side)

get_variables

Runtime variables

get_number_ranges

Auto-incrementing sequences

get_jms_brokers

JMS broker instances

get_jms_resources

JMS queue resources

get_metadata

OData $metadata document (truncated at 50KB)

Messaging (messaging, 4 tools)

Tool

Purpose

Annotation

get_messaging_queues

List JMS queues with message count and active/exclusive status

read-only

get_messaging_messages

List individual JMS messages with retry, sender, receiver, MPL link

read-only

retry_messaging_messages

Retry failed JMS messages (RetryMessagingMessages function import)

destructive

move_messaging_messages

Move JMS messages between queues (MoveMessagingMessages function import)

destructive

Logs (logs, 1 tool)

Tool

Purpose

get_log_files

Runtime log files

Artifact lifecycle (artifacts, 7 tools)

Tool

Purpose

Annotation

download_integration_artifact

Download iFlow zip to a local path

read-only

upload_integration_artifact

Create or update an iFlow from a local zip

destructive

deploy_integration_artifact

Deploy a design-time artifact (returns TaskId)

destructive

get_deploy_status

Poll build/deploy status by TaskId

read-only

undeploy_integration_artifact

Remove a runtime artifact

destructive

get_artifact_configurations

List externalized parameters

read-only

update_artifact_configuration

Update an externalized parameter value

destructive

Trace inspection (trace, 2 tools)

Tool

Purpose

get_run_steps

Processing steps + per-step trace messages for a RunId

get_trace_content

Payload, headers, and exchange properties for a TraceId

Local development

git clone https://github.com/linusdevx/sap-cpi-mcp-server.git
cd sap-cpi-mcp-server
npm install
cp .env.example .env  # then fill in values
npm test
npm run dev           # runs src/index.ts via tsx, reads stdio

Available scripts:

  • npm run build — compile to dist/

  • npm run dev — run TS source via tsx

  • npm run typecheck — tsc --noEmit

  • npm run format / npm run format:check — Prettier

  • npm test — run vitest once

  • npm run test:watch — vitest in watch mode

Manual smoke test

After npm run build, point a real tenant at the binary using the MCP Inspector or a direct stdio client:

MCP_CPI_BASE_URL=... MCP_CPI_TOKEN_URL=... \
MCP_CPI_CLIENT_ID=... MCP_CPI_CLIENT_SECRET=... \
node dist/index.js

Then send a tools/list request to verify all 47 tools register, followed by a low-impact read like get_integration_packages.

Release flow

CI runs typecheck, format check, and tests on Node 20 and 22 against every PR. The publish workflow runs on v* tags and requires an NPM_TOKEN secret with publish rights to @linusdevx/cpi-mcp-server. GitHub release notes are generated automatically from commit history on each tag.

Destructive tool safety

All write/destructive tools (upload_integration_artifact, deploy_integration_artifact, undeploy_integration_artifact, update_artifact_configuration, retry_messaging_messages, move_messaging_messages) require explicit confirmation before executing:

  • MCP elicitation — when the client supports it (e.g. Claude Desktop), an in-UI confirmation dialog is shown before the operation proceeds.

  • Fallback — when the client does not support elicitation, the tool returns a message asking the user to confirm, and the operation only proceeds on a second explicit call.

Contributing

PRs welcome. Please run npm run format && npm test before opening a PR.

License

MIT — see LICENSE.

Available Tools

47 tools
deploy_integration_artifactDeploy integration artifactA
Destructive

DESTRUCTIVE: Deploy an integration design-time artifact to the live CPI runtime. This activates the artifact and immediately affects message processing on the tenant. Returns a TaskId that can be polled with get_deploy_status.

Inputs: id (required), version.

download_integration_artifactDownload integration artifactA
Read-only

Download an integration design-time artifact (iFlow) as a zip file. Returns the zip at the specified output path.

Inputs: id (required), output_path (required), version.

get_alternative_partnersGet alternative partnersC
Read-only

List alternative partner mappings (sender system + interface → partnerID)

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

get_artifact_configurationsGet artifact configurationsB
Read-only

List externalized parameters (configurations) for an integration design-time artifact.

Inputs: id (required), version.

get_authorized_usersGet authorized usersB
Read-only

List authorized users per partner (message sender authorization)

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

get_binary_parametersGet binary parametersC
Read-only

List Partner Directory binary parameters (XSLTs, certificates, etc.)

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

get_certificate_resourcesGet certificate resourcesA
Read-only

Get certificate chain details for a keystore entry. Requires hex_alias from a Key Pair entry (Type: "Key Pair") in get_keystore_entries — Certificate-type entries are rejected by CPI. Cannot list all certificates directly.

Inputs: skip, filter, select, orderby, +1 more.

get_data_store_entriesGet data store entriesA
Read-only

List data store entries (persisted key-value records across messages). Note: $top not supported server-side.

Inputs: skip, filter, select, orderby.

get_deploy_statusGet deploy statusA
Read-only

Check the build and deploy status of an artifact. Use the TaskId returned by deploy_integration_artifact.

Inputs: task_id (required).

get_integration_flowsGet integration flowsA
Read-only

Get integration flows from a package. Requires packageId since listing all iFlows directly is not supported. If no packageId given, tries direct listing (may return 501).

Inputs: top, skip, filter, select, +2 more.

get_integration_packagesGet integration packagesB
Read-only

Get all integration packages. Note: $filter and $select are NOT supported on this entity set.

Inputs: top, skip, orderby.

get_integration_runtime_artifactsGet integration runtime artifactsB
Read-only

Get all integration runtime artifacts. Supports $filter with eq operator (e.g. Status eq 'STARTED', Id eq 'myflow').

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

get_jms_brokersGet JMS brokersB
Read-only

List JMS broker instances and their status (may return 501 depending on tenant)

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

get_jms_resourcesGet JMS resourcesC
Read-only

List JMS queue resources (queue depth, consumer count, capacity status)

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

get_keystore_entriesGet keystore entriesB
Read-only

List keystore entries (certificates and key pairs deployed on the tenant). Note: $top not supported server-side.

Inputs: skip, filter, select, orderby.

get_log_filesGet log filesA
Read-only

List runtime log files for troubleshooting iFlow execution. Note: $top not supported server-side; may return 501 depending on tenant.

Inputs: skip, filter, select, orderby.

get_message_mappingsGet message mappingsB
Read-only

Get all message mappings. Supports listing and $top.

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

get_message_processing_log_attachmentsGet message processing log attachmentsB
Read-only

Get attachments (payloads, traces) for a specific message processing log entry

Inputs: message_guid (required), top, skip, filter, +2 more.

get_message_processing_log_errorsGet message processing log errorsC
Read-only

Get error details for a specific message processing log entry

Inputs: message_guid (required).

get_message_processing_log_propertiesGet message processing log propertiesA
Read-only

Get custom header properties (SAP_ApplicationID, business IDs) for a message log entry

Inputs: message_guid (required).

get_message_processing_log_runsGet message processing log runsA
Read-only

Get individual processing step runs for a message log entry

Inputs: message_guid (required).

get_message_processing_logsGet message processing logsB
Read-only

List message processing logs. Filter by Status, IntegrationFlowName, LogStart/LogEnd, etc. Defaults: top=20, ordered by LogEnd desc.

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

get_messaging_messagesGet messaging messagesA
Read-only

List individual JMS messages. Filter by queueName to scope to one queue. Each message includes jmsMessageId, mplId, retryCount, sender, receiver, messageType, applicationId, correlationId, customStatus, and timestamps.

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

get_messaging_queuesGet messaging queuesB
Read-only

List JMS messaging queues with per-queue message count and active/exclusive status.

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

get_metadataGet OData metadataA
Read-only

Fetch the OData $metadata service document (XML schema of all entity sets, properties, and associations). Note: the full metadata is ~184KB; the response is truncated at 50KB. For complete metadata use the local reference/cpi_odata_metadata.xml file.

Inputs: no named parameters.

get_number_rangesGet number rangesC
Read-only

List number ranges (auto-incrementing sequences for message numbering). Note: $top not supported server-side.

Inputs: skip, filter, select, orderby.

get_oauth2_credentialsGet OAuth2 credentialsC
Read-only

List OAuth2 client credential configurations deployed on the tenant. Note: $top not supported server-side.

Inputs: skip, filter, select, orderby.

get_partnersGet partnersB
Read-only

List all Partner Directory partners (trading partner routing entries)

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

get_run_stepsGet run stepsA
Read-only

Get all processing steps for a message run. Returns step IDs, activities, status, timing, and model step IDs that map to iFlow elements. Requires RunId from get_message_processing_log_runs.

Inputs: run_id (required).

get_script_collectionsGet script collectionsA
Read-only

Get script collections from a package. Requires packageId since listing all directly is not supported.

Inputs: top, skip, filter, select, +2 more.

get_secure_parametersGet secure parametersB
Read-only

List secure parameters (encrypted configuration values). Note: $top not supported server-side.

Inputs: skip, filter, select, orderby.

get_string_parametersGet string parametersB
Read-only

List Partner Directory string parameters (MaxJMSRetries, DLQ_EndEvent, etc.)

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

get_trace_contentGet trace contentA
Read-only

Fetch trace content for a specific trace message. include: 'payload' for message body, 'headers' for HTTP headers, 'properties' for exchange properties, or 'all' for everything. TraceId comes from get_run_steps or get_message_trace.

Inputs: trace_id (required), include.

get_user_credentialsGet user credentialsB
Read-only

List deployed user credentials (basic auth username/password pairs). Note: $top not supported server-side.

Inputs: skip, filter, select, orderby.

get_value_mappingsGet value mappingsC
Read-only

Get all value mappings. Supports listing and $top.

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

get_variablesGet variablesB
Read-only

List runtime variables (state maintained between iFlow executions). Note: $top not supported server-side.

Inputs: skip, filter, select, orderby.

move_messaging_messagesMove messaging messagesA
Destructive

DESTRUCTIVE: Moves ALL JMS messages between queues on the tenant via the MoveMessagingMessages function import (POST). This affects the live CPI system and cannot be undone. User confirmation is required before proceeding.

Inputs: no named parameters.

retry_messaging_messagesRetry messaging messagesA
Destructive

DESTRUCTIVE: Retries ALL failed JMS messages on the tenant via the RetryMessagingMessages function import (POST). This affects the live CPI system and cannot be undone. User confirmation is required before proceeding.

Inputs: no named parameters.

search_integration_flowsSearch integration flowsA
Read-only

Search integration flows by ID, version or name. Uses exact match via direct entity lookup or $filter on runtime artifacts.

Inputs: id, name, version.

search_integration_packagesSearch integration packagesB
Read-only

Search integration packages by ID, version, name, vendor or mode. Fetches all packages and filters client-side (server does not support $filter).

Inputs: id, mode, name, vendor, +1 more.

search_integration_runtime_artifactsSearch integration runtime artifactsB
Read-only

Search integration runtime artifacts by ID, version, name, type or status. Uses eq filter.

Inputs: id, name, type, status, +1 more.

search_message_mappingsSearch message mappingsB
Read-only

Search message mappings by ID and version (direct entity lookup).

Inputs: id, name, version.

search_script_collectionsSearch script collectionsB
Read-only

Search script collections by ID and version (direct entity lookup).

Inputs: id, name, version.

search_value_mappingsSearch value mappingsB
Read-only

Search value mappings by ID and version (direct entity lookup).

Inputs: id, name, version.

undeploy_integration_artifactUndeploy integration artifactA
Destructive

DESTRUCTIVE: Undeploy (remove from runtime) an integration artifact on the live CPI tenant by its runtime ID. This immediately stops message processing for the artifact and cannot be undone.

Inputs: id (required).

update_artifact_configurationUpdate artifact configurationA
Destructive

DESTRUCTIVE: Update an externalized parameter value on a design-time artifact on the live CPI tenant. This modifies the artifact configuration and may affect message processing. The artifact must be in edit mode (not read-only).

Inputs: id (required), parameter_key (required), parameter_value (required), version.

upload_integration_artifactUpload integration artifactA
Destructive

DESTRUCTIVE: Create or update an integration design-time artifact on the live CPI tenant from a local zip file. Use mode 'create' to add a new artifact to a package, or 'update' to replace an existing one. This modifies the design-time artifact and cannot be undone.

Inputs: id (required), mode (required), name (required), file_path (required), +2 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 47 tools

    Disambiguation4/5

    Most tools are clearly separated by resource type (queues, messages, artifacts, packages, logs, keystore, etc.), but there is some overlap between get_* and search_* variants for the same entity (e.g., get_integration_packages vs search_integration_packages, get_integration_flows vs search_integration_flows) that could cause an agent to pick the wrong one. The destructive tools are well-marked, and the get/search distinction is the main source of ambiguity.

    Naming Consistency4/5

    The naming is overwhelmingly consistent with a get_/search_/upload_/deploy_/undeploy_/update_/retry_/move_/download_ verb + noun pattern. Minor deviations exist: get_message_processing_log_runs is a plural noun phrase that could be confused with get_message_processing_logs, and get_run_steps doesn't follow the get_<resource> pattern as clearly as others. Overall, the convention is predictable.

    Tool Count3/5

    47 tools is on the heavy side, but the server covers a broad SAP CPI domain (messaging, artifacts, packages, logs, partner directory, keystore, credentials, data stores, variables, mappings, scripts, value mappings). The count is justified by the breadth, though it pushes the upper bound of what is comfortable for an agent to navigate.

    Completeness4/5

    The tool surface covers the main CPI operations: listing/searching design-time and runtime artifacts, deploying/undeploying, downloading, checking deploy status, retrieving message processing logs and run steps, managing JMS messages, and inspecting configuration/security resources. Obvious gaps include no create/update/delete for packages, no direct artifact deletion, and no ability to send/test messages, but the core monitoring and deployment workflows are well covered.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers