> ## Documentation Index
> Fetch the complete documentation index at: https://platform.minimaxi.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# M Plan MCP

> M Plan MCP 提供了两个专属工具：**网络搜索** 和  **图片理解**，帮助开发者在编码过程中快速获取信息和理解图片内容。 

> [!TIP]
>
> 推荐使用 [MiniMax CLI](https://platform.minimaxi.com/docs/m-plan/minimax-cli.md) 替代 MCP，配置更简单、使用更高效。

## 工具说明

> [accordion] web\_search
>
> 根据搜索查询词进行网络搜索，返回搜索结果和相关搜索建议。
>
> | 参数 | 类型 | 必需 | 说明 |
> | :- | :- | :-: | :- |
> | query | string | ✓ | 搜索查询词 |

> [accordion] understand\_image
>
> 对图片进行理解和分析，支持多种图片输入方式。
>
> | 参数 | 类型 | 必需 | 说明 |
> | :- | :- | :-: | :- |
> | prompt | string | ✓ | 对图片的提问或分析要求 |
> | image\_source | string | ✓ | 图片来源，支持 HTTP/HTTPS URL 或本地文件路径 |
>
> **支持格式**：JPEG、PNG、WebP

## 前置准备

**1. 获取 API Key**

访问 [订阅管理 > M Plan](https://platform.minimax.cn/user-center/payment/token-plan) 查看您的订阅 Key。该 Key 需要拥有 M Plan 席位或已购积分权限后，才能使用付费资源。

**2. 安装 uvx**

> [tab] macOS / Linux
>
> ```bash theme={null}
> curl -LsSf https://astral.sh/uv/install.sh | sh
> ```

> [tab] Windows
>
> ```powershell theme={null}
> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
> ```

> [!NOTE]
>
> 其他安装方式可参考 [uv 仓库](https://github.com/astral-sh/uv)。

**3. 验证安装**

> [tab] macOS / Linux
>
> ```bash theme={null}
> which uvx
> ```

> [tab] Windows
>
> ```powershell theme={null}
> (Get-Command uvx).source
> ```

> [!NOTE]
>
> 若正确安装，会显示路径（如 `/usr/local/bin/uvx`）。若报错 `spawn uvx ENOENT`，需配置绝对路径。

## 在 Claude Code 中使用

**1. 下载 Claude Code**

在 [Claude Code 官网](https://www.claude.com/product/claude-code)下载并安装 Claude Code

**2. 配置 MCP**

> [tab] 一键安装
>
> 在终端运行以下命令，将`api_key`替换为您的 API Key：
>
> ```bash theme={null}
> claude mcp add -s user MiniMax --env MINIMAX_API_KEY=api_key --env MINIMAX_API_HOST=https://api.minimax.cn -- uvx minimax-coding-plan-mcp
> ```

> [tab] 手动配置
>
> 编辑配置文件 `~/.claude.json`，添加以下 MCP 配置：
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "MiniMax": {
>       "command": "uvx",
>       "args": ["minimax-coding-plan-mcp"],
>       "env": {
>         "MINIMAX_API_KEY": "MINIMAX_API_KEY",
>         "MINIMAX_API_HOST": "https://api.minimax.cn"
>       }
>     }
>   }
> }
> ```

**3. 验证配置**

进入 Claude Code 后输入 `/mcp`，能看到 `web_search` 和 `understand_image`，说明配置成功。

![](https://filecdn.minimax.chat/public/59a2ac4d-fe8a-42d9-8898-e81aea641622.png)

> [!NOTE]
>
> 如果您在 IDE（如 TRAE）中使用 MCP，还需要在对应 IDE 的 MCP 配置中进行设置

## 在 Cursor 中使用

**1. 下载 Cursor**

通过 [Cursor 官网](https://cursor.com/) 下载并安装 Cursor

**2. 打开 MCP 配置**

打开 `Customize -> MCPs`，点击 `New` 创建 MCP Server

![在 Cursor 中新建 MCP Server](https://filecdn.minimax.chat/public/agent-tool/mcp/cursor-entry/20260904-143832.png)

**3. 添加配置**

在 `mcp.json` 文件中添加以下配置：

```json theme={null}
{
  "mcpServers": {
    "MiniMax": {
      "command": "uvx",
      "args": ["minimax-coding-plan-mcp"],
      "env": {
        "MINIMAX_API_KEY": "填写你的 API Key",
        "MINIMAX_API_HOST": "https://api.minimax.cn"
      }
    }
  }
}
```

## 在 OpenCode 中使用

**1. 下载 OpenCode**

通过 [OpenCode 官网](https://opencode.ai/) 下载并安装 OpenCode

**2. 配置 MCP**

编辑配置文件 `~/.config/opencode/opencode.json`，添加以下 MCP 配置：

```json theme={null}
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "MiniMax": {
      "type": "local",
      "command": ["uvx", "minimax-coding-plan-mcp"],
      "environment": {
        "MINIMAX_API_KEY": "MINIMAX_API_KEY",
        "MINIMAX_API_HOST": "https://api.minimax.cn"
      },
      "enabled": true
    }
  }
}
```

**3. 验证配置**

进入 OpenCode 后，输入 `/mcp`，能看到 `MiniMax connected`，说明配置成功。

![](https://filecdn.minimax.chat/public/1a24c300-4cff-40ee-a428-869467074c1d.png)
