luma-mcp 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +0 -17
- package/CHANGELOG.md +21 -0
- package/README.md +5 -1
- package/build/image-processor.d.ts.map +1 -1
- package/build/image-processor.js +33 -17
- package/build/image-processor.js.map +1 -1
- package/build/prompts.d.ts +1 -1
- package/build/prompts.d.ts.map +1 -1
- package/build/prompts.js +14 -28
- package/build/prompts.js.map +1 -1
- package/minimax_coding_plan_mcp-0.0.2/.env.test +4 -0
- package/minimax_coding_plan_mcp-0.0.2/LICENSE +21 -0
- package/minimax_coding_plan_mcp-0.0.2/PKG-INFO +200 -0
- package/minimax_coding_plan_mcp-0.0.2/README.md +143 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_coding_plan_mcp.egg-info/PKG-INFO +200 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_coding_plan_mcp.egg-info/SOURCES.txt +17 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_coding_plan_mcp.egg-info/dependency_links.txt +1 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_coding_plan_mcp.egg-info/entry_points.txt +2 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_coding_plan_mcp.egg-info/requires.txt +20 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_coding_plan_mcp.egg-info/top_level.txt +1 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_mcp/__init__.py +3 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_mcp/__main__.py +99 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_mcp/__pycache__/__init__.cpython-313.pyc +0 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_mcp/__pycache__/client.cpython-313.pyc +0 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_mcp/__pycache__/const.cpython-313.pyc +0 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_mcp/__pycache__/exceptions.cpython-313.pyc +0 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_mcp/__pycache__/utils.cpython-313.pyc +0 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_mcp/client.py +104 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_mcp/const.py +4 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_mcp/exceptions.py +24 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_mcp/server.py +169 -0
- package/minimax_coding_plan_mcp-0.0.2/minimax_mcp/utils.py +101 -0
- package/minimax_coding_plan_mcp-0.0.2/pyproject.toml +59 -0
- package/minimax_coding_plan_mcp-0.0.2/setup.cfg +4 -0
- package/minimax_coding_plan_mcp-0.0.2/setup.py +6 -0
- package/minimax_coding_plan_mcp-0.0.2/test_at_prefix.py +134 -0
- package/minimax_coding_plan_mcp-0.0.2/test_real_image.py +153 -0
- package/package.json +1 -1
|
@@ -17,18 +17,6 @@ jobs:
|
|
|
17
17
|
with:
|
|
18
18
|
fetch-depth: 0
|
|
19
19
|
|
|
20
|
-
- name: Setup Node.js
|
|
21
|
-
uses: actions/setup-node@v4
|
|
22
|
-
with:
|
|
23
|
-
node-version: '18'
|
|
24
|
-
registry-url: 'https://registry.npmjs.org'
|
|
25
|
-
|
|
26
|
-
- name: Install dependencies
|
|
27
|
-
run: npm ci
|
|
28
|
-
|
|
29
|
-
- name: Build
|
|
30
|
-
run: npm run build
|
|
31
|
-
|
|
32
20
|
- name: Extract version from tag
|
|
33
21
|
id: version
|
|
34
22
|
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
|
@@ -59,8 +47,3 @@ jobs:
|
|
|
59
47
|
prerelease: false
|
|
60
48
|
env:
|
|
61
49
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
62
|
-
|
|
63
|
-
- name: Publish to npm
|
|
64
|
-
run: npm publish --access public
|
|
65
|
-
env:
|
|
66
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.2.2] - 2025-11-20
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- ✨ **@ 路径支持**: 自动处理 Claude Code 的 @ 文件引用前缀,修复第一次调用失败的问题
|
|
9
|
+
- 📝 **智能 Prompt**: 通用请求自动添加详细指引,保证全面分析
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- 🔧 **Prompt 统一**: 简化为单一通用 prompt,智能处理不同场景
|
|
13
|
+
- ✨ **表述优化**: 融合 Minimax 的经典表述,强调“不遗漏细节”和“完整提取”
|
|
14
|
+
- 📚 **文档更新**: 更新项目结构,添加 qwen-client.ts 和测试文件
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- 🐛 **@ 路径问题**: 修复 Claude Code 中 `@folder/image.png` 导致的路径错误
|
|
18
|
+
- 🐛 **编译错误**: 修复 image-processor.ts 中重复声明的变量
|
|
19
|
+
|
|
20
|
+
### Technical Details
|
|
21
|
+
- 新增 `stripAtPrefix()` 函数处理 Claude Code 的文件引用语法
|
|
22
|
+
- 简化 `buildAnalysisPrompt()` 从两套逻辑到单一逻辑
|
|
23
|
+
- 添加智能请求检测,自动补充详细分析指引
|
|
24
|
+
- 在 minimax_mcp 上验证修复,真实 API 测试通过
|
|
25
|
+
|
|
5
26
|
## [1.2.1] - 2025-11-18
|
|
6
27
|
|
|
7
28
|
### Changed
|
package/README.md
CHANGED
|
@@ -412,13 +412,17 @@ luma-mcp/
|
|
|
412
412
|
│ ├── vision-client.ts # 视觉模型客户端接口
|
|
413
413
|
│ ├── zhipu-client.ts # GLM-4.5V API 客户端
|
|
414
414
|
│ ├── siliconflow-client.ts # DeepSeek-OCR API 客户端
|
|
415
|
+
│ ├── qwen-client.ts # Qwen3-VL API 客户端
|
|
415
416
|
│ ├── image-processor.ts # 图片处理
|
|
416
417
|
│ ├── prompts.ts # 提示词模板
|
|
417
418
|
│ └── utils/
|
|
418
419
|
│ ├── logger.ts # 日志工具
|
|
419
420
|
│ └── helpers.ts # 工具函数
|
|
420
421
|
├── test/
|
|
421
|
-
│
|
|
422
|
+
│ ├── test-local.ts # 本地测试脚本
|
|
423
|
+
│ ├── test-qwen.ts # Qwen 测试脚本
|
|
424
|
+
│ ├── test-deepseek-raw.ts # DeepSeek 原始测试脚本
|
|
425
|
+
│ └── test-data-uri.ts # Data URI 测试脚本
|
|
422
426
|
├── docs/
|
|
423
427
|
│ ├── design.md # 设计文档
|
|
424
428
|
│ ├── installation.md # 安装指南
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-processor.d.ts","sourceRoot":"","sources":["../src/image-processor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"image-processor.d.ts","sourceRoot":"","sources":["../src/image-processor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA0CH;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA+CpG;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkCtE"}
|
package/build/image-processor.js
CHANGED
|
@@ -27,18 +27,32 @@ function estimateBytesFromDataUri(input) {
|
|
|
27
27
|
return 0;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* 移除 Claude Code 的 @ 路径前缀
|
|
32
|
+
*/
|
|
33
|
+
function stripAtPrefix(path) {
|
|
34
|
+
// Claude Code 使用 @ 作为文件引用的语法糖
|
|
35
|
+
if (path.startsWith('@')) {
|
|
36
|
+
const stripped = path.substring(1);
|
|
37
|
+
logger.debug('Stripped @ prefix from path', { original: path, stripped });
|
|
38
|
+
return stripped;
|
|
39
|
+
}
|
|
40
|
+
return path;
|
|
41
|
+
}
|
|
30
42
|
/**
|
|
31
43
|
* 验证图片来源(文件或URL)
|
|
32
44
|
*/
|
|
33
45
|
export async function validateImageSource(imageSource, maxSizeMB = 10) {
|
|
46
|
+
// 首先移除可能的 @ 前缀
|
|
47
|
+
const cleanSource = stripAtPrefix(imageSource);
|
|
34
48
|
// 如果是 Data URI,则验证 mime 与大小后直接返回
|
|
35
|
-
if (isDataUri(
|
|
36
|
-
const mime = getMimeFromDataUri(
|
|
49
|
+
if (isDataUri(cleanSource)) {
|
|
50
|
+
const mime = getMimeFromDataUri(cleanSource);
|
|
37
51
|
const allowed = ['image/png', 'image/jpeg', 'image/jpg', 'image/webp', 'image/gif'];
|
|
38
52
|
if (!mime || !allowed.includes(mime)) {
|
|
39
53
|
throw new Error(`Unsupported data URI mimeType: ${mime || 'unknown'}. Supported: ${allowed.join(', ')}`);
|
|
40
54
|
}
|
|
41
|
-
const bytes = estimateBytesFromDataUri(
|
|
55
|
+
const bytes = estimateBytesFromDataUri(cleanSource);
|
|
42
56
|
const sizeMB = bytes / (1024 * 1024);
|
|
43
57
|
if (sizeMB > maxSizeMB) {
|
|
44
58
|
throw new Error(`Image data URI too large: ${sizeMB.toFixed(2)}MB (max: ${maxSizeMB}MB)`);
|
|
@@ -46,20 +60,20 @@ export async function validateImageSource(imageSource, maxSizeMB = 10) {
|
|
|
46
60
|
logger.debug('Image source is data URI, validated', { mime, sizeMB: sizeMB.toFixed(2) });
|
|
47
61
|
return;
|
|
48
62
|
}
|
|
49
|
-
// 如果是URL,直接返回
|
|
50
|
-
if (isUrl(
|
|
51
|
-
logger.debug('Image source is URL, skipping validation', { imageSource });
|
|
63
|
+
// 如果是 URL,直接返回
|
|
64
|
+
if (isUrl(cleanSource)) {
|
|
65
|
+
logger.debug('Image source is URL, skipping validation', { imageSource: cleanSource });
|
|
52
66
|
return;
|
|
53
67
|
}
|
|
54
68
|
// 验证本地文件
|
|
55
69
|
try {
|
|
56
|
-
const stats = await stat(
|
|
70
|
+
const stats = await stat(cleanSource);
|
|
57
71
|
const fileSizeMB = stats.size / (1024 * 1024);
|
|
58
72
|
if (fileSizeMB > maxSizeMB) {
|
|
59
73
|
throw new Error(`Image file too large: ${fileSizeMB.toFixed(2)}MB (max: ${maxSizeMB}MB)`);
|
|
60
74
|
}
|
|
61
75
|
// 验证文件格式
|
|
62
|
-
const ext =
|
|
76
|
+
const ext = cleanSource.toLowerCase().split('.').pop();
|
|
63
77
|
const supportedFormats = ['jpg', 'jpeg', 'png', 'webp', 'gif'];
|
|
64
78
|
if (!ext || !supportedFormats.includes(ext)) {
|
|
65
79
|
throw new Error(`Unsupported image format: ${ext}. Supported: ${supportedFormats.join(', ')}`);
|
|
@@ -67,7 +81,7 @@ export async function validateImageSource(imageSource, maxSizeMB = 10) {
|
|
|
67
81
|
}
|
|
68
82
|
catch (error) {
|
|
69
83
|
if (error.code === 'ENOENT') {
|
|
70
|
-
throw new Error(`Image file not found: ${
|
|
84
|
+
throw new Error(`Image file not found: ${cleanSource}`);
|
|
71
85
|
}
|
|
72
86
|
throw error;
|
|
73
87
|
}
|
|
@@ -77,18 +91,20 @@ export async function validateImageSource(imageSource, maxSizeMB = 10) {
|
|
|
77
91
|
*/
|
|
78
92
|
export async function imageToBase64(imagePath) {
|
|
79
93
|
try {
|
|
94
|
+
// 首先移除可能的 @ 前缀
|
|
95
|
+
const cleanPath = stripAtPrefix(imagePath);
|
|
80
96
|
// 如果是 Data URI,直接返回(已是 data:*;base64, 格式)
|
|
81
|
-
if (isDataUri(
|
|
97
|
+
if (isDataUri(cleanPath)) {
|
|
82
98
|
logger.info('Using data URI image');
|
|
83
|
-
return
|
|
99
|
+
return cleanPath;
|
|
84
100
|
}
|
|
85
|
-
// 如果是URL,直接返回
|
|
86
|
-
if (isUrl(
|
|
87
|
-
logger.info('Using remote image URL', { url:
|
|
88
|
-
return
|
|
101
|
+
// 如果是 URL,直接返回
|
|
102
|
+
if (isUrl(cleanPath)) {
|
|
103
|
+
logger.info('Using remote image URL', { url: cleanPath });
|
|
104
|
+
return cleanPath;
|
|
89
105
|
}
|
|
90
106
|
// 本地文件:读取并编码
|
|
91
|
-
let imageBuffer = await readFile(
|
|
107
|
+
let imageBuffer = await readFile(cleanPath);
|
|
92
108
|
// 检查文件大小,如果超过 2MB 则压缩
|
|
93
109
|
if (imageBuffer.length > 2 * 1024 * 1024) {
|
|
94
110
|
logger.info('Compressing large image', { originalSize: `${(imageBuffer.length / (1024 * 1024)).toFixed(2)}MB` });
|
|
@@ -96,7 +112,7 @@ export async function imageToBase64(imagePath) {
|
|
|
96
112
|
}
|
|
97
113
|
// 转换为 base64
|
|
98
114
|
const base64 = imageBuffer.toString('base64');
|
|
99
|
-
const mimeType = getMimeType(
|
|
115
|
+
const mimeType = getMimeType(cleanPath);
|
|
100
116
|
return `data:${mimeType};base64,${base64}`;
|
|
101
117
|
}
|
|
102
118
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-processor.js","sourceRoot":"","sources":["../src/image-processor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,6CAA6C;AAC7C,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1F,CAAC;AAED,yBAAyB;AACzB,SAAS,kBAAkB,CAAC,KAAa;IACvC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACpD,OAAO,KAAK,C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,MAAM,IAAI,KAAK,CAAC,4BAA4B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;IAC1G,CAAC;AACH,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,aAAa,CAAC,WAAmB;IAC9C,OAAO,KAAK,CAAC,WAAW,CAAC;SACtB,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE;QAClB,GAAG,EAAE,QAAQ;QACb,kBAAkB,EAAE,IAAI;KACzB,CAAC;SACD,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;SACrB,QAAQ,EAAE,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,QAAgB;IACnC,MAAM,GAAG,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IAEpD,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,KAAK,CAAC;QACX,KAAK,MAAM;YACT,OAAO,YAAY,CAAC;QACtB,KAAK,KAAK;YACR,OAAO,WAAW,CAAC;QACrB,KAAK,MAAM;YACT,OAAO,YAAY,CAAC;QACtB,KAAK,KAAK;YACR,OAAO,WAAW,CAAC;QACrB;YACE,OAAO,YAAY,CAAC,CAAC,YAAY;IACrC,CAAC;AACH,CAAC"}
|
package/build/prompts.d.ts
CHANGED
package/build/prompts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAuB9D"}
|
package/build/prompts.js
CHANGED
|
@@ -4,40 +4,26 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* 构建图片分析提示词
|
|
6
6
|
*/
|
|
7
|
-
export function buildAnalysisPrompt(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
export function buildAnalysisPrompt(userPrompt) {
|
|
8
|
+
// 判断是否为通用请求(过于简单或模糊)
|
|
9
|
+
const isGenericRequest = /^(分析|查看|识别|描述|理解|看一下|看看|分析一下|请分析|analyze|describe|view|check)/i.test(userPrompt)
|
|
10
|
+
&& userPrompt.length < 30;
|
|
11
|
+
// 如果是通用请求,添加详细指引
|
|
12
|
+
const finalPrompt = isGenericRequest
|
|
13
|
+
? `请详细分析这张图片的内容,包括图片中的主要元素、文字、场景等所有可见信息。`
|
|
14
|
+
: userPrompt;
|
|
15
|
+
return `
|
|
11
16
|
<image_analysis>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
${question}
|
|
17
|
+
${finalPrompt}
|
|
15
18
|
|
|
16
19
|
分析要求:
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
20
|
-
4.
|
|
21
|
-
5. 具体可执行:如果涉及代码或问题,提供具体的解决方案
|
|
22
|
-
|
|
23
|
-
请开始分析:
|
|
24
|
-
</image_analysis>
|
|
25
|
-
`.trim();
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
// 没有问题时,通用描述
|
|
29
|
-
return `
|
|
30
|
-
<image_analysis>
|
|
31
|
-
请详细描述这张图片的内容,包括:
|
|
32
|
-
|
|
33
|
-
1. **主要内容**:图片展示了什么
|
|
34
|
-
2. **关键元素**:重要的视觉元素、文字、符号
|
|
35
|
-
3. **布局结构**:元素的组织和排列
|
|
36
|
-
4. **文字内容**:提取所有可见文字
|
|
20
|
+
1. **系统性观察**:从整体到细节,全面观察图片内容(不遗漏任何细节)
|
|
21
|
+
2. **准确识别**:精确识别并完整提取所有文字、符号、代码、数字等
|
|
22
|
+
3. **结构化输出**:使用清晰的标题和列表组织信息
|
|
23
|
+
4. **具体可执行**:如果涉及问题或代码,提供具体的解决方案
|
|
37
24
|
|
|
38
25
|
请用中文清晰描述。
|
|
39
26
|
</image_analysis>
|
|
40
27
|
`.trim();
|
|
41
|
-
}
|
|
42
28
|
}
|
|
43
29
|
//# sourceMappingURL=prompts.js.map
|
package/build/prompts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAkB;IACpD,qBAAqB;IACrB,MAAM,gBAAgB,GAAG,gEAAgE,CAAC,IAAI,CAAC,UAAU,CAAC;WACrG,UAAU,CAAC,MAAM,GAAG,EAAE,CAAC;IAE5B,iBAAiB;IACjB,MAAM,WAAW,GAAG,gBAAgB;QAClC,CAAC,CAAC,uCAAuC;QACzC,CAAC,CAAC,UAAU,CAAC;IAEf,OAAO;;EAEP,WAAW;;;;;;;;;;CAUZ,CAAC,IAAI,EAAE,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# Test environment variables
|
|
2
|
+
# Replace with your actual API key
|
|
3
|
+
MINIMAX_API_KEY=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJHcm91cE5hbWUiOiJKb2NoZW4iLCJVc2VyTmFtZSI6IkpvY2hlbiIsIkFjY291bnQiOiIiLCJTdWJqZWN0SUQiOiIxOTgzMDI4NDA1MDA3ODE4OTQ3IiwiUGhvbmUiOiIxODk4MDkwNTM3MCIsIkdyb3VwSUQiOiIxOTgzMDI4NDA0OTk5NDMwMzM5IiwiUGFnZU5hbWUiOiIiLCJNYWlsIjoiIiwiQ3JlYXRlVGltZSI6IjIwMjUtMTEtMTQgMTk6NTc6NTMiLCJUb2tlblR5cGUiOjQsImlzcyI6Im1pbmltYXgifQ.KTbvW9BShdS-nr9PWih_8haNleDcKLezSdXpyFGGa5Y3JJvQp8cGFIMPgS3ZtGOVhwCY-iM1N6p1bSACeTurXqlqxKVtanDgil43h_MKBr-cHrPrNMWwkSQiY9bYXVMjqxWxZY6pEWMDOAMcoAKQPGDXWVFV1YAHJYmLrpx_c8swBhYLtYQQfIb8z52qwyqUskh9WJ7AxF17g0jDCbITEg-gZRSQZySmDe8n9bS1b_jRIvjF35DayyQ_mJ5jYvaHRijfBXdnTgDNTxvkDH2W8nJ4rkdSKg82cLxwO-MZAMYIQ0HGwcBS_OfHFLmV98aZDd_lT5PSjEEQ2tPxYryDkg
|
|
4
|
+
MINIMAX_API_HOST=https://api.minimaxi.com
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright 2025 MiniMax AI.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: minimax-coding-plan-mcp
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: Specialized MiniMax Model Context Protocol (MCP) server designed for coding-plan users
|
|
5
|
+
Author-email: Roy Wu <zhengyu@minimax.chat>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright 2025 MiniMax AI.
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Keywords: minimax,mcp,web_search,understand-image
|
|
29
|
+
Classifier: Development Status :: 4 - Beta
|
|
30
|
+
Classifier: Intended Audience :: Developers
|
|
31
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
32
|
+
Classifier: Programming Language :: Python :: 3
|
|
33
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
34
|
+
Requires-Python: >=3.10
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
License-File: LICENSE
|
|
37
|
+
Requires-Dist: mcp[cli]>=1.6.0
|
|
38
|
+
Requires-Dist: fastapi>=0.109.2
|
|
39
|
+
Requires-Dist: uvicorn>=0.27.1
|
|
40
|
+
Requires-Dist: python-dotenv>=1.0.1
|
|
41
|
+
Requires-Dist: pydantic>=2.6.1
|
|
42
|
+
Requires-Dist: httpx>=0.28.1
|
|
43
|
+
Requires-Dist: fuzzywuzzy>=0.18.0
|
|
44
|
+
Requires-Dist: python-Levenshtein>=0.25.0
|
|
45
|
+
Requires-Dist: sounddevice>=0.5.1
|
|
46
|
+
Requires-Dist: soundfile>=0.13.1
|
|
47
|
+
Requires-Dist: requests>=2.31.0
|
|
48
|
+
Provides-Extra: dev
|
|
49
|
+
Requires-Dist: pre-commit>=3.6.2; extra == "dev"
|
|
50
|
+
Requires-Dist: ruff>=0.3.0; extra == "dev"
|
|
51
|
+
Requires-Dist: fastmcp>=0.4.1; extra == "dev"
|
|
52
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
53
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
54
|
+
Requires-Dist: twine>=6.1.0; extra == "dev"
|
|
55
|
+
Requires-Dist: build>=1.0.3; extra == "dev"
|
|
56
|
+
Dynamic: license-file
|
|
57
|
+
|
|
58
|
+

|
|
59
|
+
|
|
60
|
+
<div align="center" style="line-height: 1;">
|
|
61
|
+
<a href="https://www.minimax.io" target="_blank" style="margin: 2px; color: var(--fgColor-default);">
|
|
62
|
+
<img alt="Homepage" src="https://img.shields.io/badge/_Homepage-MiniMax-FF4040?style=flat-square&labelColor=2C3E50&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNDkwLjE2IDQxMS43Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9PC9zdHlsZT48L2RlZnM+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjMzLjQ1LDQwLjgxYTE3LjU1LDE3LjU1LDAsMSwwLTM1LjEsMFYzMzEuNTZhNDAuODIsNDAuODIsMCwwLDEtODEuNjMsMFYxNDVhMTcuNTUsMTcuNTUsMCwxLDAtMzUuMDksMHY3OS4wNmE0MC44Miw0MC44MiwwLDAsMS04MS42MywwVjE5NS40MmExMS42MywxMS42MywwLDAsMSwyMy4yNiwwdjI4LjY2YTE3LjU1LDE3LjU1LDAsMCwwLDM1LjEsMFYxNDVBNDAuODIsNDAuODIsMCwwLDEsMTQwLDE0NVYzMzEuNTZhMTcuNTUsMTcuNTUsMCwwLDAsMzUuMSwwVjIxNy41aDBWNDAuODFhNDAuODEsNDAuODEsMCwxLDEsODEuNjIsMFYyODEuNTZhMTEuNjMsMTEuNjMsMCwxLDEtMjMuMjYsMFptMjE1LjksNjMuNEE0MC44Niw0MC44NiwwLDAsMCw0MDguNTMsMTQ1VjMwMC44NWExNy41NSwxNy41NSwwLDAsMS0zNS4wOSwwdi0yNjBhNDAuODIsNDAuODIsMCwwLDAtODEuNjMsMFYzNzAuODlhMTcuNTUsMTcuNTUsMCwwLDEtMzUuMSwwVjMzMGExMS42MywxMS42MywwLDEsMC0yMy4yNiwwdjQwLjg2YTQwLjgxLDQwLjgxLDAsMCwwLDgxLjYyLDBWNDAuODFhMTcuNTUsMTcuNTUsMCwwLDEsMzUuMSwwdjI2MGE0MC44Miw0MC44MiwwLDAsMCw4MS42MywwVjE0NWExNy41NSwxNy41NSwwLDEsMSwzNS4xLDBWMjgxLjU2YTExLjYzLDExLjYzLDAsMCwwLDIzLjI2LDBWMTQ1QTQwLjg1LDQwLjg1LDAsMCwwLDQ0OS4zNSwxMDQuMjFaIi8+PC9zdmc+&logoWidth=20" style="display: inline-block; vertical-align: middle;"/>
|
|
63
|
+
</a>
|
|
64
|
+
<a href="https://arxiv.org/abs/2501.08313" target="_blank" style="margin: 2px;">
|
|
65
|
+
<img alt="Paper" src="https://img.shields.io/badge/📖_Paper-MiniMax--01-FF4040?style=flat-square&labelColor=2C3E50" style="display: inline-block; vertical-align: middle;"/>
|
|
66
|
+
</a>
|
|
67
|
+
<a href="https://chat.minimax.io/" target="_blank" style="margin: 2px;">
|
|
68
|
+
<img alt="Chat" src="https://img.shields.io/badge/_MiniMax_Chat-FF4040?style=flat-square&labelColor=2C3E50&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNDkwLjE2IDQxMS43Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9PC9zdHlsZT48L2RlZnM+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjMzLjQ1LDQwLjgxYTE3LjU1LDE3LjU1LDAsMSwwLTM1LjEsMFYzMzEuNTZhNDAuODIsNDAuODIsMCwwLDEtODEuNjMsMFYxNDVhMTcuNTUsMTcuNTUsMCwxLDAtMzUuMDksMHY3OS4wNmE0MC44Miw0MC44MiwwLDAsMS04MS42MywwVjE5NS40MmExMS42MywxMS42MywwLDAsMSwyMy4yNiwwdjI4LjY2YTE3LjU1LDE3LjU1LDAsMCwwLDM1LjEsMFYxNDVBNDAuODIsNDAuODIsMCwwLDEsMTQwLDE0NVYzMzEuNTZhMTcuNTUsMTcuNTUsMCwwLDAsMzUuMSwwVjIxNy41aDBWNDAuODFhNDAuODEsNDAuODEsMCwxLDEsODEuNjIsMFYyODEuNTZhMTEuNjMsMTEuNjMsMCwxLDEtMjMuMjYsMFptMjE1LjksNjMuNEE0MC44Niw0MC44NiwwLDAsMCw0MDguNTMsMTQ1VjMwMC44NWExNy41NSwxNy41NSwwLDAsMS0zNS4wOSwwdi0yNjBhNDAuODIsNDAuODIsMCwwLDAtODEuNjMsMFYzNzAuODlhMTcuNTUsMTcuNTUsMCwwLDEtMzUuMSwwVjMzMGExMS42MywxMS42MywwLDEsMC0yMy4yNiwwdjQwLjg2YTQwLjgxLDQwLjgxLDAsMCwwLDgxLjYyLDBWNDAuODFhMTcuNTUsMTcuNTUsMCwwLDEsMzUuMSwwdjI2MGE0MC44Miw0MC44MiwwLDAsMCw4MS42MywwVjE0NWExNy41NSwxNy41NSwwLDEsMSwzNS4xLDBWMjgxLjU2YTExLjYzLDExLjYzLDAsMCwwLDIzLjI2LDBWMTQ1QTQwLjg1LDQwLjg1LDAsMCwwLDQ0OS4zNSwxMDQuMjFaIi8+PC9zdmc+&logoWidth=20" style="display: inline-block; vertical-align: middle;"/>
|
|
69
|
+
</a>
|
|
70
|
+
<a href="https://www.minimax.io/platform" style="margin: 2px;">
|
|
71
|
+
<img alt="API" src="https://img.shields.io/badge/⚡_API-Platform-FF4040?style=flat-square&labelColor=2C3E50" style="display: inline-block; vertical-align: middle;"/>
|
|
72
|
+
</a>
|
|
73
|
+
</div>
|
|
74
|
+
<div align="center" style="line-height: 1;">
|
|
75
|
+
<a href="https://huggingface.co/MiniMaxAI" target="_blank" style="margin: 2px;">
|
|
76
|
+
<img alt="Hugging Face" src="https://img.shields.io/badge/🤗_Hugging_Face-MiniMax-FF4040?style=flat-square&labelColor=2C3E50" style="display: inline-block; vertical-align: middle;"/>
|
|
77
|
+
</a>
|
|
78
|
+
<a href="https://github.com/MiniMax-AI/MiniMax-AI.github.io/blob/main/images/wechat-qrcode.jpeg" target="_blank" style="margin: 2px;">
|
|
79
|
+
<img alt="WeChat" src="https://img.shields.io/badge/_WeChat-MiniMax-FF4040?style=flat-square&labelColor=2C3E50" style="display: inline-block; vertical-align: middle;"/>
|
|
80
|
+
</a>
|
|
81
|
+
<a href="https://www.modelscope.cn/organization/MiniMax" target="_blank" style="margin: 2px;">
|
|
82
|
+
<img alt="ModelScope" src="https://img.shields.io/badge/_ModelScope-MiniMax-FF4040?style=flat-square&labelColor=2C3E50" style="display: inline-block; vertical-align: middle;"/>
|
|
83
|
+
</a>
|
|
84
|
+
</div>
|
|
85
|
+
<div align="center" style="line-height: 1;">
|
|
86
|
+
<a href="https://github.com/MiniMax-AI/MiniMax-MCP/blob/main/LICENSE" style="margin: 2px;">
|
|
87
|
+
<img alt="Code License" src="https://img.shields.io/badge/_Code_License-MIT-FF4040?style=flat-square&labelColor=2C3E50" style="display: inline-block; vertical-align: middle;"/>
|
|
88
|
+
</a>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<p align="center">
|
|
92
|
+
Specialized MiniMax Model Context Protocol (MCP) server designed for <a href="https://platform.minimax.io/docs/coding-plan/intro">coding-plan</a> users, featuring AI-powered search and vision analysis APIs optimized for code development workflows. Unlike the standard <a href="https://github.com/MiniMax-AI/MiniMax-MCP">MiniMax-MCP</a>, this version provides coding-specific tools (for examples: <code>web_search</code> and <code>understand_image</code>) that integrate seamlessly with MCP clients like <a href="https://www.anthropic.com/claude">Claude Desktop</a>, <a href="https://www.cursor.so">Cursor</a>, <a href="https://codeium.com/windsurf">Windsurf</a>, <a href="https://github.com/openai/openai-agents-python">OpenAI Agents</a> and others to enhance your coding experience.
|
|
93
|
+
</p>
|
|
94
|
+
|
|
95
|
+
## Documentation
|
|
96
|
+
- [中文文档](README-CN.md)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
## Quickstart with MCP Client
|
|
100
|
+
1. Get your API key from [MiniMax](https://www.minimax.io/platform/user-center/basic-information/interface-key).
|
|
101
|
+
2. Install `uv` (Python package manager), install with `curl -LsSf https://astral.sh/uv/install.sh | sh` or see the `uv` [repo](https://github.com/astral-sh/uv) for additional install methods.
|
|
102
|
+
3. **Important**: The API host and key vary by region and must match; otherwise, you'll encounter an `Invalid API key` error.
|
|
103
|
+
|
|
104
|
+
|Region| Global | Mainland |
|
|
105
|
+
|:--|:-----|:-----|
|
|
106
|
+
|MINIMAX_API_KEY| go get from [MiniMax Global](https://www.minimax.io/platform/user-center/basic-information/interface-key) | go get from [MiniMax](https://platform.minimaxi.com/user-center/basic-information/interface-key) |
|
|
107
|
+
|MINIMAX_API_HOST| https://api.minimax.io | https://api.minimaxi.com |
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### Claude Desktop
|
|
111
|
+
Go to `Claude > Settings > Developer > Edit Config > claude_desktop_config.json` to include the following:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
{
|
|
115
|
+
"mcpServers": {
|
|
116
|
+
"MiniMax": {
|
|
117
|
+
"command": "uvx",
|
|
118
|
+
"args": [
|
|
119
|
+
"minimax-coding-plan-mcp",
|
|
120
|
+
"-y"
|
|
121
|
+
],
|
|
122
|
+
"env": {
|
|
123
|
+
"MINIMAX_API_KEY": "insert-your-api-key-here",
|
|
124
|
+
"MINIMAX_API_HOST": "api host, https://api.minimax.io | https://api.minimaxi.com"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
⚠️ Warning: The API key needs to match the host. If an error "API Error: invalid api key" occurs, please check your api host:
|
|
132
|
+
- Global Host:`https://api.minimax.io`
|
|
133
|
+
- Mainland Host:`https://api.minimaxi.com`
|
|
134
|
+
|
|
135
|
+
If you're using Windows, you will have to enable "Developer Mode" in Claude Desktop to use the MCP server. Click "Help" in the hamburger menu in the top left and select "Enable Developer Mode".
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
### Cursor
|
|
139
|
+
Go to `Cursor -> Preferences -> Cursor Settings -> MCP -> Add new global MCP Server` to add above config.
|
|
140
|
+
|
|
141
|
+
That's it. Your MCP client can now interact with MiniMax through these tools:
|
|
142
|
+
|
|
143
|
+
## Transport
|
|
144
|
+
We support two transport types: stdio and sse.
|
|
145
|
+
| stdio | SSE |
|
|
146
|
+
|:-----|:-----|
|
|
147
|
+
| Run locally | Can be deployed locally or in the cloud |
|
|
148
|
+
| Communication through `stdout` | Communication through `network` |
|
|
149
|
+
| Input: Supports processing `local files` or valid `URL` resources | Input: When deployed in the cloud, it is recommended to use `URL` for input |
|
|
150
|
+
|
|
151
|
+
## Available Tools
|
|
152
|
+
| tool | description |
|
|
153
|
+
|-|-|
|
|
154
|
+
|`web_search`|Performs web searches and returns organic search results along with related search queries|
|
|
155
|
+
|`understand_image`|Analyzes images with AI based on text prompts, extracts information and answers questions about images|
|
|
156
|
+
|
|
157
|
+
## Release Notes
|
|
158
|
+
|
|
159
|
+
### November 20, 2025
|
|
160
|
+
|
|
161
|
+
#### 🆕 What's New
|
|
162
|
+
- **Web Search**: New `web_search` tool - perform web searches and get organic results with related search queries
|
|
163
|
+
- **Vision Language Model**: New `understand_image` tool - analyze images using AI based on text prompts
|
|
164
|
+
|
|
165
|
+
#### 📈 Features
|
|
166
|
+
- `web_search` - Search the web and get structured results including titles, links, snippets, and related searches
|
|
167
|
+
- `understand_image` - Analyze images from URLs or local files, supporting JPEG, PNG, and WebP formats
|
|
168
|
+
|
|
169
|
+
## FAQ
|
|
170
|
+
### 1. invalid api key
|
|
171
|
+
Please ensure your API key and API host are regionally aligned
|
|
172
|
+
|Region| Global | Mainland |
|
|
173
|
+
|:--|:-----|:-----|
|
|
174
|
+
|MINIMAX_API_KEY| go get from [MiniMax Global](https://www.minimax.io/platform/user-center/basic-information/interface-key) | go get from [MiniMax](https://platform.minimaxi.com/user-center/basic-information/interface-key) |
|
|
175
|
+
|MINIMAX_API_HOST| https://api.minimax.io | https://api.minimaxi.com |
|
|
176
|
+
|
|
177
|
+
### 2. spawn uvx ENOENT
|
|
178
|
+
Please confirm its absolute path by running this command in your terminal:
|
|
179
|
+
```sh
|
|
180
|
+
which uvx
|
|
181
|
+
```
|
|
182
|
+
Once you obtain the absolute path (e.g., /usr/local/bin/uvx), update your configuration to use that path (e.g., "command": "/usr/local/bin/uvx").
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
## Example usage
|
|
187
|
+
|
|
188
|
+
⚠️ Warning: Using these tools may incur costs.
|
|
189
|
+
|
|
190
|
+
### 1. Web Search
|
|
191
|
+
Use the `web_search` tool to search for information on the web:
|
|
192
|
+
|
|
193
|
+
<img src="https://cdn.hailuoai.video/moss/prod/2025-11-20-15/user/multi_chat_file/99ff15e3-e5d6-48e2-8216-38c6abf03c71.image/png" style="display:
|
|
194
|
+
inline-block; vertical-align: middle; "/>
|
|
195
|
+
|
|
196
|
+
### 2. Image Analysis
|
|
197
|
+
Use the `understand_image` tool to analyze images with AI:
|
|
198
|
+
|
|
199
|
+
<img src="https://cdn.hailuoai.video/moss/prod/2025-11-20-15/user/multi_chat_file/1f8174a2-68d5-4576-b886-86933eab5280.image/png" style="display:
|
|
200
|
+
inline-block; vertical-align: middle; "/>
|