MCP Server#

This guide describes how to integrate the Dlubal API with AI-powered tools to interact with RFEM models using human-readable text. As an example, Cline is used to demonstrate how to connect to the Dlubal’s RFEM MCP server, acting as a bridge between AI and the Dlubal API, allowing AI prompts to be converted into structured API requests for the Dlubal API.

Warning

API requests made through AI tools count toward your monthly usage and may contribute to reaching your subscription limit (see Subscriptions & Pricing). These requests are monetized, even when using the local run of MCP server for Dlubal API.

Prerequisites#

Before starting, ensure your system meets the following requirements:

  1. Installed Visual Studio Code as your code editor:

  2. Installed Cline Extension in VS Code:

    • Open the Extensions view by pressing Ctrl+Shift+X.

    • Search for Cline and click on Install.

  3. Start the RFEM API gRPC server on the default port (9000). For more details, refer to the Starting Server.

  4. Configure API key via the config.ini file. For more details, refer to the Authentication.

Starting MCP Server Locally#

The RFEM MCP server is program that runs on your computer, providing specific capabilities to AI through a standardized protocol. This server exposes a set of tools and resources that AI can use to perform actions using the Dlubal API in the background.

To start the MCP server:

  1. Open a Command Prompt (CMD) in Windows.

  2. Navigate to the bin folder of the RFEM installation:

    C:\Program Files\Dlubal\RFEM 6.13\bin
    
  3. Run the following command to start the server:

    .\python.exe -m rfem_mcp_server
    
  4. The server will start at the provided URL: http://127.0.0.1:8000/sse serving as the endpoint for the AI tool acting as the MCP client to connect to (see fig)

    Running the Server with GUI

Connect to MCP Server#

Now that the RFEM MCP server is running locally, you need to set up an AI client to interact with the Dlubal API through the server. Any AI client that supports the MCP protocol can be used.

Important

Not all AI providers and LLMs support connections to the MCP server running locally. For example, GPT-4.0 is compatible, but GPT-5 may not be. Ensure the selected AI provider and model support the MCP protocol for local usage.

Cline#

  1. Open VS Code and go to the Cline extension section.

  2. Configure the prefered AI Provider (such as OpenAI or Anthropic) in the API Configuration section.

    AI provider configuration
  1. Navigate to the Remote Servers tab under the MCP Servers configuration.

  2. Add a new server with the following details:
    • Server Name: rfem-mcp-server

    • Server URL: Enter the URL provided by the MCP server, which should be http://127.0.0.1:8000/sse (or the URL from the output above).

    • Transport Type: Select SSE (Legacy) for the transport type.

    MCP server configuration
  3. Once configured, click Add Server to finalize the integration.

  4. Now, Cline will connect to the Dlubal MCP server via the URL, and you can begin using AI chatbot to start interacting with RFEM using plain text.

    MCP server successfull connection