@cloudbase/cloudbase-mcp 1.0.5 → 1.0.6

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.
@@ -24,11 +24,23 @@ export function registerHostingTools(server) {
24
24
  files,
25
25
  ignore
26
26
  });
27
+ // 获取环境信息
28
+ const envInfo = await cloudbase.env.getEnvInfo();
29
+ // 获取静态网站地址
30
+ let staticDomain = "";
31
+ if (envInfo?.EnvInfo?.StaticStorages && envInfo.EnvInfo.StaticStorages.length > 0) {
32
+ staticDomain = envInfo.EnvInfo.StaticStorages[0].StaticDomain;
33
+ }
27
34
  return {
28
35
  content: [
29
36
  {
30
37
  type: "text",
31
- text: JSON.stringify(result, null, 2)
38
+ text: JSON.stringify({
39
+ uploadResult: result,
40
+ staticWebsiteUrl: staticDomain ? `https://${staticDomain}` : "",
41
+ // 返回文件的完整访问URL
42
+ fileUrl: staticDomain && cloudPath ? `https://${staticDomain}/${cloudPath}` : ""
43
+ }, null, 2)
32
44
  }
33
45
  ]
34
46
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cloudbase-mcp",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "腾讯云开发 MCP Server,支持静态托管/环境查询/",
5
5
  "main": "index.js",
6
6
  "type": "module",