@sap/mdk-mcp-server

@sap/mdk-mcp-server

Enables AI agents to create, enhance, and manage SAP Mobile Development Kit projects using best practices, templates, and CLI tools.

Category
访问服务器

README

<img src="images/MDK_icon.png" width=75px align="right" alt="SAP MDK icon">

Welcome to @sap/mdk-mcp-server

REUSE status

What is MCP server for mobile development kit?

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 SAP Mobile Development Kit (MDK) 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.

[!NOTE] This MCP server is an early release version of the MDK. You may encounter bugs or unfinished features. We'd love your feedback to make it better! Please report issues or share suggestions via GitHub issues.

Table of Contents

Setup

  1. Install node.js 22.14.0.

  2. For installing the MDK MCP server, we offer two options:

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

    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.

    git clone https://github.com/SAP/mdk-mcp-server.git 
    cd mdk-mcp-server 
    npm i --include=optional 
    npm run build
    npm i -g @sap/mdk-mcp-server@. 
    
  3. Configure your MCP client (AI agent) to connect to the server. 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.3(default), 25.9, 25.6, 24.11, and 24.7.
    {
      "mcpServers": {
        "mdk-mcp": {
          "type": "stdio",
          "command": "mdk-mcp",
          "args": ["--schema-version", "26.3"]
        }
      }
    }
    

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

    <details> <summary><b>Expand:</b> Usage in OpenCode</summary>

    Example using OpenCode:

    {
      "mcp": {
        "mdk-mcp": {
          "type": "local",
          "command": ["mdk-mcp", "--schema-version", "26.3"],
          "enabled": true
        }
      }
    }
    

    </details>

    <details> <summary><b>Expand:</b> Usage in Cursor</summary>

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

    {
      "mcpServers": {
        "mdk-mcp": {
          "command": "mdk-mcp",
          "args": ["--schema-version", "26.3"]
        }
      }
    }
    

    </details>

    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 above contents.

    Example rules to guide agent behavior:

    - Don't generate `.service.metadata` file.
    - Don't generate `.xml` file in the `Services` folder.
    - Don't change `.project.json` file.
    
  5. Verify your LLM Provider and AI model.

    When you add Cline to VS Code, it uses Cline 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 detailed setup.
    • Select your preferred AI model.
  6. Integration with SAP Mobile Services: For creating 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.
    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 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:

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. <br> - scope: The scope of creation:<br>• project: Initialize a new MDK project with full structure<br>• entity: Add entity metadata to an existing project<br> - templateType: The type of template to use (crud, list detail, base). Note: 'base' template is only valid for project scope.<br> - oDataEntitySets: The OData entity sets relevant to the user prompt, separated by commas.<br> - 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:<br>• page: Generate MDK page files (.page) with databinding or layout<br>• action: Generate MDK action files (.action)<br>• i18n: Generate internationalization files (.properties)<br>• rule: Search for and return relevant JavaScript rule examples<br> - folderRootPath: The path of the current project root folder (not required for rule artifact type).<br><br>For page artifacts:<br> - pageType: Type of page (required when artifactType is 'page'):<br>• databinding: Data-driven pages with controls bound to OData<br>• layout: Structure-focused pages with specific layouts<br> - 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.<br> - oDataEntitySets: Optional: The OData entity sets to use for page generation, separated by commas (required only when pageType is 'databinding').<br> - layoutType: The layout type for layout pages (required when pageType is 'layout'). Available types: Section, BottomNavigation, FlexibleColumnLayout, SideDrawerNavigation, Tabs, Extension.<br><br>For action artifacts:<br> - 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.<br> - oDataEntitySets: Optional: The OData entity sets to use for action generation, separated by commas (required only when artifactType is 'action').<br><br>For i18n artifacts:<br> - No additional parameters required beyond folderRootPath.<br><br>For rule artifacts:<br> - 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. <br> - operation: The operation to perform on the MDK project. Available operations:<br>• build: Build an MDK project<br>• deploy: Deploy an MDK project to the Mobile Services<br>• validate: Validate an MDK project<br>• migrate: Migrate an MDK project to the latest MDK version<br>• show-qrcode: Show QR code for an MDK project<br>• open-mobile-app-editor: Instruct how to open the Mobile App Editor to create .service.metadata file<br> - 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:<br>• search: Returns the top N results from MDK documentation by semantic search, sorted by relevance<br>• component: Returns the schema of an MDK component based on the name of the component<br>• property: Returns the documentation of a specific property of an MDK component<br>• example: Returns an example usage of an MDK component <br> - folderRootPath: The path of the current project root folder. Used to determine the appropriate MDK schema version. <br> - query: Search query string (required for 'search' operation). <br> - component_name: Name of the component (required for 'component', 'property', and 'example' operations). <br> - property_name: Name of the property (required for 'property' operation). <br> - N: Number of results to return for search operation (default: 5).

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.

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 any bug that may be a security problem, please follow our instructions at in our security policy on how to report it. Please don't create GitHub issues for security-related doubts or problems.

Code of Conduct

We as members, contributors, and leaders 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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选