Welcome to @sap/mdk-mcp-server
What is MCP server for Mobile Development Kit (MDK)?
This open-source server provides AI agents with comprehensive MDK knowledge and tools. By combining best practice guidelines, project-aware context information, templates for creating new projects, and access to the MDK CLI tools, the MDK MCP server transforms AI agents into MDK development experts.
What is Mobile Development Kit?
The mobile development kit is a powerful framework that enables developers to build cross-platform mobile applications using a metadata-driven approach. It is part of SAP Business Technology Platform and integrates tightly with SAP Mobile Services.
Some of SAP’s larger and complex mobile apps are built using MDK. An example is SAP Service and Asset Manager.
Table of Contents
Available Tools
[!NOTE]
Tools are meant to be used by AI models and do not constitute a stable API.
This release of the MDK MCP server includes the following tools, which can be accessed by your AI agent:
| Tools | Description | Parameters |
|---|
mdk-create | Creates MDK projects or entity metadata using templates (CRUD, List Detail, Base). Use this for initializing new projects or adding entity metadata to existing projects. | - folderRootPath: The path of the current project root folder. - scope: The scope of creation:• project: Initialize a new MDK project with full structure• entity: Add entity metadata to an existing project - templateType: The type of template to use (crud, list detail, base). Note: base template is only valid for project scope. - oDataEntitySets: The OData entity sets relevant to the user prompt, separated by commas. - offline: Whether to generate the project in offline mode (only applicable for project scope). Set to false unless offline is explicitly specified. |
mdk-gen | Generates MDK artifacts including pages, actions, i18n files, and rule references. Returns prompts for LLM processing (pages, actions, i18n) or searches for rule examples. | - artifactType: The type of artifact to generate:• page: Generate MDK page files (.page) with databinding or layout• action: Generate MDK action files (.action)• i18n: Generate internationalization files (.properties)• rule: Search for and return relevant JavaScript rule examples - folderRootPath: The path of the current project root folder (not required for rule artifact type).For page artifacts: - pageType: Type of page page):• databinding: Data-driven pages with controls bound to OData• layout: Structure-focused pages with specific layouts - controlType: The control type for databinding pages (required when pageType is databinding). Available types: ObjectTable, FormCell, KeyValue, ObjectHeader, ContactTable, SimplePropertyCollection, ObjectCard, DataTable, KPIHeader, ProfileHeader, ObjectCollection, Timeline, TimelinePreview, Calendar. - oDataEntitySets: Optional: The OData entity sets to use for page generation, separated by commas (required only when pageType is databinding). - layoutType: The layout type for layout pages (required when pageType is layout). Available types: Section, BottomNavigation, FlexibleColumnLayout, SideDrawerNavigation, Tabs, Extension.For action artifacts: - actionType: The type of action (required when artifactType is action). Available types: CreateODataEntity, UpdateODataEntity, DeleteODataEntity, CreateODataMedia, InitializeOfflineOData, DownloadOfflineOData, UploadOfflineOData, CancelDownloadOfflineOData, CancelUploadOfflineOData, ClearOfflineOData, CloseOfflineOData, CreateODataRelatedEntity, CreateODataRelatedMedia, CreateODataService, DeleteODataMedia, DownloadMediaOData, LogMessage, Message, Navigation, OpenODataService, ProgressBanner, PushNotificationRegister, PushNotificationUnregister, ReadODataService, RemoveDefiningRequest, SendRequest, SetLevel, SetState, ToastMessage, UndoPendingChanges, UploadLog, UploadODataMedia, UploadStreamOData, ChatCompletion, PopoverMenu, CheckRequiredFields, ChangeSet, OpenDocument, Banner, Filter. - oDataEntitySets: Optional: The OData entity sets to use for action generation, separated by commas (required only when artifactType is action).For i18n artifacts: - No additional parameters required beyond folderRootPath.For rule artifacts: - query: Search query for rule reference (required when artifactType is rule). Examples: get app name, handle form validation, navigate to page, etc. |
mdk-manage | Comprehensive MDK project management tool that handles build, deploy, validate, migrate, show QR code, and mobile app editor operations. | - folderRootPath: The path of the current project root folder. - operation: The operation to perform on the MDK project. Available operations:• build: Build an MDK project• deploy: Deploy an MDK project to the Mobile Services• validate: Validate an MDK project• migrate: Migrate an MDK project to the latest MDK version• show-qrcode: Show QR code for an MDK project• open-mobile-app-editor: Instruct how to open the Mobile App Editor to create .service.metadata file - externals: Optional: Array of external package names to include in the deployment (e.g., [@nativescript/geolocation]). If not specified, will automatically read from mdk.bundlerExternals in .vscode/settings.json of the project. Defaults to empty array if neither is provided. |
mdk-docs | Unified tool for accessing MDK documentation including search, component schemas, property details, and examples. | - operation: The type of documentation operation to perform:• search: Returns the top N results from MDK documentation by semantic search, sorted by relevance• component: Returns the schema of an MDK component based on the name of the component• property: Returns the documentation of a specific property of an MDK component• example: Returns an example usage of an MDK component• search-samples: Search through MDK tutorial samples and code examples from GitHub - folderRootPath: The path of the current project root folder. Used to determine the appropriate MDK schema version. - query: Search query string (required for search and search-samples operations). - component_name: Name of the component (required for component, property, and example operations). - property_name: Name of the property (required for property operation). - N: Number of results to return for search operation (default: 5). |
mdk-fetch-mobile-metadata | Fetches OData $metadata document from a Mobile Services destination and saves it as a .service.metadata file in the MDK project. This file is required by mdk-create and mdk-gen tools for data-bound page/action generation. Requires CF CLI authentication (cf login). | - folderRootPath: The path of the MDK project root folder where .service.metadata will be saved. - appId: The Mobile Services application ID (e.g., myapp.mdk.demo). - destination: The destination name configured in Mobile Services (e.g., IncidentManagement). - pathSuffix: Optional path suffix to append before /$metadata (e.g., /api/v1). Leave empty if not needed. - landscapeType: The Mobile Services landscape type. Use Standard for production environments (default) or Preview for preview environments. |
Ingesting GitHub Knowledge (Advanced)
The MDK MCP server can ingest additional knowledge from GitHub repositories to enhance the search-samples operation. This allows the AI agent to search through MDK tutorial samples and code examples.
What Gets Ingested
By default, the server ingests knowledge from:
When to Run Ingestion
You typically only need to run ingestion in these scenarios:
- First-time setup (if you want to use
search-samples operation)
- Updating knowledge base (when new samples are added to GitHub repositories)
- After cloning the repository (ingested data is not included in the repo)
Note: The ingestion process is optional. The server will work without it, but the search-samples operation will not return results until ingestion is completed.
How to Ingest
Basic ingestion (uses cached data if available):
npm run ingest
Fresh ingestion (ignores cache, re-downloads everything):
npm run ingest:fresh
With GitHub token (recommended for better rate limits):
export GITHUB_TOKEN="your_github_token_here"
npm run ingest
Custom options:
npm run build
node build/ingest-github-knowledge.js --no-cache --github-token "your_token" --chunk-size 800
Command Line Options
| Option | Description | Default |
|---|
--no-cache | Force re-download of all content, ignoring cache | Uses cache |
--github-token <token> | GitHub personal access token for API requests | $GITHUB_TOKEN env var |
--vector-db <path> | Path to store the vector database | ./knowledge.db |
--chunk-size <number> | Size of text chunks for embedding | 1000 |
--chunk-overlap <number> | Overlap between chunks | 200 |
GitHub Token Setup
To avoid GitHub API rate limits, create a personal access token:
- Go to https://github.com/settings/tokens
- Click Generate new token (classic)
- Select scopes:
public_repo (read access to public repositories)
- Copy the token and set it as an environment variable:
export GITHUB_TOKEN="ghp_your_token_here"
Ingestion Output
The ingestion process will:
- Fetch content from configured GitHub repositories
- Chunk the content into manageable pieces
- Generate embeddings using the AI model
- Store embeddings in a vector database
- Enable semantic search via the
search-samples operation
Example output:
Fetching from MDK Tutorial Samples...
Chunking content: 150 chunks created
Generating embeddings: 150/150 (100%)
✓ Ingestion complete!
Troubleshooting
Issue: GitHub API rate limit exceeded
- Solution: Set up a GitHub token (see above)
Issue: Ingestion takes too long
- Solution: Use
--no-cache only when necessary; cached runs are much faster
Issue: Out of memory
- Solution: Reduce
--chunk-size or process fewer repositories
Offline OData Querying (Advanced)
The MDK MCP server can help you query offline OData stores using the ilodata command-line tool. This is useful for debugging offline applications or inspecting data stored locally on devices during development.
Prerequisites
- MDK SDK
- ilodata Tool: Extract from
SAPOfflineOData-xx.xx.xx-Tools.zip in the MDK SDK
- Offline Store Files: A pair of
.udb and .rq.udb files from your offline application
Querying Offline Stores
Once set up, you can use natural language prompts with the MDK MCP server to query offline stores:
Example Prompts:
Basic query:
Open and query the CustomerStore offline store located at ~/ilodata-tools/CustomerStore.udb
and retrieve the top 5 entities from the Customers entity set
Filtered query:
Query the SalesOrders offline store at ~/ilodata-tools/SalesOrders.udb
and get all orders where CustomerID equals `ALFKI`
Specific fields:
Open the Products offline store at ~/ilodata-tools/Products.udb
and retrieve ProductID, ProductName, and UnitPrice from the Products entity set
Count entities:
Query the Employees offline store at ~/ilodata-tools/Employees.udb
and count the total number of records in the Employees entity set
How It Works
The AI agent will:
- Understand your natural language query
- Construct the appropriate
ilodata command
- Execute the command against your offline store
- Return the results in a readable format
Support, Feedback, Contributing
This project is open to feature requests/suggestions, bug reports, and so on, via GitHub issues. Contribution and feedback are encouraged and always welcome.
Contributing
These instructions help contributors set up, test, and maintain code quality for this project. All commands should be run from your project folder in a terminal.
- Test:
npm test
- Build:
npm run build
- Lint:
npm run lint:all
For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.
Telemetry
You can enable or disable the collection of analytics. By default, non-personally identifiable information is collected to help understand how you use the product and improve the MDK MCP Server. If you want to opt-out, there are two ways to disable telemetry:
Method 1: Configuration File
Create or change the file ~/.fioritools/telemetrysettings.json:
{
"telemetrysettings": {
"telemetrySetting": {
"enableTelemetry": false
}
}
}
Set enableTelemetry to false to disable telemetry collection.
Method 2: Environment Variable
Set the environment variable SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY to true:
export SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY=true
Setting this environment variable disables the telemetry client.
Security / Disclosure
If you find a bug that may pose a security problem, please follow our instructions in our security policy on how to report it. Please do not create GitHub issues for security-related doubts or problems.
Code of Conduct
As members, contributors, and leaders, we pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.
Licensing
Copyright 2025 SAP SE or an SAP affiliate company. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available .
Acknowledgments
- @huggingface/transformers.js is used to compare the output of the WordPiece tokenizer.
- @modelcontextprotocol/sdk provides the SDK for MCP.