All Products
Search
Document Center

AI Coding Assistant Lingma:MCP FAQ

Last Updated:Jun 02, 2025

Troubleshoot exceptions during the installation and operation of MCP servers, and learn details about how to handle missing environments, service initialization failures, and configuration errors.

Failed to add service or install

1. npx environment missing

  • Error message: failed to start command: exec: "npx": executable file not found in $PATH

  • Solution: Visit Node.js to download and install Node.js 18 or higher, or follow the steps below:

Warning

Node.js version must be v18 or higher, and npm version must be version 8 or higher. Lower versions may cause tool call failures.

Steps

1. Download and install Node.js.

Windows

  1. Install nvm-windows to manage multiple versions:

    nvm install 22.14.0  # Install specified version
    nvm use 22.14.0
  2. Verify the installation.

    node -v
    npx -v
  3. The terminal will display the installed Node.js version number.

macOS

Install Node.js with Homebrew (requires installing Homebrew first).

# 1. Update Homebrew and install Node.js
brew update
brew install node

# 2. Verify installation and confirm the versions
echo "Node.js version: $(node -v)"
echo "npm version: $(npm -v)"
echo "npx version: $(npx -v)"

# 3. Configure environment variables (if necessary)
echo 'export PATH="/usr/local/opt/node@16/bin:$PATH"' >> ~/.zshrc

2. uvx environment missing

  • Error message: failed to start command: exec: "uvx": executable file not found in $PATH

  • Solution: Install uv. uvx is a companion tool to uv for running Python scripts in isolated environments.

Steps

1. Download and install uv.

Windows

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

macOS and Linux

curl -LsSf https://astral.sh/uv/install.sh | sh

2. After installation, run the following command in the terminal to confirm successful installation:

uv --version

3. The terminal will display the installed uv version number.

3. Unable to initialize MCP Client

  • Error message: failed to initialize MCP client: context deadline exceeded

  • Possible causes:

    • MCP service parameters may have errors affecting service initialization.

    • Resource pull failure due to network connections.

    • Network security restrictions from your company may block MCP service initialization.

  • Troubleshooting steps:

    1. Click copy complete command.

    莫3@1x (64)

    2. Run the command in the terminal to get error details.

    莫3@1x (67)

    3. Analyze the error and fix it.

    Common issue 1: Configuration error

    In the example above, the error message shows that the connection failure is caused by an incorrect Redis connection URL configuration. Check and edit the MCP service to correct the URL configuration.

    Common issue 2: Resource pull failure

    If the command fails to run due to resource pull issues, execute the following command in the command line to add a mirror source, then restart the Lingma process and try again.

    Windows

    npm config set registry https://registry.npmmirror.com

    macOS

    export UV_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/

    Common issue 3: Node.js execution blocked by security components

    Authorize or whitelist the Node.js process or related files according to the messages.

Tool use related issues

Note

If you have concerns with MCP services provided by ModelScope, contact ModelScope Developer Group with DingTalk group number: 44837352.

1. Failed to execute tools due to environment variable or parameter input errors.

  • Troubleshooting steps:

If exceptions or unexpected results are shown when calling MCP tools, check the error messages first in the tool bar and analyze and troubleshoot accordingly.

Important

Some MCP services (such as Mastergo and Figma) include API_KEY or TOKEN in the arguments. These parameters still need to be manually configured upon installation.

莫3@1x (62)

  • Solution:

  1. Go to the Settings page in the IDE plugin.

  2. Find the corresponding MCP service and click Edit.

  3. In the Edit MCP Service page, check the parameters in Arguments.

  4. Replace Arguments with the correct one, reconnect the service and try calling it again.

莫3@1x (68)

2. LLMs cannot call MCP tools.

  1. Confirm that you are in Agent mode.

    Important

    If no project directory is opened, the system will only enter Ask mode and cannot call MCP tools. Load the corresponding project directory and switch to Agent mode.

  2. Confirm that the MCP service is in a connected state:

    • If the service connection is interrupted, click image on the right side of the interface, and the system will automatically attempt to restart the MCP service. 莫3@1x (66)

  3. Usage suggestion: Avoid using similar naming for MCP services and their tools (such as TextAnalyzer-Pro and TextAnalyzer-Plus both containing a tool named fetchText with similar functionality), to prevent ambiguity when calling MCP services.

3. Cannot open MCP tools page under Settings, and the page shows blank.

The page displays blank and there is an error message in idea.log like: "WARN - #c.i.u.j.JBCefApp - JCefAppConfig.class is not from a JBR module".

Cause: Android Studio default settings do not support JCEF, causing personal settings, MCP, and other pages to fail to load.

Solution:

  1. Configure JCEF: In the IDE, select Help > Find Action.., and in the popup input box, type Registry and open it.

    • Enable the option ide.browser.jcef.enabled.

    • Disable the option ide.browser.jcef.sandbox.enable.

    莫3@1x (70)

  2. Configure IDE Runtime: Select Help > Find Action.., type Choose Boot Runtime for the IDE in the chat box and open it. Select a newer JCEF Runtime version, and then confirm. 莫3@1x (72)

  3. Restart the IDE.

4. MCP service list cannot load

The service list continuously shows loading.

  1. Restart the IDE.

  2. If the problem persists, try manually starting the Lingma service:

    Windows

    Go to directory: .lingma/bin/x.x.x/CPU architecture_64_system/

    Execute command:

    Lingma.exe start

    macOS

    1. Click the Apple icon in the upper-left corner of the computer, select About This Mac to check the processor model, and then go to the corresponding directory:

      1. m1 chip: /.lingma/bin/x.x.x/aarch64_darwin/Lingma

      2. intel chip: /.lingma/bin/x.x.x/x86_64_darwin/Lingma

    2. Execute this command:

    Lingma start
  3. After startup, click the logon button to try again.