MCP FAQ

更新时间:
复制 MD 格式

This topic describes common errors that occur when you install and run the MCP service. It provides solutions and troubleshooting steps for issues such as missing command environments, service initialization failures, and configuration errors.

Service addition or installation errors

1. Missing environment for the npx command

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

  • Solution: Download and install Node.js.

Warning

Node.js must be version 18 or later, and npm must be version 8 or later. Earlier versions might cause tool calls to fail.

  • Visit the Node.js official website to download and install Node.js 18 or a later version, or follow these steps:

    Installation and verification steps

    Windows

    1. Download and install nvm-windows to manage multiple versions.

    nvm install 22.14.0  # Install a specific version
    nvm use 22.14.0

    2. After the installation is complete, run the following command in the terminal to verify the installation.

    node -v
    npx -v

    3. If the installation is successful, the terminal displays the installed Node.js version number.

    macOS

    Download and install Node.js using Homebrew. You must first install Homebrew.

    # 1. Install or update Homebrew<p># 1. Update Homebrew and install Node.js</p>
    brew update
    brew install node
    
    # 2. Verify the core toolchain
    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. Missing environment for the uvx command

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

  • Solution: Install uv. uvx is a command-line interface provided by uv for running Python scripts quickly.

    • Go to the Python official website to download and install Python 3.8 or a later version, or follow these steps:

      Installation and verification steps

      1. Download and install

      Windows system

      On Windows, run the following command to install.

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

      macOS

      On macOS and Linux, run the following command to install.

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

      2. After the installation is complete, run the following command in the terminal to verify the installation.

      uv --version

      3. If the installation is successful, the terminal displays the installed uv version number.

3. Failed to initialize MCP Client

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

  • Possible causes:

    • Incorrect service parameter settings: The MCP service parameters are incorrect, which prevents service initialization.

    • Resource pull failure: The installation fails because network issues prevent resources from being pulled.

    • Network security restrictions: The MCP service fails to initialize because it is blocked by internal corporate security software.

  • Troubleshooting steps:

1. Click to copy the full command.

莫3@1x (64)

2. Run the command in a terminal to obtain detailed error information.

莫3@1x (67)

3. Analyze the error message and apply the corresponding fix.

Common issue 1: Configuration error

In the error example, the message shows that the connection failed because the Redis connection URL is incorrect. To resolve this issue, check and correct the URL configuration by editing the MCP service.

Common issue 2: Resource pull failure

If the command fails to run because of a resource pull failure, run the following command to add a traffic mirror source. Then, restart the Lingma process and try again.

Windows system

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

macOS

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

Common issue 3: Node.js is blocked by security software

Based on the security software's blocking notification, authorize the Node.js process or add its executable files to an allowlist.

Tool usage issues

Note

If you encounter issues with services from the MCP Marketplace, contact the ModelScope community for technical support.

ModelScope Developer Group (DingTalk group number: 44837352)

1. Tool execution fails due to incorrect environment variables or parameters

  • Troubleshooting steps:

If an MCP tool call fails or returns an unexpected result, first expand the tool call details to view the specific error message. Then, analyze the message to troubleshoot the issue.

Important

For some MCP services, such as Mastergo and Figma, key authentication information like an API_KEY or TOKEN is included in the parameters (args).

After you install these services from the MCP Marketplace, you must still configure these parameters manually.

莫3@1x (62)

  • Solution:

  1. Go to the My Services page.

  2. Find the MCP service and click Edit.

  3. In the service configuration, view the parameters (args) section.

  4. Replace the variables that need to be updated or filled in. Make sure the information is correct. Then, reconnect to the service and try the call again.

莫3@1x (68)

2. The model cannot call MCP tools

  • Confirm that you are in Agent mode.

    Important

    If no project folder is open, the system enters AI Chat mode and cannot call MCP tools. First, load the corresponding project folder and switch to Agent mode.

  • Confirm that the MCP service is in the Connected state:

If the service connection is interrupted, click the image icon on the right side of the interface. The system automatically tries to restart the MCP service.

莫3@1x (66)

  • Suggestion: Avoid using similar names for MCP services and their tools. For example, if both TextAnalyzer-Pro and TextAnalyzer-Plus have a tool named fetchText with similar functions, this can cause ambiguity when the model makes a call.

3. Personal Settings and the MCP tool page do not open, and the session panel is blank

This issue occurs when the page is blank and the idea.log file contains the following error message: "WARN - #c.i.u.j.JBCefApp - JCefAppConfig.class is not from a JBR module".

Cause: The default settings in Android Studio do not support JCEF. This prevents pages, such as Personal Settings and the MCP tool page, from loading.

Solution:

  1. Configure JCEF: In the IDE, select Help > Find Action... In the dialog box that appears, enter "Registry" and open it.

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

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

莫3@1x (70)

  1. Configure the IDE Runtime: Select Help > Find Action.. again. In the input box, enter "Choose Boot Runtime for the IDE" and open it. Select a newer JCEF Runtime version and click OK.

  2. Restart the IDE.

莫3@1x (72)

4. The MCP service list fails to load

The service list is stuck in a loading state.

  • Restart the IDE.

  • If the issue persists, you can start the Lingma service manually:

    Windows system

    Navigate to the .lingma/bin/x.x.x/CPU_architecture_64_system/ directory.

    Run the command:

    Lingma.exe start

    macOS

    Click the Apple icon in the upper-left corner of your screen and select About This Mac to view your processor model. Then, navigate to the corresponding directory based on your processor model.

    • M1 chip: /.lingma/bin/x.x.x/aarch64_darwin/Lingma

    • Intel chip: /.lingma/bin/x.x.x/x86_64_darwin/Lingma

    Run the command:

    Lingma start

    After the service starts, click the logon button again.