Mdk Mcp Server

io.github.SAP由 GitHub 帳號 SAP 發布v1.0.0更新於 Nov 3, 2026

Model Context Protocol (MCP) server for AI-assisted development of MDK applications.

概覽

AI 產生的概覽

SAP 的在地 MCP 伺服器,為 AI 程式助理提供 MDK 知識與工具,用來建立、產生、驗證、遷移與部署 Mobile Development Kit 應用程式。

可以做什麼
  • 依 CRUD、清單-詳情或基礎範本建立 MDK 專案或實體中繼資料
  • 產生頁面、動作、國際化檔案,並搜尋 JavaScript 規則範例
  • 建置、部署、驗證、遷移專案,顯示引導 QR code 並開啟 Mobile App Editor
  • 搜尋 MDK 文件、元件結構、屬性說明與範例,包含 GitHub 教學範例
  • 從 Mobile Services 目的地取得 OData 中繼資料並存成 .service.metadata 檔案
  • 透過 ilodata 工具查詢離線 OData 存放區
適用情境
適合在開發或維護 SAP Mobile Development Kit 應用程式時,想讓 AI 助理建立專案、加入頁面與動作、檢查或遷移結構版本、查閱 MDK 文件,或部署到 SAP Mobile Services 的情境。
執行需求
以在地 stdio 程序執行,從 npm 安裝 @sap/mdk-mcp-server,需要 Node.js 24.11.1;macOS 僅支援 Apple Silicon(v0.4.0 起不支援 Intel Mac),另支援 Linux 與 Windows。對接 SAP Mobile Services 建立應用程式需要 Cloud Foundry CLI、cf 登入以及 .service.metadata 檔案。選用的 GitHub 知識匯入使用 GITHUB_TOKEN 環境變數。
安裝前請注意
此伺服器可寫入專案檔案、建置、遷移並部署到 SAP Mobile Services,核准工具呼叫前應先檢視變更。部署與取得中繼資料會使用你的 Cloud Foundry 工作階段。選用的 GitHub 匯入會把儲存庫內容產生嵌入並存入本機向量資料庫,可能使用 GITHUB_TOKEN。分析遙測預設開啟,可透過 SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY 或遙測設定檔關閉。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mdk Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[SAP MDK icon]

Welcome to @sap/mdk-mcp-server

[REUSE status]

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

Setup

Platform Support

The MDK MCP server supports the following platforms:

  • macOS: Apple Silicon (ARM64) only
    • ⚠️ Note: Intel Mac (x64) is not supported in v0.4.0+ due to onnxruntime-node ≥1.24 dropping darwin/x64 binaries
  • Linux: x64, ARM64, and other architectures
  • Windows: x64, ARM64

If you're on an Intel Mac, you may need to:

  • Use Rosetta 2 to run the ARM64 version (performance may vary)
  • Or stay on an earlier version that uses onnxruntime-node <1.24

Installation Steps

  1. Install node.js 24.11.1.

  2. To install the MDK MCP server, you have two options:

    a. Use npm to install it from the public npmjs registry at @sap/mdk-mcp-server.

    bash
    npm install -g @sap/mdk-mcp-server

    b. Clone the open-source code repository at https://github.com/SAP/mdk-mcp-server, and use npm to install.

    bash
    git clone https://github.com/SAP/mdk-mcp-server.git cd mdk-mcp-server npm inpm run buildnpm i -g @sap/mdk-mcp-server@. 
  3. Configure your MCP client (AI agent) to connect to the server. Note that configuration will vary depending on the AI agent used.

    Cline in VS Code: Example using the Cline extension.

    • With Cline open, look below the prompt box and click Manage MCP Servers.
    • In the dialog, click Settings. The MCP Servers page opens.
    • Click Configure MCP Servers. This will open the cline_mcp_settings.json file in your editor.
    • In the JSON settings file, add a configuration block for MDK MCP server within the mcpServers section, and save the file. The supported schema versions include 26.9 (default), 26.6, 26.3, 25.9, 25.6, 24.11, and 24.7.
    json
    {  "mcpServers": {    "mdk-mcp": {      "type": "stdio",      "command": "mdk-mcp",      "args": ["--schema-version", "26.9"]    }  }}

    Note:
    If the MCP server is not listed with its available tools in the Cline extension immediately, restart VS Code.

    Expand: Usage in Claude Code (VS Code Extension)

    Claude Code discovers MCP servers from its configuration.

    1. Open (or create) your Claude Code configuration file:
    text
    ~/.claude.json
    1. Add the following MCP server configuration:
    json
    {  "mcpServers": {    "mdk-mcp": {      "type": "stdio",      "command": "mdk-mcp",      "args": ["--schema-version", "26.9"]    }  }}

    Note: If ~/.claude.json already exists, merge the mdk-mcp entry into the existing mcpServers section rather than replacing the entire file.

    1. Reload the VS Code window (or restart VS Code).

    Verify the installation

    Open the Claude Code panel in VS Code and run:

    text
    /mcp

    You should see mdk-mcp listed as an available MCP server.

    Expand: Usage in OpenCode

    An example using OpenCode:

    {  "mcp": {    "mdk-mcp": {      "type": "local",      "command": ["mdk-mcp", "--schema-version", "26.9"],      "enabled": true    }  }}
    Expand: Usage in Cursor

    Edit the file ~/.cursor/mcp.json:

    json
    {  "mcpServers": {    "mdk-mcp": {      "type": "stdio",      "command": "mdk-mcp",      "args": ["--schema-version", "26.9"]    }  }}
    Expand: Usage in Claude Desktop Use the absolute path to Node.js in your Claude Desktop configuration file.
    1. Find your Node.js installation path by running the terminal command:

      bash
      which node

      This might output something like /usr/local/bin/node or /opt/homebrew/bin/node.

    2. Edit ~/Library/Application Support/Claude/claude_desktop_config.json and update the command field to use the absolute path:

      json
      {  "mcpServers": {    "mdk-mcp": {      "command": "/usr/local/bin/node",      "args": ["/usr/local/lib/node_modules/@sap/mdk-mcp-server/build/index.js", "--schema-version", "26.9"]    }  }}
    3. Restart Claude Desktop.

    Note: Adjust the paths based on your actual Node.js and MDK MCP server installation locations.

    Once configured, your AI agent will have access to the MDK MCP server. Depending on your IDE settings, you may need to approve initial tool calls.

  4. Create a Rule File: To ensure your AI coding assistant uses the MCP servers appropriately for your project, define rules and guidelines in a file named AGENTS.md. In the Cline extension for VS Code, click the Manage Cline Rules & Workflows icon below the prompt box, click + to create a new rule file (e.g., AGENTS.md) and add the example rules shown below:

    markdown
    - Do not generate `.service.metadata` file.- Do not generate `.xml` file in the `Services` folder.- Do not change `.project.json` file.
  5. Verify your LLM Provider and AI model.

    When you add Cline to VS Code, it serves as the default API provider. You can choose a different LLM provider, such as SAP AI Core. To add an SAP AI Core API provider in the Cline extension for VS Code, follow these steps:

    • With Cline open, look below the prompt box and click Select Model / API Providers.
    • Choose your API provider (such as SAP AI Core) and enter your details. See the instructions here for a detailed setup.
    • Select your preferred AI model.
  6. Integration with SAP Mobile Services: To create a new MDK application, the MCP server uses the Cloud Foundry CLI and a .service.metadata file containing:

    • The mobile application defined in the SAP Mobile Services instance.
      • Mobile Services API Endpoint
      • Mobile Services App ID
    • Mobile Destinations including OData service metadata.

    We include a tool to help with creating or updating this file as part of our VS Code extension: Mobile development kit extension for VS Code. This is how you can use this tool to create or update the .service.metadata file:

    1. Install the Mobile development kit extension for VS Code version 1.32.0 or later.
    2. Install the Cloud Foundry CLI.
    3. Log in to your SAP BTP Cloud Foundry environment. For more details you can refer to this help documentation.
    bash
    cf login -a <your target endpoint> --sso
    1. Create an empty folder on your machine and open it in VS Code.
    2. Open the Command Palette in VS Code and select MDK: Open Mobile App Editor.
    3. Create a new or select an existing mobile app.
    4. Select a destination.
    5. Click Add App to Project.
  7. Your environment is now ready for the MDK development with MCP server. You can now enter a prompt to:

    • Generate a new MDK project displaying OData entities information.
    • Enhance an existing project by adding additional UI controls on a given page.
    • Validate your current MDK project schema.
    • Migrate old MDK projects to latest schema.
    • Deploy your MDK project.
    • Generate onboarding QR code.
    • Explain specific properties.
    • Find information about control properties or any aspect of the documentation.

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:

ToolsDescriptionParameters
mdk-createCreates 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-genGenerates 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-manageComprehensive 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-docsUnified 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-metadataFetches 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):

bash
npm run ingest

Fresh ingestion (ignores cache, re-downloads everything):

bash
npm run ingest:fresh

With GitHub token (recommended for better rate limits):

bash
export GITHUB_TOKEN="your_github_token_here"npm run ingest

Custom options:

bash
npm run buildnode build/ingest-github-knowledge.js --no-cache --github-token "your_token" --chunk-size 800

Command Line Options

OptionDescriptionDefault
--no-cacheForce re-download of all content, ignoring cacheUses 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 embedding1000
--chunk-overlap <number>Overlap between chunks200

GitHub Token Setup

To avoid GitHub API rate limits, create a personal access token:

  1. Go to https://github.com/settings/tokens
  2. Click Generate new token (classic)
  3. Select scopes: public_repo (read access to public repositories)
  4. Copy the token and set it as an environment variable:
    bash
    export GITHUB_TOKEN="ghp_your_token_here"

Ingestion Output

The ingestion process will:

  1. Fetch content from configured GitHub repositories
  2. Chunk the content into manageable pieces
  3. Generate embeddings using the AI model
  4. Store embeddings in a vector database
  5. Enable semantic search via the search-samples operation

Example output:

Fetching from MDK Tutorial Samples...Chunking content: 150 chunks createdGenerating 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

  1. MDK SDK
  2. ilodata Tool: Extract from SAPOfflineOData-xx.xx.xx-Tools.zip in the MDK SDK
  3. Offline Store Files: A pair of .udb and .rq.udb files from your offline application

Setup Steps

  1. Extract the ilodata tool:

    bash
    # Download MDK SDK and locate the tools zip fileunzip SAPOfflineOData-*.zip -d ~/ilodata-tools
  2. Prepare your offline store files:

    bash
    # Copy your offline store files to the ilodata foldercp /path/to/your/app/*.udb ~/ilodata-tools/cp /path/to/your/app/*.rq.udb ~/ilodata-tools/

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:

  1. Understand your natural language query
  2. Construct the appropriate ilodata command
  3. Execute the command against your offline store
  4. 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:

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:

bash
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 [REUSE status].

Acknowledgments

  • @huggingface/transformers.js is used to compare the output of the WordPiece tokenizer.
  • @modelcontextprotocol/sdk provides the SDK for MCP.

來源:README.md,提交 da22ba0

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分