Setting Up MCP Servers for SAP Development — UI5, CDS, and Fiori

Estimated read time 12 min read

The way we build SAP applications is changing fast. With Model Context Protocol (MCP) servers, we can now give our AI-assisted tools the context they need to work with our SAP stack — not just around it.

In simple terms, MCP servers act as tool connectors for AI agents, editors, or developer assistants. Instead of generating generic code, your assistant becomes aware of SAP-specific frameworks like UI5, CAP (CDS), and Fiori Tools — helping you scaffold, lint, and maintain projects with accuracy.

What Are MCP Servers?

Think of an MCP server as a “knowledge bridge” between your AI tool (like a code assistant) and your SAP development environment.
Each server provides domain-specific capabilities:

UI5 MCP Server – for scaffolding, linting, and guiding UI5/Fiori app development.CDS MCP Server – for CAP projects, offering CDS modeling, service generation, and best-practice checks.Fiori MCP Server – for managing Fiori elements, annotations, and page templates.

Together, these servers create a unified developer experience — where AI understands SAP architecture and frameworks natively.

Understanding the Core Components of MCP

The Model Context Protocol (MCP) is built around three main components that work together to connect AI systems with useful tools and data sources:

MCP Server – provides tools, resources, and prompts

MCP Client – acts as the bridge between the LLM and the MCP Server

MCP Host – the environment or application that brings it all together (e.g., Claude Desktop, Cursor, VS Code extensions)

Let’s explore how these parts interact to power intelligent, context-aware development.

MCP Server – The Tool and Data Provider

The MCP Server is the heart of the ecosystem.
It’s a program that exposes capabilities the AI (LLM) can use — such as tools, resources, or prompt templates.

An MCP Server can provide:

Tools – executable functions (for example, fetching data from a database or scaffolding a project)

Resources – reusable files or datasets frequently accessed by AI

Prompts – pre-defined, high-quality prompts for interacting with other AI services

Unlike a traditional API server, the MCP Server can run locally on your machine or be deployed remotely in the cloud.
When the LLM identifies a need for a specific function, it calls the corresponding tool from the MCP Server, retrieves the data, and uses it to complete the user’s request.

MCP Client – The Communication Bridge

The MCP Client connects the LLM to one or more MCP Servers.
It handles all message routing between them, ensuring smooth and structured communication.

Its main responsibilities are:

Receiving requests from the LLM

Forwarding them to the relevant MCP Server

Returning the server’s output back to the LLM

Think of it as the “messenger” that makes sure the AI can talk to the right tools without needing to know the technical details of how those tools work.

 

MCP Host – The User’s Interaction Layer

The MCP Host is any environment or application that integrates both an LLM and an MCP Client.
Popular examples include Claude Desktop, Cursor, and VS Code extensions.

These hosts provide the user interface — what you actually interact with — while the MCP Client quietly connects to one or more MCP Servers behind the scenes.
This setup lets you extend an AI model’s abilities with domain-specific tools, all within your familiar development environment.

MCP Workflow

The three roles mentioned above ultimately form an AI application built on MCP.

Quick Setup

You can install any of these servers globally or within your project.
All are available on npm under the @cap-js and @ui5 scopes.

# Install MCP servers
npm install -g @ui5/mcp-server @cap-js/mcp-server @SAP/fiori-mcp-server

To register them with your IDE or AI tool (like VS Code with MCP support):

{
“mcpServers”: {
“@ui5/mcp-server”: {
“type”: “stdio”,
“command”: “npx”,
“args”: [“@ui5/mcp-server”]
},
“@cap-js/mcp-server”: {
“type”: “stdio”,
“command”: “npx”,
“args”: [“@cap-js/mcp-server”]
},
“@sap/fiori-mcp-server”: {
“type”: “stdio”,
“command”: “npx”,
“args”: [“@sap/fiori-mcp-server”]
}
}
}

This setting will be required in the file -> MCP(Project Folder) -> .vscode -> mcp.json

That’s it — your environment is now MCP-enabled.

 

Sample Command References

For a given sample Project I ran the following commands. Attaching the output screenshots.

cds-mcp analyse the data models in form of entities

The cds-mcp server internally ran:

#Input
{
“kind”: “entity”,
“projectPath”: “../CloudStorage/OneDrive-SAPSE/Documents/MCP”
}

 

#Output
[{
“kind”: “entity”,
“@cds.persistence.table”: true,
“@cds.autoexpose”: true,
“@UI.Identification”: [
{ “Value”: { “=”: “name” } }
],
“@cds.odata.valuelist”: true,
“includes”: [
“sap.common.CodeList”,
“recruitment.management.MasterData”
],
“elements”: {
“name”: {
“@title”: “{i18n>Name}”,
“localized”: true,
“type”: “cds.String”,
“length”: 255,
“@Common.Label”: “{i18n>Name}”
},
“descr”: {
“@title”: “{i18n>Description}”,
“localized”: true,
“type”: “cds.String”,
“length”: 1000,
“@Common.Label”: “{i18n>Description}”
},
“ID”: {
“key”: true,
“type”: “cds.String”,
“length”: 20,
“$location”: {
“file”: “db/masterdata.cds”,
“line”: 23,
“col”: 9
}
},
“texts”: {
“type”: “cds.Composition”,
“cardinality”: { “max”: “*” },
“target”: “recruitment.management.YesNo.texts”,
“on”: [
{ “ref”: [“texts”, “ID”] },
“=”,
{ “ref”: [“ID”] }
]
},
“localized”: {
“type”: “cds.Association”,
“target”: “recruitment.management.YesNo.texts”,
“on”: [
{ “ref”: [“localized”, “ID”] },
“=”,
{ “ref”: [“ID”] },
“and”,
{ “ref”: [“localized”, “locale”] },
“=”,
{ “ref”: [“$user”, “locale”] }
]
}
},
“$location”: {
“file”: “db/masterdata.cds”,
“line”: 22,
“col”: 8
},
“$localized”: true,
“name”: “recruitment.management.YesNo”
}]

Please add an SAP Fiori elements list report app to my CAP project.

The ui5Mcp server internally:

#Input
{
“appNamespace”: “recruitment.management.yesno”,
“basePath”: “../CloudStorage/OneDrive-SAPSE/Documents/MCP/app”,
“typescript”: true,
“runNpmInstall”: true,
“oDataV4Url”: “/odata/v4”,
“oDataEntitySet”: “YesNo”
}

 

#Output
Successfully created a SAPUI5 TypeScript application inside
../CloudStorage/OneDrive-SAPSE/Documents/MCP/app/recruitment.management.yesno
(Namespace: recruitment.management.yesno
Framework: SAPUI5 1.141.1) and npm install was executed.
Note that the BaseController has no onInit function, so do not try to call super.onInit() in the MainController when adding code.
Note that in CAP projects you MUST NOT use npm start of this UI5 app, as doing this and opening it on port 8080 will not allow the app to load any data. Instead, you MUST use cds watch in the project root to start the server. The new app is then automatically served at /recruitment.management.yesno/index.html.
Note that the table in the Main view has no columns and the Form has no fields, as an OData service and entity was provided, but no properties were specified and none could be found automatically.
The generated files inside
../OneDrive-SAPSE/Documents/MCP/app/recruitment.management.yesno
are:
.editorconfig
.gitignore
.nycrc.json
eslint.config.mjs
LICENSE
package.json
README.md
tsconfig.json
ui5-coverage.yaml
ui5-dist.yaml
ui5.yaml
webapp/Component.ts
webapp/controller/App.controller.ts
webapp/controller/BaseController.ts
webapp/controller/Main.controller.ts
webapp/i18n/i18n_en.properties
webapp/i18n/i18n.properties
webapp/index-cdn.html
webapp/index.html
webapp/manifest.json
webapp/model/formatter.ts
webapp/model/models.ts
webapp/test/integration/HelloJourney.ts
webapp/test/integration/opaTests.qunit.ts
webapp/test/integration/pages/MainPage.ts
webapp/test/Test.qunit.html
webapp/test/testsuite.qunit.html
webapp/test/testsuite.qunit.ts
webapp/test/unit/controller/Main.qunit.ts
webapp/test/unit/unitTests.qunit.ts
webapp/view/App.view.xml
webapp/view/Main.view.xml


Useful Resources

UI5 MCP Server – Github CAP (CDS) MCP Server – GitHub 

​ The way we build SAP applications is changing fast. With Model Context Protocol (MCP) servers, we can now give our AI-assisted tools the context they need to work with our SAP stack — not just around it.In simple terms, MCP servers act as tool connectors for AI agents, editors, or developer assistants. Instead of generating generic code, your assistant becomes aware of SAP-specific frameworks like UI5, CAP (CDS), and Fiori Tools — helping you scaffold, lint, and maintain projects with accuracy.What Are MCP Servers?Think of an MCP server as a “knowledge bridge” between your AI tool (like a code assistant) and your SAP development environment.Each server provides domain-specific capabilities:UI5 MCP Server – for scaffolding, linting, and guiding UI5/Fiori app development.CDS MCP Server – for CAP projects, offering CDS modeling, service generation, and best-practice checks.Fiori MCP Server – for managing Fiori elements, annotations, and page templates.Together, these servers create a unified developer experience — where AI understands SAP architecture and frameworks natively.Understanding the Core Components of MCPThe Model Context Protocol (MCP) is built around three main components that work together to connect AI systems with useful tools and data sources:MCP Server – provides tools, resources, and promptsMCP Client – acts as the bridge between the LLM and the MCP ServerMCP Host – the environment or application that brings it all together (e.g., Claude Desktop, Cursor, VS Code extensions)Let’s explore how these parts interact to power intelligent, context-aware development.MCP Server – The Tool and Data ProviderThe MCP Server is the heart of the ecosystem.It’s a program that exposes capabilities the AI (LLM) can use — such as tools, resources, or prompt templates.An MCP Server can provide:Tools – executable functions (for example, fetching data from a database or scaffolding a project)Resources – reusable files or datasets frequently accessed by AIPrompts – pre-defined, high-quality prompts for interacting with other AI servicesUnlike a traditional API server, the MCP Server can run locally on your machine or be deployed remotely in the cloud.When the LLM identifies a need for a specific function, it calls the corresponding tool from the MCP Server, retrieves the data, and uses it to complete the user’s request.MCP Client – The Communication BridgeThe MCP Client connects the LLM to one or more MCP Servers.It handles all message routing between them, ensuring smooth and structured communication.Its main responsibilities are:Receiving requests from the LLMForwarding them to the relevant MCP ServerReturning the server’s output back to the LLMThink of it as the “messenger” that makes sure the AI can talk to the right tools without needing to know the technical details of how those tools work. MCP Host – The User’s Interaction LayerThe MCP Host is any environment or application that integrates both an LLM and an MCP Client.Popular examples include Claude Desktop, Cursor, and VS Code extensions.These hosts provide the user interface — what you actually interact with — while the MCP Client quietly connects to one or more MCP Servers behind the scenes.This setup lets you extend an AI model’s abilities with domain-specific tools, all within your familiar development environment.MCP WorkflowThe three roles mentioned above ultimately form an AI application built on MCP.Quick SetupYou can install any of these servers globally or within your project.All are available on npm under the @cap-js and @ui5 scopes.# Install MCP servers
npm install -g @ui5/mcp-server @cap-js/mcp-server @SAP/fiori-mcp-serverTo register them with your IDE or AI tool (like VS Code with MCP support):{
“mcpServers”: {
“@ui5/mcp-server”: {
“type”: “stdio”,
“command”: “npx”,
“args”: [“@ui5/mcp-server”]
},
“@cap-js/mcp-server”: {
“type”: “stdio”,
“command”: “npx”,
“args”: [“@cap-js/mcp-server”]
},
“@sap/fiori-mcp-server”: {
“type”: “stdio”,
“command”: “npx”,
“args”: [“@sap/fiori-mcp-server”]
}
}
}This setting will be required in the file -> MCP(Project Folder) -> .vscode -> mcp.jsonThat’s it — your environment is now MCP-enabled. Sample Command ReferencesFor a given sample Project I ran the following commands. Attaching the output screenshots.cds-mcp analyse the data models in form of entitiesThe cds-mcp server internally ran:#Input
{
“kind”: “entity”,
“projectPath”: “../CloudStorage/OneDrive-SAPSE/Documents/MCP”
} #Output
[{
“kind”: “entity”,
“@cds.persistence.table”: true,
“@cds.autoexpose”: true,
“@UI.Identification”: [
{ “Value”: { “=”: “name” } }
],
“@cds.odata.valuelist”: true,
“includes”: [
“sap.common.CodeList”,
“recruitment.management.MasterData”
],
“elements”: {
“name”: {
“@title”: “{i18n>Name}”,
“localized”: true,
“type”: “cds.String”,
“length”: 255,
“@Common.Label”: “{i18n>Name}”
},
“descr”: {
“@title”: “{i18n>Description}”,
“localized”: true,
“type”: “cds.String”,
“length”: 1000,
“@Common.Label”: “{i18n>Description}”
},
“ID”: {
“key”: true,
“type”: “cds.String”,
“length”: 20,
“$location”: {
“file”: “db/masterdata.cds”,
“line”: 23,
“col”: 9
}
},
“texts”: {
“type”: “cds.Composition”,
“cardinality”: { “max”: “*” },
“target”: “recruitment.management.YesNo.texts”,
“on”: [
{ “ref”: [“texts”, “ID”] },
“=”,
{ “ref”: [“ID”] }
]
},
“localized”: {
“type”: “cds.Association”,
“target”: “recruitment.management.YesNo.texts”,
“on”: [
{ “ref”: [“localized”, “ID”] },
“=”,
{ “ref”: [“ID”] },
“and”,
{ “ref”: [“localized”, “locale”] },
“=”,
{ “ref”: [“$user”, “locale”] }
]
}
},
“$location”: {
“file”: “db/masterdata.cds”,
“line”: 22,
“col”: 8
},
“$localized”: true,
“name”: “recruitment.management.YesNo”
}]Please add an SAP Fiori elements list report app to my CAP project.The ui5Mcp server internally:#Input
{
“appNamespace”: “recruitment.management.yesno”,
“basePath”: “../CloudStorage/OneDrive-SAPSE/Documents/MCP/app”,
“typescript”: true,
“runNpmInstall”: true,
“oDataV4Url”: “/odata/v4”,
“oDataEntitySet”: “YesNo”
} #Output
Successfully created a SAPUI5 TypeScript application inside
../CloudStorage/OneDrive-SAPSE/Documents/MCP/app/recruitment.management.yesno
(Namespace: recruitment.management.yesno
Framework: SAPUI5 1.141.1) and npm install was executed.
Note that the BaseController has no onInit function, so do not try to call super.onInit() in the MainController when adding code.
Note that in CAP projects you MUST NOT use npm start of this UI5 app, as doing this and opening it on port 8080 will not allow the app to load any data. Instead, you MUST use cds watch in the project root to start the server. The new app is then automatically served at /recruitment.management.yesno/index.html.
Note that the table in the Main view has no columns and the Form has no fields, as an OData service and entity was provided, but no properties were specified and none could be found automatically.
The generated files inside
../OneDrive-SAPSE/Documents/MCP/app/recruitment.management.yesno
are:
.editorconfig
.gitignore
.nycrc.json
eslint.config.mjs
LICENSE
package.json
README.md
tsconfig.json
ui5-coverage.yaml
ui5-dist.yaml
ui5.yaml
webapp/Component.ts
webapp/controller/App.controller.ts
webapp/controller/BaseController.ts
webapp/controller/Main.controller.ts
webapp/i18n/i18n_en.properties
webapp/i18n/i18n.properties
webapp/index-cdn.html
webapp/index.html
webapp/manifest.json
webapp/model/formatter.ts
webapp/model/models.ts
webapp/test/integration/HelloJourney.ts
webapp/test/integration/opaTests.qunit.ts
webapp/test/integration/pages/MainPage.ts
webapp/test/Test.qunit.html
webapp/test/testsuite.qunit.html
webapp/test/testsuite.qunit.ts
webapp/test/unit/controller/Main.qunit.ts
webapp/test/unit/unitTests.qunit.ts
webapp/view/App.view.xml
webapp/view/Main.view.xmlUseful ResourcesUI5 MCP Server – Github CAP (CDS) MCP Server – GitHub   Read More Technology Blog Posts by SAP articles 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author