Skip to content

Commit 1513487

Browse files
authored
update code
1 parent 42425dc commit 1513487

22 files changed

+1030
-162
lines changed

README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ If you installed via npm (Option 1):
6767
"env": {
6868
"REGION": "your_dataworks_open_api_region_id_here",
6969
"ALIBABA_CLOUD_ACCESS_KEY_ID": "your_alibaba_cloud_access_key_id",
70-
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "your_alibaba_cloud_access_key_secret"
70+
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "your_alibaba_cloud_access_key_secret",
71+
"TOOL_CATEGORIES": "optional_your_tool_categories_here_ex_UTILS"
7172
},
7273
"disabled": false,
7374
"autoApprove": []
@@ -87,8 +88,11 @@ If you built from source (Option 2):
8788
"REGION": "your_dataworks_open_api_region_id_here",
8889
"ALIBABA_CLOUD_ACCESS_KEY_ID": "your_alibaba_cloud_access_key_id",
8990
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "your_alibaba_cloud_access_key_secret",
90-
"NODE_ENV": "development_or_product",
91-
"VERBOSE": "true"
91+
"TOOL_CATEGORIES": "optional_your_tool_categories_here_ex_UTILS",
92+
"NODE_ENV": "optional_development_or_product",
93+
"TOOL_FILE_URI":"if_NODE_ENV_is_development_then_the_tool_path_to_the_tool_file_uri",
94+
"OPEN_API_ENDPOINT": "open_api_endpoint_here",
95+
"VERBOSE": "export_more_logs_when_needed"
9296
},
9397
"disabled": false,
9498
"autoApprove": []
@@ -104,11 +108,31 @@ init variables in your environment:
104108
```env
105109
# DataWorks Configuration
106110
REGION=your_dataworks_open_api_region_id_here
107-
NODE_ENV=development_or_product
108111
ALIBABA_CLOUD_ACCESS_KEY_ID=your_alibaba_cloud_access_key_id
109112
ALIBABA_CLOUD_ACCESS_KEY_SECRET=your_alibaba_cloud_access_key_secret
113+
TOOL_CATEGORIES=optional_your_tool_categories_here_ex_UTILS
114+
NODE_ENV=development_or_product
115+
TOOL_FILE_URI=if_NODE_ENV_is_development_then_the_tool_path_to_the_tool_file_uri
116+
OPEN_API_ENDPOINT=open_api_endpoint_here
117+
VERBOSE=export_more_logs_when_needed
110118
```
111119

120+
### Configuration Description
121+
#### Required
122+
REGION: Open API 使用的地域,如 cn-shanghai、cn-beijing...
123+
ALIBABA_CLOUD_ACCESS_KEY_ID: 阿里云 AK ID,跟阿里云 AK Secret 匹配
124+
ALIBABA_CLOUD_ACCESS_KEY_SECRET: 阿里云 AK Secret,跟阿里云 AK ID 匹配
125+
ALIBABA_CLOUD_CREDENTIALS_URI: DataWorks 个人开发环境使用的认证方式,透过接口获取临时 AK,如果填了上面的 AK ID 与 AK Secret,就不用填这项。
126+
127+
#### Optional
128+
NODE_ENV: development 或 product,当设定为 development 时,DataWorks MCP Tool 列表接口会带上 pre- ,如此链接,Open API endpoint 会带上 pre-。
129+
OPEN_API_ENDPOINT: 更改 Open API 打的 endpoint,如"dataworks.cn-shanghai.aliyuncs.com"。
130+
TOOL_FILE_URI:DataWorks MCP Tool 列表的获取地址,可指定一个 http 地址,没有 http 开头的话就会读本地路径,如 "/Users/xxx/Documents/dev-tools.json"。
131+
MCP_FILE_URI:DataWorks MCP 资源的获取地址,可指定一个 http 地址,没有 http 开头的话就会读本地路径,如 "/Users/xxx/Documents/mcp.json"。
132+
TOOL_CATEGORIES: Tool 分类的白名单,这边写 Open API 的分类,在此接口查看 Category,可多选,透过半符逗号分开,如 空间管理,运维中心,数据开发(新版),UTILS。
133+
TOOL_NAMES: Tool 名字的白名单,这边写 Open API 的名字,可多选,透过半符逗号分开,如 CreateNode,UpdateNode。
134+
VERBOSE: true 或 false,当 API 报错时,会打印出环境变量。
135+
112136
## Project Structure
113137

114138
```

0 commit comments

Comments
 (0)