Step 5 of 8 Intermediate 15 min

Deploying Your MCP Server on BTP Cloud Foundry

Lesson 5 — Your tools work perfectly on your laptop. Now they need to run somewhere an agent can actually reach them, twenty-four hours a day. Here's the deployment path, and the one BTP setting people forget until the destination silently fails.

S
s4ready.ai Team

Prerequisites

  • Lesson 4: Writing safely

Code that only runs on your laptop isn’t a tool an agent can use — it’s a demo you have to be personally present for.

What Lesson 1 unlocks, and what fails if you skipped it

Which Lesson 1 checklist item unlocks which deploy stepYour BTP Cloud Foundry subaccount unlocks cf push; skip it and the login step itself fails. Your Communication Arrangement unlocks the destination’s credentials; skip it and you get an authentication error on the destination that looks like a typo, not a missing prerequisite. Node.js and the Cloud Foundry CLI unlock the build and push commands themselves.LESSON 1 ITEMUNLOCKSFAILS LIKE THIS IF SKIPPEDBTP Cloud Foundry subaccount”cf login” itself failsCommunication Arrangement activeDestination auth error thatlooks like a typo, not a gapNode.js + Cloud Foundry CLI”cf push” never runs at all
Every failure on the right looks like something else at first glance — that’s exactly why Lesson 1 mattered.
applications:
- name: bp-mcp-server
  memory: 256M
  buildpacks:
  - nodejs_buildpack
  command: node dist/index.js
  services:
  - destination-service-instance
  - xsuaa-service-instance
npx tsc
cf login -a https://api.cf.{region}.hana.ondemand.com
cf push
# route: bp-mcp-server.cfapps.{region}.hana.ondemand.com

If you’ve deployed any Node service to Cloud Foundry before, this will feel entirely familiar — which is itself worth noticing. The “AI” part of an AI agent project is usually a small fraction of the actual engineering work.

The destination: where Lesson 1’s setup finally pays off

FieldValue
NameS4H_BP_DEST
TypeHTTP
URLhttps://{your-s4hana-host}/sap/opu/odata/sap/API_BUSINESS_PARTNER
AuthBasic or OAuth2, from your SAP_COM_0008 communication user

Skip the Communication Arrangement from Lesson 1, and this is exactly where it surfaces — not as “arrangement not found,” but as an auth error on the destination that looks, at first glance, like a typo in the password.

Verify before Joule Studio ever enters the picture

Hit the deployed route directly — a health check, a manual test call — before wiring anything into an agent. It eliminates an entire category of debugging: when something breaks in the next lesson, you’ll already know it isn’t a deployment problem.

Try it yourself

Write your own deployment checklist for the Lessons 3–4 tool: the manifest, the destination, and one specific test call you’d run the moment cf push finishes. Can’t write that test call from memory? Go check the exact field names now, not during a live demo.

Where this shows up in SAP

Both Business Partner and Sales Order tutorials walk this exact sequence with real manifests and destination configs to copy.

Key takeaways

  • Your MCP server deploys like any ordinary Node service — no special AI infrastructure required.
  • The destination is where your Lesson 1 setup gets used — get it wrong, and the failure masquerades as a password problem.
  • Verify the server on its own, with a direct test call, before touching any agent — it removes a whole category of debugging later.

Next: your server is live. Time to register it in Joule Studio, and watch your tools get discovered automatically.