Skip to main content

MCP

MCP connects Qoder CN IDE agents to external tools and data. This page covers IDE configuration; see plugin settings for JetBrains.

What is MCP?

MCP is an open protocol that standardizes how applications provide context and tools to large language models. It gives models a consistent interface for working with external systems such as APIs, databases, and local tools.

Why use MCP

MCP gives Qoder CN IDE agents a standard interface for connecting to external systems and data sources. Agents can use it to:
  • Retrieve real-time information.
  • Perform actions in external systems.
  • Process structured or unstructured data.

How it works

MCP servers expose capabilities such as functions and data access. Qoder CN IDE discovers and calls tools based on your request and their descriptions. It supports three transports.
  • Standard input/output (STDIO) uses stdin and stdout for local tools and command-line integrations. Set up the runtime required by the server.
  • Server-Sent Events (SSE) uses HTTP POST requests from the client and an event stream from the remote server.
  • Streamable HTTP connects to remote servers over HTTP.

Configure MCP servers

Open MCP settings

  1. Select the user icon in the upper-right corner of Qoder CN IDE and open IDE settings. On macOS, you can also press ⌘ ⇧ ,.
  2. Select MCP Server in the left sidebar.

Option 1: Connect your own MCP server

  1. In My Servers, select Add to open the user-level ~/.qoder-cn/mcp.json.
  2. Add a server entry inside mcpServers and keep existing entries. Use the values supplied by the server provider.
    • Server name: Use the name as the key under mcpServers, such as local-tools or remote-tools. This name identifies the server in the list.
    • Local server (STDIO): Use command for the executable that starts the server and args for the array of arguments in order. Use env if the server requires environment variables.
    • Remote server (SSE or Streamable HTTP): Set url to the MCP endpoint supplied by the server provider. Both transports use url, and Qoder CN IDE detects the transport.
    The example shows a local and a remote server. Add the entries you need and replace the script path and URL with your server's values.
    {
      "mcpServers": {
        "local-tools": {
          "command": "python3",
          "args": ["/absolute/path/to/your_mcp_server.py"]
        },
        "remote-tools": {
          "url": "https://your-mcp-server.example/mcp"
        }
      }
    }
    
  3. Save mcp.json and return to My Servers. Find the new server, check its connection status, and expand it to see the available tools.
Tip: Use Request Timeout in the server details to set how long Qoder CN IDE waits for each MCP request. When the limit is reached, the client stops waiting and displays a timeout message.

Option 2: Use an MCP server from MCP Square

  1. Select the MCP Square tab.
  2. Browse the available servers and select Install on the server you want.
    Note: Some servers require you to configure environment variables such as API_KEY or ACCESS_TOKEN, or to complete authorization as directed by the server provider.
  3. Return to My Servers to confirm installation. Expand the server details to see the available tools.
    Note: If a server fails to start because a dependency is missing, use Quick Fix when available. If the problem persists, install the dependencies as directed by the server provider or see MCP Common Issues.

Use MCP tools

Qoder CN IDE selects MCP tools based on your request and the names and descriptions of the available tools.

Steps

  1. Switch to Agent mode in chat and enter your request. Name the server or tool if you want to use a specific one.
  2. When the IDE asks for confirmation, review the tool name and parameters, then confirm execution.
  3. The result appears in chat. Expand the tool call to inspect its input and output and check whether the task succeeded.
  4. If the agent generates code changes based on the result, review and accept them as needed.

Example scenarios

Scenario 1: Retrieve and process web content (remote MCP via SSE)

Use the Fetch MCP server to retrieve web content and convert HTML to Markdown. Step 1: Get an MCP SSE endpoint If your provider hosts the Fetch server, copy the SSE endpoint URL from the provider. If you don't have an endpoint, install uv and run this command in a terminal to serve Fetch locally over SSE. Keep the terminal running while you try the example.
uvx --python 3.12 --with mcp-server-fetch mcp-proxy --host 127.0.0.1 --port 8766 -- mcp-server-fetch
Step 2: Add the MCP server In Qoder CN IDE settings, go to MCP Server > My Servers, select Add, and enter the following in mcp.json. Keep any existing server entries.
  • Name: fetch, the key under mcpServers.
  • Transport: SSE.
  • Server endpoint: The SSE URL from your provider or the local endpoint started in the previous step.
{
  "mcpServers": {
    "fetch": {
      "type": "sse",
      "url": "http://127.0.0.1:8766/sse"
    }
  }
}
Step 3: Complete the configuration Save the file and return to My Servers. Check the connection status of fetch and expand it to confirm that fetch appears in the tool list. Step 4: Use Fetch in Qoder CN IDE In Agent mode, enter:
Use the Fetch MCP tool fetch to read https://docs.qoder.cn/user-guide/overview-of-chat and summarize this public document.
Expand the fetch/fetch call in chat to check the input URL and the returned Markdown.

Scenario 2: Query city weather (local MCP via STDIO)

Use a local MCP server to get weather forecasts for U.S. cities and weather alerts for individual U.S. states. Step 1: Check prerequisites Run node --version and npx --version in a terminal. Make sure Node.js 18 or later is installed and npx is available. Step 2: Add the MCP server Under MCP Server > My Servers, select Add and add the weather server under mcpServers in mcp.json. Keep any existing entries.
  • Name: weather.
  • Transport: STDIO.
  • Command: npx.
  • Arguments: -y and @h1deya/mcp-server-weather.
{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["-y", "@h1deya/mcp-server-weather"]
    }
  }
}
Step 3: Complete the configuration Save the file and return to My Servers. Check the connection status of weather and expand it to confirm that get-forecast and get-alerts appear in the tool list. Step 4: Use the weather server in Qoder CN IDE In Agent mode, enter:
Use the weather MCP tool get-forecast to check the weather in San Francisco, United States (latitude 37.7749, longitude -122.4194).
Then check active alerts for a state:
Use the weather MCP tool get-alerts to check active weather alerts in California (state code CA).
Expand the tool calls to view the forecast and alert results.

Models and server count

In Agent mode, select a model that supports tool calls. Start with Auto and a simple call, then check the actual tool result. Available models depend on account entitlements and organization policy; see model selection. The current IDE is no longer limited to the old maximum of 10 MCP servers. Enable only the services needed for your task to avoid filling the context with unrelated tools. Connecting a server does not guarantee that every model can use its tools correctly.

MCP FAQ

  • Server disconnected: Check the executable, arguments, and paths, or connectivity to the remote endpoint.
  • Tool missing: Expand the service to confirm it returned a tool list, then check whether it is enabled and whether the selected model supports the call.
  • Timeout: Check the server and network, then adjust the request timeout for the task.
  • Authentication failure: Update credentials as required by the provider and check the organization's MCP access policy.

References