@z_ai/mcp-server 0.0.10 → 0.0.12
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/README.md +15 -8
- package/build/tools/image-analysis.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ZAI MCP Server
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
[中文文档](https://docs.bigmodel.cn//cn/guide/tools/mcp-server) | [English Document](https://docs.z.ai/guides/tools/mcp-server)
|
|
4
4
|
|
|
5
5
|
A Model Context Protocol (MCP) server that provides AI capabilities powered by Z.AI.
|
|
6
6
|
|
|
@@ -8,18 +8,23 @@ A Model Context Protocol (MCP) server that provides AI capabilities powered by Z
|
|
|
8
8
|
|
|
9
9
|
- `Z_AI_MODE` - The platform to use for AI services (default: `ZHIPU`) ZHIPU or ZAI
|
|
10
10
|
- `Z_AI_API_KEY` - Your API key
|
|
11
|
-
|
|
12
|
-
For
|
|
13
|
-
For
|
|
14
|
-
|
|
15
|
-
For ZHIPU, the api base url is `https://open.bigmodel.cn/api/paas/v4/`
|
|
16
|
-
For ZAI, the api base url is `https://api.z.ai/api/paas/v4/`
|
|
11
|
+
|
|
12
|
+
For ZAI: Use ZAI platform https://z.ai/model-api , the api base url is `https://api.z.ai/api/paas/v4/`
|
|
13
|
+
For ZHIPU: Use Zhipu AI platform https://bigmodel.cn , the api base url is `https://open.bigmodel.cn/api/paas/v4/`
|
|
17
14
|
|
|
18
15
|
## Usage
|
|
19
16
|
|
|
20
17
|
### Use this MCP Server in Claude Code
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
It is recommended to use the version Node.js 22+, Claude Code 1.0.100+.
|
|
20
|
+
|
|
21
|
+
For ZAI Use,
|
|
22
|
+
|
|
23
|
+
```shell
|
|
24
|
+
claude mcp add zai-mcp-server --env Z_AI_API_KEY=your_api_key Z_AI_MODE=ZAI -- npx -y @z_ai/mcp-server
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
For ZHIPU Use,
|
|
23
28
|
|
|
24
29
|
```shell
|
|
25
30
|
claude mcp add zai-mcp-server --env Z_AI_API_KEY=your_api_key Z_AI_MODE=ZHIPU -- npx -y @z_ai/mcp-server
|
|
@@ -27,6 +32,8 @@ claude mcp add zai-mcp-server --env Z_AI_API_KEY=your_api_key Z_AI_MODE=ZHIPU --
|
|
|
27
32
|
|
|
28
33
|
### Use this MCP Server in Others MCP Client
|
|
29
34
|
|
|
35
|
+
**Note**: You need to configure `Z_AI_MODE` as `ZAI` or `ZHIPU` depending on the platform.
|
|
36
|
+
|
|
30
37
|
```json
|
|
31
38
|
{
|
|
32
39
|
"mcpServers": {
|
|
@@ -86,7 +86,7 @@ export function registerImageAnalysisTool(server) {
|
|
|
86
86
|
);
|
|
87
87
|
server.tool('analyze_image', 'Analyze an image using advanced AI vision models with comprehensive understanding capabilities. Supports both local files and remote URL. Maximum file size: 5MB', {
|
|
88
88
|
image_source: z.string().describe('Local file path or remote URL to the image (supports PNG, JPG, JPEG)'),
|
|
89
|
-
prompt: z.string().describe('Detailed text prompt
|
|
89
|
+
prompt: z.string().describe('Detailed text prompt. If the task is **front-end code replication**, the prompt you provide must be: "Describe in detail the layout structure, color style, main components, and interactive elements of the website in this image to facilitate subsequent code generation by the model." + your additional requirements. \ For **other tasks**, the prompt you provide must clearly describe what to analyze, extract, or understand from the image.')
|
|
90
90
|
}, async (params) => {
|
|
91
91
|
try {
|
|
92
92
|
// Validate parameters
|