Get a service key for SAP Cloud ALM in SAP BTP
The key your assistant uses to read your Cloud ALM tenant, and who creates it.
The SAP Cloud ALM MCP server by Didro reads Cloud ALM through SAP’s APIs, which take an OAuth token from a service key of the SAP Cloud ALM API service. Someone with admin rights creates it in the SAP BTP subaccount where your Cloud ALM tenant lives. Nothing is deployed: the instance only registers an OAuth client.
Create the key
- In the BTP cockpit, open the Cloud ALM subaccount, then Services → Instances and Subscriptions → Create.
- Choose the service SAP Cloud ALM API, plan standard, runtime environment Other. Name it, for example
calm-read. - As parameters, paste one of the scope files. The default template has no scopes, which gives a token that can read nothing.
- scopes/read-only.json: the assistant reads.
- scopes/read-write.json: it may also propose changes to tasks, test cases, features and documents, each one waiting for your approval.
xsappnameif the name is taken in your subaccount. - Create a service binding on the instance and download its JSON. That file is the service key.
Then use it: run npx -y cloud-alm-mcp-server setup for a local install, choose it in the Claude Desktop extension, or select it when you sign in to the hosted connector in Claude or ChatGPT. Once setup has saved the key you can delete the download. Never put the key in a repository.
The scopes
The read-only file:
{
"xs-security": {
"xsappname": "calm-read",
"authorities": [
"$XSMASTERAPPNAME.calm-api.projects.read",
"$XSMASTERAPPNAME.calm-api.tasks.read",
"$XSMASTERAPPNAME.calm-api.tasks.personal.read",
"$XSMASTERAPPNAME.calm-api.features.read",
"$XSMASTERAPPNAME.calm-api.documents.read",
"$XSMASTERAPPNAME.calm-api.testcases.read",
"$XSMASTERAPPNAME.calm-api.testplans.read",
"$XSMASTERAPPNAME.calm-api.processmanagement.read",
"$XSMASTERAPPNAME.calm-api.processhierarchy.read",
"$XSMASTERAPPNAME.calm-api.landscape.read",
"$XSMASTERAPPNAME.calm-api.lib.read",
"$XSMASTERAPPNAME.calm-api.analytics.read",
"$XSMASTERAPPNAME.calm-api.analytics.providers.read",
"$XSMASTERAPPNAME.calm-api.bsm.read",
"$XSMASTERAPPNAME.calm-api.tests.read",
"$XSMASTERAPPNAME.calm-api.defects.read",
"$XSMASTERAPPNAME.calm-api.requirements.read"
]
}
}
Add only what you will read. Analytics datasets also need their area’s scope, and personal fields such as assignee names need calm-api.tasks.personal.read. The read-write file adds tasks.write, testcases.write, features.write and documents.write. Deleting test cases and documents needs testcases.delete, testcases.force-delete and documents.delete as well.
The key holds uaa.url, uaa.clientid, uaa.clientsecret and endpoints.Api. The token carries no user: calls run as a machine with access to the whole tenant, and SAP cannot limit a key to one project. Give read-only keys to whoever only reads.
Changed the scopes? The token reflects them at once: run npx -y cloud-alm-mcp-server doctor again.
Asking your BTP administrator
If you cannot create service instances yourself, send this to whoever administers the SAP BTP subaccount of your Cloud ALM tenant:
Hello,
I’d like to use SAP Cloud ALM from my AI assistant (an open-source MCP server: github.com/DidroAI/cloud-alm-mcp-server). Could you create an instance of the SAP Cloud ALM API service (plan standard, runtime Other) in our Cloud ALM subaccount, with the parameters in scopes/read-only.json (or read-write.json if I should be able to propose changes), create a service binding on it, and send me its JSON through a secure channel?
The key only reads Cloud ALM with these scopes; it stays on my laptop (readable only by me) and is sent only to SAP: to its token host, and from there a token to
*.alm.cloud.sap. It can be revoked at any time by deleting the binding.
This text describes a local install. With the hosted connector, the browser uploads the key to Didro’s server for the sign-in. Details
Rotating or revoking a key
- Rotate: create a new binding, download it, run
setupagain and choose the new file, then delete the old binding. - Revoke: delete the binding in the BTP cockpit. Every token from it stops working when it expires;
doctorshows how long a token is valid.
