All Products
Search
Document Center

AI Coding Assistant Lingma:Model Context Protocol

Last Updated:Sep 23, 2025

Model Context Protocol (MCP) extends Lingma functionality by connecting it to external tools and data sources. This topic describes the popular MCP services, standard transport types, configuration procedures, example scenarios, and frequently-asked questions.

Before you start

To use this feature, update the Lingma plugin in your IDE:

  • JetBrains: version 2.5.0 or later.

  • VS Code: version 2.5.0 or later.

See Install Lingma for details.

What is MCP?

The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context and tools to LLMs. It allows you to connect Lingma Agent with various data sources and tools through standardized interfaces. This improves the Agent's capabilities and can better meet personalization needs.

You can choose to connect to existing MCP services or develop your own. Popular marketplaces like ModelScope MCP Square and Higress MCP Marketplace already provide rich MCP services. Explore and discover more solutions to accelerate your innovation.

Popular MCP marketplaces

Common scenarios

  • ModelScope MCP Square aggregates high-quality MCP resources, like Alipay and MiniMax. These services empower AI developers with a wide range of MCP tools.

  • Higress MCP Marketplace has also published multiple popular services in its API-as-MCP markets.

  • Retrieve database schemas to generate Data Access Object (DAO) code, or complete data queries.

  • Retrieve information from online documentation to generate code, optimize code, or chat.

  • Generate interaction and frontend code from design systems.

Lingma supports the following standard transport types:

  • Standard Input/Output (stdio)

    The stdio transport enables communication through standard input and output streams. This is particularly useful for local integrations and command-line tools.

  • Server-Sent Events (SSE)

    SSE transport enables server-to-client streaming with HTTP POST requests for client-to-server communication.

How to configure and use MCP services

Important
  • MCP services are supported in Agent mode, together with the Qwen3 model.

  • You can connect up to 10 MCP services at a time.

Add MCP service

1. Access the MCP service page

Go to Your Settings by clicking your avatar in the top right corner, and then select MCP tools.

Note

After adding MCP, it can be used across local projects in the IDE.

莫3@1x (46)

2. Add a service
Method 1: Add through MCP marketplace
Important

Lingma IDE does not support searching in MCP Square

  1. Click MCP Square to see the default list and all the MCP services provided by the ModelScope community.

  2. In MCP Square, browse or search for the desired MCP service, and click Install.

Note

Some MCP Servers require additional environment variables when running, such as API_KEY or ACCESS_TOKEN.

  1. Go to My Servers to see the newly installed service. The icon displays as image, indicating a successful connection. Expand the details to see the list of tools.

Note

If dependencies required by the command are missing, the service will show an error message when you start. Please manually install the required dependencies. See MCP FAQ for more help.

莫3@1x (52)

Method 2: Add manually
Important

Lingma IDE currently does not support adding through a graphical interface and only supports adding via configuration files.

  1. In the upper-right corner of the MCP Service page, click "+" and select one of the following methods:

    • Add manually:

      • STDIO type: Fill in the name, command, arguments, and (optional) environment variables.

      • SSE type: Fill in the name and service endpoint.

    • Add by configuration:

      • Add the configuration information in the JSON file.

  2. After adding your server, you'll see the newly installed service. The icon displays as image, indicating a successful connection. Expand the details to see the list of tools.

莫3

Use MCP tools

Lingma automatically determines which MCP tool to call based on the user's input prompt, combined with the name and description of the MCP tool. It then uses the tool's results for the next steps.

1. Enter prompt

Switch to Agent mode in the IDE's chat box and enter your prompt in the dialog box.

页面 10@1x (3)

2. Execute tool

Before Lingma calls an MCP tool, you are prompted with a confirmation.

Press Ctrl+Enter to execute.

页面 10@1x (4)

3. Check execution results

After the tool execution is complete, the Lingma chat box will display the execution results. Expand to see detailed input and output.

页面 10@1x (5)

4. Review code and accept changes

页面 10@1x (13)

Example scenarios

Lingma supports two types of MCP services:

  1. SSE type (remote service hosting): Hosted on a remote server, with a simple and quick configuration process. Highly suitable for beginners to quickly get started and experience. In this example, you can use the fetch MCP service from the ModelScope MCP Market to easily implement the ability to scrape content from any webpage.

  2. STDIO type (local service running): Runs in your local environment and depends on your local environment preparation. Suitable for professional developers. In this example, you will experience using the weather MCP to query city weather information.

Scenario 1: Using remote MCP to retrieve and process content from web pages

This scenario demonstrates how to use Fetch MCP Server to retrieve and process content from web pages, converting HTML to markdown for easier consumption.

1. Get the MCP SSE service endpoint

  1. Go to the ModelScope MCP Market, and log on to get the MCP SSE service endpoint.

  2. Copy the code snippet under Connecting to MCP via an SSE URL.

莫3@1x (71)

2. Add MCP service

Go to MCP Services in the IDE plugin, and edit MCP server with the following:

  • Name:fetch

  • Type:SSE

  • Service endpoint: Paste the URL you copied. For example:

    https://mcp-****.modelscope.cn/sse

莫3@1x (36)

3. Complete configuration

You'll see the icon displays image, indicating the connection is successful. Expand the details to see the list of tools.

image

4. Use MCP in Lingma

Switch to Agent mode in the lower-left corner of the IDE chat box, and enter a prompt to summarize online documentation:

Please summarize the content of this document: https://www.alibabacloud.com/help/zh/lingma/developer-reference/listkbfiles-get-the-list-of-knowledge-base-files

页面 10@1x (14)

Then, enter the next prompt to generate code:

Generate sample code based on the API documentation: https://www.alibabacloud.com/help/zh/lingma/developer-reference/listkbfiles-get-the-list-of-knowledge-base-files

页面 10@1x (15)

Scenario 2: Using local MCP to query city weather

This scenario demonstrates how to query city weather using the weather MCP.

1. Check environment

Ensure that Node.js is installed in your local environment. You can ask Lingma to check the prerequisite environment. For example, use this prompt:

Please help me check my local environment to ensure Node.js is installed

页面 10@1x (8)

2. Add MCP service

Go to MCP Services in the IDE plugin, and edit MCP server with the following parameters:

  • Name: weather

  • Type: STDIO

  • Command: npx

  • Arguments:

-y @h1deya/mcp-server-weather

MCP service configuration information

  • Service configuration information

    {
      "mcpServers": {
        "weather": {
          "command": "npx",
            "args": [
                "-y",
                "@h1deya/mcp-server-weather"
            ],
        }
      }
    }
  • Source code address: weather MCP service

页面 10@1x (9)

3. Complete configuration

You'll see the icon displays image, indicating the connection is successful. Expand the details to see the list of tools.

页面 10@1x (10)

4. Use MCP in Lingma

Switch to Agent mode , and enter your prompts in the chat box to check the weather:

Help me check the weather in San Francisco, USA

页面 10@1x (16)

Then, enter the next prompt to check weather alerts:

Are there any weather alerts in the US tomorrow?

页面 10@1x (17)

Related links