---
parser: v2
auto_validation: true
primary_tag: software-product>mobile-development-kit-client
tags: [ tutorial>beginner, operating-system>ios, operating-system>android, topic>mobile, software-product>sap-business-technology-platform, software-product>mobile-development-kit-client, software-product>sap-mobile-services, software-product>sap-build-code, software-product>sap-build ]
time: 20
author_name: Jitendra Kansal
author_profile: https://github.com/jitendrakansal
slug: cp-mobile-dev-kit-mcp-setup
canonical_url: https://developers.sap.com/tutorials/cp-mobile-dev-kit-mcp-setup
---

# Set Up MCP Server for MDK Development
<!-- description --> Configure your development environment to get started with an agentic coding experience using the MCP server for mobile development kit (MDK).

## Prerequisites  
- You have [Signed up for a trial account on SAP BTP](https://developers.sap.com/tutorials/hcp-create-trial-account.html).
- SAP BTP production account to connect to the SAP AI core service.

## You will learn
- Set up your local machine for agentic MDK development
- Install and configure the MDK MCP server
- Configure an LLM provider for use with MCP
- Connect an MCP client (VS Code + Cline) to the MCP server
- Define rules to guide AI-assisted MDK development

---


### Understand the MCP server for mobile development kit

**[MCP](https://modelcontextprotocol.io/docs/getting-started/intro)** (Model Context Protocol) is an open standard that helps AI models and tools work together in a structured and secure way. It defines a common way for AI coding assistants (powered by large language models) to connect with external tools, data, and workflows. 

MCP uses a client-server architecture to make communication between AI applications and external systems straightforward.

- **Host Application**: The AI application that users interact with, such as an LLM chat interface or an AI-powered code editor. It initiates requests and drives the workflow.
 - **MCP Client**: Embedded in the host application. It converts the host requests into the MCP standard and manages communication with MCP servers.
 - **MCP Server**: A service that exposes a specific tool or data source (for example, a GitHub repository, a database, or SAP tools) to the AI system using the MCP standard.

The **MCP server for mobile development kit (MDK)** is an open-source server built specifically for MDK development. It provides AI agents with MDK-specific knowledge, such as:

- Best-practice guidelines
- Project-aware context
- Templates for creating new MDK projects
- Access to MDK CLI tools

These features enable AI agents to understand MDK projects more effectively, supporting an AI-assisted (agentic) development workflow. For more information, see this [blog post](https://community.sap.com/t5/technology-blog-posts-by-sap/developing-mobile-apps-with-ai-agents-introducing-the-mcp-server-for-mobile/ba-p/14237709).

![MDK MCP Server Architecture Overview](https://raw.githubusercontent.com/sap-tutorials/sap-mobile-development-kit/main/tutorials/cp-mobile-dev-kit-mcp-setup/img-1.1.png)

### Install Required Tooling

1. Download and install [node.js 24.11.1](https://nodejs.org/dist/v24.11.1/).

2. Install the MDK MCP server using one of the following options:

    **Option A: Install from the public npm registry**

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

    **Option B: Install from the open-source repository**

   ```bash
   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. Install **Cloud Foundry CLI** by following the [documentation](https://github.com/cloudfoundry/cli/wiki/V8-CLI-Installation-Guide). The guide provides machine specific installation steps and package manager options. `CF CLI` is required to connect to your SAP BTP Cloud Foundry organization and space. 

### Add Your LLM Provider and Model

Although this tutorial uses Cline as the example agent, the MCP server itself is agent-agnostic. You can use it with any MCP-compatible agent. Cline uses a built-in API provider by default. You can configure a different LLM provider via:

- Built-in provider with a free model
- Paid LLM provider with your API key
- SAP AI Core via SAP BTP production account

This step covers how to connect to **SAP AI Core** and access a deployed model from there.

1. Download and install [Visual Studio Code](https://code.visualstudio.com/download) on your machine.

2. Install the **SAP Mobile Development Kit Editor** from the Visual Studio Code Marketplace.

    ![SAP MDK Editor VS Code Marketplace](https://raw.githubusercontent.com/sap-tutorials/sap-mobile-development-kit/main/tutorials/cp-mobile-dev-kit-mcp-setup/img-1.2.png)

3. Install the [Cline](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev) extension from the Visual Studio Code Marketplace.

    ![Cline Extension VS Code Marketplace](https://raw.githubusercontent.com/sap-tutorials/sap-mobile-development-kit/main/tutorials/cp-mobile-dev-kit-mcp-setup/img-2.1.png)

4. Once Cline is installed, the Cline icon (a robot with two eyes) should appear in your activity bar. Click the **Cline** icon to open the side panel. Inside the Cline panel, if you see `How will you use Cline?` window, then select  **Bring my own API key** and **Continue**.

    ![Cline Panel API Key Selection](https://raw.githubusercontent.com/sap-tutorials/sap-mobile-development-kit/main/tutorials/cp-mobile-dev-kit-mcp-setup/img-2.1.1.png)

5. Select your API provider (for example, SAP AI Core), enter the required credentials, and choose the AI model you want to use. For detailed configuration steps, see the [documentation](https://docs.cline.bot/provider-config/sap-aicore#sap-ai-core).

    ![Cline SAP AI Core Provider Configuration](https://raw.githubusercontent.com/sap-tutorials/sap-mobile-development-kit/main/tutorials/cp-mobile-dev-kit-mcp-setup/img-2.1.2.png)


### Configure an MCP Client to Connect to the MCP Server

With Cline configured, you now need to register the MDK MCP server so the AI agent can access MDK-specific tools. If you are using a different agent, the setup will look very similar and follows the same MCP concepts.

1. Open the **Cline** panel and click **Manage MCP Servers** below the prompt box.

    ![Cline Panel Manage MCP Servers Button](https://raw.githubusercontent.com/sap-tutorials/sap-mobile-development-kit/main/tutorials/cp-mobile-dev-kit-mcp-setup/img-2.2.png)

2. In the dialog, click **Settings**. 

    ![MCP Servers Dialog Settings Button](https://raw.githubusercontent.com/sap-tutorials/sap-mobile-development-kit/main/tutorials/cp-mobile-dev-kit-mcp-setup/img-2.3.png)

3. On the MCP Servers page, select **Configure MCP Servers**. This opens a JSON settings file.

    ![MCP Servers Configure Settings Option](https://raw.githubusercontent.com/sap-tutorials/sap-mobile-development-kit/main/tutorials/cp-mobile-dev-kit-mcp-setup/img-2.4.png)

4. In the `JSON` settings file, add the following configuration under the `mcpServers` section, then save the file. 

   ```json
   {
     "mcpServers": {
       "mdk-mcp": {
         "type": "stdio",
         "command": "mdk-mcp",
         "args": ["--schema-version", "26.6"]
       }
     }
   }
   ```

    >Supported schema versions include 26.6(default), 26.3, 25.9, 25.6, 24.11, and 24.7.      


5. After saving the file, the `mdk-mcp` server appears in the MCP Servers list with a green status indicator, confirming it is active and ready. Once configured, your AI agent can access the MDK MCP server. [Here](https://github.com/SAP/mdk-mcp-server?tab=readme-ov-file#available-tools) are the detailed information about all the tools available in this MCP server.

    >If the MCP server or its tools do not appear immediately, restart Visual Studio Code.

    The MDK MCP server provides the following tools. You will learn more about them in the next tutorials.

    | Tools     | Description | 
    |----------|-----|
    | `mdk-create`    | Creates MDK projects or entity metadata using templates (CRUD, List Detail, Base). |
    | `mdk-gen`    | Generates MDK artifacts including pages, actions, i18n files, and rule references. |
    | `mdk-manage`    | Comprehensive MDK project management tool that handles build, deploy, validate, migrate, show QR code, and mobile app editor operations. |
    | `mdk-docs`    | Unified tool for accessing MDK documentation including search, component schemas, property details, and examples.  |

6. Click **Done** to close the MCP servers window.
    
    ![MDK MCP Server Active Status Indicator](https://raw.githubusercontent.com/sap-tutorials/sap-mobile-development-kit/main/tutorials/cp-mobile-dev-kit-mcp-setup/img-2.5.png)

### Create a Rule File for AI-Assisted Development

To ensure the AI assistant follows MDK project conventions and uses the MCP server correctly, it is recommended to define project-specific rules.

1. In the Cline extension, click **Manage Cline Rules & Workflows** below the prompt box.

    ![Cline Manage Rules And Workflows Button](https://raw.githubusercontent.com/sap-tutorials/sap-mobile-development-kit/main/tutorials/cp-mobile-dev-kit-mcp-setup/img-2.6.png)

2. Enter rule name as `AGENTS.md` and click **+** to create a new  file. 

    ![Cline Create AGENTS.md Rule File](https://raw.githubusercontent.com/sap-tutorials/sap-mobile-development-kit/main/tutorials/cp-mobile-dev-kit-mcp-setup/img-2.7.png)

3. Add the following content and save the file.

   ```markdown
   - Don't generate `.service.metadata` file.
   - Don't generate `.xml` file in the `Services` folder.
   - Don't change `.project.json` file.
   - Don't add/modify my project when ask for how to or any suggestions.
   ```
    
    ![AGENTS.md Rule File Content Saved](https://raw.githubusercontent.com/sap-tutorials/sap-mobile-development-kit/main/tutorials/cp-mobile-dev-kit-mcp-setup/img-2.8.png)

In this tutorial, you set up your development environment for agentic SAP MDK development. You installed and configured the MDK MCP server, connected it to Cline in Visual Studio Code, established the AI-assisted development workflow with project-specific rules.

---
