alibaba-cloud-ops-mcp-server 0.8.1b1__tar.gz → 0.8.3__tar.gz

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.
Files changed (24) hide show
  1. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/PKG-INFO +20 -6
  2. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/README.md +19 -5
  3. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/README_zh.md +21 -5
  4. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/pyproject.toml +1 -1
  5. alibaba_cloud_ops_mcp_server-0.8.3/src/alibaba_cloud_ops_mcp_server/alibabacloud/exception.py +46 -0
  6. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/src/alibaba_cloud_ops_mcp_server/alibabacloud/utils.py +0 -1
  7. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/src/alibaba_cloud_ops_mcp_server/tools/cms_tools.py +0 -3
  8. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/src/alibaba_cloud_ops_mcp_server/tools/oos_tools.py +6 -3
  9. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/src/alibaba_cloud_ops_mcp_server/tools/oss_tools.py +1 -1
  10. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/uv.lock +1 -1
  11. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/.gitignore +0 -0
  12. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/LICENSE +0 -0
  13. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/examples/openapi_mcp_quickstart/server.py +0 -0
  14. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/image/Alibaba-Cloud-Ops-MCP-User-Group-en.png +0 -0
  15. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/image/Alibaba-Cloud-Ops-MCP-User-Group-zh.png +0 -0
  16. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/image/alibaba-cloud.png +0 -0
  17. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/src/__init__.py +0 -0
  18. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/src/alibaba_cloud_ops_mcp_server/__init__.py +0 -0
  19. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/src/alibaba_cloud_ops_mcp_server/alibabacloud/__init__.py +0 -0
  20. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/src/alibaba_cloud_ops_mcp_server/alibabacloud/api_meta_client.py +0 -0
  21. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/src/alibaba_cloud_ops_mcp_server/config.py +0 -0
  22. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/src/alibaba_cloud_ops_mcp_server/server.py +0 -0
  23. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/src/alibaba_cloud_ops_mcp_server/tools/__init__.py +0 -0
  24. {alibaba_cloud_ops_mcp_server-0.8.1b1 → alibaba_cloud_ops_mcp_server-0.8.3}/src/alibaba_cloud_ops_mcp_server/tools/api_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alibaba-cloud-ops-mcp-server
3
- Version: 0.8.1b1
3
+ Version: 0.8.3
4
4
  Summary: A MCP server for Alibaba Cloud
5
5
  Author-email: Zheng Dayu <dayu.zdy@alibaba-inc.com>
6
6
  License-File: LICENSE
@@ -13,10 +13,14 @@ Requires-Dist: click>=8.1.8
13
13
  Requires-Dist: mcp[cli]>=1.6.0
14
14
  Description-Content-Type: text/markdown
15
15
 
16
- # alibaba-cloud-ops-mcp-server
16
+ # Alibaba Cloud Ops MCP Server
17
+
18
+ [![GitHub stars](https://img.shields.io/github/stars/aliyun/alibaba-cloud-ops-mcp-server?style=social)](https://github.com/aliyun/alibaba-cloud-ops-mcp-server)
17
19
 
18
20
  [中文版本](./README_zh.md)
19
21
 
22
+ Alibaba Cloud Ops MCP Server is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that provides seamless integration with Alibaba Cloud APIs, enabling AI assistants to operation resources on Alibaba Cloud, supporting ECS, Cloud Monitor, OOS andother widely used cloud products.
23
+
20
24
  ## Prepare
21
25
 
22
26
  Install [uv](https://github.com/astral-sh/uv)
@@ -50,6 +54,20 @@ To use `alibaba-cloud-ops-mcp-server` MCP Server with any other MCP Client, you
50
54
  }
51
55
  ```
52
56
 
57
+ ## MCP Maketplace Integration
58
+
59
+ * [Cline](https://cline.bot/mcp-marketplace)
60
+ * [ModelScope](https://www.modelscope.cn/mcp/servers/@aliyun/alibaba-cloud-ops-mcp-server?lang=en_US)
61
+ * [Lingma](https://lingma.aliyun.com/)
62
+ * [Smithery AI](https://smithery.ai/server/@aliyun/alibaba-cloud-ops-mcp-server)
63
+ * [FC-Function AI](https://cap.console.aliyun.com/template-detail?template=237)
64
+
65
+ ## Know More
66
+
67
+ * [Alibaba Cloud MCP Server is ready to use out of the box!!](https://developer.aliyun.com/article/1661348)
68
+ * [Setup Alibaba Cloud MCP Server on Bailian](https://developer.aliyun.com/article/1662120)
69
+ * [Build your own Alibaba Cloud OpenAPI MCP Server with 10 lines of code](https://developer.aliyun.com/article/1662202)
70
+
53
71
  ## Tools
54
72
 
55
73
  | **Product** | **Tool** | **Function** | **Implematation** | **Status** |
@@ -93,7 +111,3 @@ To use `alibaba-cloud-ops-mcp-server` MCP Server with any other MCP Client, you
93
111
  If you have any questions, please join the [Alibaba Cloud Ops MCP discussion group](https://qr.dingtalk.com/action/joingroup?code=v1,k1,iFxYG4jjLVh1jfmNAkkclji7CN5DSIdT+jvFsLyI60I=&_dt_no_comment=1&origin=11) (DingTalk group: 113455011677) for discussion.
94
112
 
95
113
  <img src="https://oos-public-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/alibaba-cloud-ops-mcp-server/Alibaba-Cloud-Ops-MCP-User-Group-en.png" width="500">
96
-
97
- ## Know More
98
-
99
- - [Alibaba Cloud MCP Server is ready to use out of the box!!](https://developer.aliyun.com/article/1661348)
@@ -1,7 +1,11 @@
1
- # alibaba-cloud-ops-mcp-server
1
+ # Alibaba Cloud Ops MCP Server
2
+
3
+ [![GitHub stars](https://img.shields.io/github/stars/aliyun/alibaba-cloud-ops-mcp-server?style=social)](https://github.com/aliyun/alibaba-cloud-ops-mcp-server)
2
4
 
3
5
  [中文版本](./README_zh.md)
4
6
 
7
+ Alibaba Cloud Ops MCP Server is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that provides seamless integration with Alibaba Cloud APIs, enabling AI assistants to operation resources on Alibaba Cloud, supporting ECS, Cloud Monitor, OOS andother widely used cloud products.
8
+
5
9
  ## Prepare
6
10
 
7
11
  Install [uv](https://github.com/astral-sh/uv)
@@ -35,6 +39,20 @@ To use `alibaba-cloud-ops-mcp-server` MCP Server with any other MCP Client, you
35
39
  }
36
40
  ```
37
41
 
42
+ ## MCP Maketplace Integration
43
+
44
+ * [Cline](https://cline.bot/mcp-marketplace)
45
+ * [ModelScope](https://www.modelscope.cn/mcp/servers/@aliyun/alibaba-cloud-ops-mcp-server?lang=en_US)
46
+ * [Lingma](https://lingma.aliyun.com/)
47
+ * [Smithery AI](https://smithery.ai/server/@aliyun/alibaba-cloud-ops-mcp-server)
48
+ * [FC-Function AI](https://cap.console.aliyun.com/template-detail?template=237)
49
+
50
+ ## Know More
51
+
52
+ * [Alibaba Cloud MCP Server is ready to use out of the box!!](https://developer.aliyun.com/article/1661348)
53
+ * [Setup Alibaba Cloud MCP Server on Bailian](https://developer.aliyun.com/article/1662120)
54
+ * [Build your own Alibaba Cloud OpenAPI MCP Server with 10 lines of code](https://developer.aliyun.com/article/1662202)
55
+
38
56
  ## Tools
39
57
 
40
58
  | **Product** | **Tool** | **Function** | **Implematation** | **Status** |
@@ -78,7 +96,3 @@ To use `alibaba-cloud-ops-mcp-server` MCP Server with any other MCP Client, you
78
96
  If you have any questions, please join the [Alibaba Cloud Ops MCP discussion group](https://qr.dingtalk.com/action/joingroup?code=v1,k1,iFxYG4jjLVh1jfmNAkkclji7CN5DSIdT+jvFsLyI60I=&_dt_no_comment=1&origin=11) (DingTalk group: 113455011677) for discussion.
79
97
 
80
98
  <img src="https://oos-public-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/alibaba-cloud-ops-mcp-server/Alibaba-Cloud-Ops-MCP-User-Group-en.png" width="500">
81
-
82
- ## Know More
83
-
84
- - [Alibaba Cloud MCP Server is ready to use out of the box!!](https://developer.aliyun.com/article/1661348)
@@ -1,5 +1,11 @@
1
- # alibaba-cloud-ops-mcp-server
1
+ # Alibaba Cloud Ops MCP Server
2
+
3
+ [![GitHub stars](https://img.shields.io/github/stars/aliyun/alibaba-cloud-ops-mcp-server?style=social)](https://github.com/aliyun/alibaba-cloud-ops-mcp-server)
4
+
2
5
  [English README](./README.md)
6
+
7
+ Alibaba Cloud MCP Server是一个[模型上下文协议(MCP)](https://modelcontextprotocol.io/introduction)服务器,提供与阿里云API的无缝集成,使AI助手能够操作阿里云上的资源,支持ECS、云监控、OOS等广泛使用的云产品。
8
+
3
9
  ## 准备
4
10
 
5
11
  安装[uv](https://github.com/astral-sh/uv)
@@ -33,6 +39,20 @@ curl -LsSf https://astral.sh/uv/install.sh | sh
33
39
  }
34
40
  ```
35
41
 
42
+ ## MCP市场集成
43
+
44
+ * [Cline](https://cline.bot/mcp-marketplace)
45
+ * [魔搭](https://www.modelscope.cn/mcp/servers/@aliyun/alibaba-cloud-ops-mcp-server)
46
+ * [通义灵码](https://lingma.aliyun.com/)
47
+ * [Smithery AI](https://smithery.ai/server/@aliyun/alibaba-cloud-ops-mcp-server)
48
+ * [FC-Function AI](https://cap.console.aliyun.com/template-detail?template=237)
49
+
50
+ ## 了解更多
51
+
52
+ * [阿里云 MCP Server 开箱即用!](https://developer.aliyun.com/article/1661348)
53
+ * [在百炼平台配置您的自定义阿里云MCP Server](https://developer.aliyun.com/article/1662120)
54
+ * [10行代码,实现你的专属阿里云OpenAPI MCP Server](https://developer.aliyun.com/article/1662202)
55
+
36
56
  ## 功能点(Tool)
37
57
 
38
58
  | **产品** | **工具** | **功能** | **实现方式** | **状态** |
@@ -71,12 +91,8 @@ curl -LsSf https://astral.sh/uv/install.sh | sh
71
91
  | | GetDiskTotalData | 获取磁盘分区总容量指标数据 | API | Done |
72
92
  | | GetDiskUsedData | 获取磁盘分区使用量指标数据 | API | Done |
73
93
 
74
-
75
94
  ## 联系我们
76
95
 
77
96
  如果您有任何疑问,欢迎加入 [Alibaba Cloud Ops MCP 交流群](https://qr.dingtalk.com/action/joingroup?code=v1,k1,iFxYG4jjLVh1jfmNAkkclji7CN5DSIdT+jvFsLyI60I=&_dt_no_comment=1&origin=11) (钉钉群:113455011677) 进行交流。
78
97
 
79
98
  <img src="https://oos-public-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/alibaba-cloud-ops-mcp-server/Alibaba-Cloud-Ops-MCP-User-Group-zh.png" width="500">
80
-
81
- ## 了解更多
82
- - [阿里云 MCP Server 开箱即用!](https://developer.aliyun.com/article/1661348)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "alibaba-cloud-ops-mcp-server"
3
- version = "0.8.1b1"
3
+ version = "0.8.3"
4
4
  description = "A MCP server for Alibaba Cloud"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -0,0 +1,46 @@
1
+ import sys
2
+ import json
3
+ import logging
4
+
5
+ logger = logging.getLogger(__name__)
6
+
7
+
8
+ class AcsException(Exception):
9
+ msg_fmt = 'An unknown exception occurred.'
10
+ status = 500
11
+ code = 'InternalError'
12
+
13
+ def __init__(self, **kwargs):
14
+ self.kwargs = kwargs
15
+
16
+ try:
17
+ self.message = self.msg_fmt.format(**kwargs) if kwargs else self.msg_fmt
18
+ if isinstance(self.message, str):
19
+ self.message = self.message.rstrip('.') + '.'
20
+ except KeyError:
21
+ logger.exception(f'Exception in string format operation: {self.code}, {self.msg_fmt}, {kwargs}')
22
+ for name, value in kwargs.items():
23
+ logger.error(f'{name}: {value}')
24
+
25
+ def __str__(self):
26
+ body = {
27
+ 'Message': self.message,
28
+ 'Code': self.code
29
+ }
30
+ return json.dumps(body)
31
+
32
+ def __deepcopy__(self, memo):
33
+ return self.__class__(**self.kwargs)
34
+
35
+ def __unicode__(self):
36
+ body = {
37
+ 'Message': self.message,
38
+ 'Code': self.code
39
+ }
40
+ return json.dumps(body)
41
+
42
+
43
+ class OOSExecutionFailed(AcsException):
44
+ msg_fmt = 'OOS Execution Failed, reason: {reason}.'
45
+ status = 400
46
+ code = 'Execution.Failed'
@@ -4,7 +4,6 @@ from alibabacloud_tea_openapi.models import Config
4
4
 
5
5
  def create_config():
6
6
  credentialsClient = CredClient()
7
- a = credentialsClient.get_access_key_id
8
7
  config = Config(credential=credentialsClient)
9
8
  config.user_agent = 'alibaba-cloud-ops-mcp-server'
10
9
  return config
@@ -4,10 +4,7 @@ import os
4
4
  import json
5
5
 
6
6
  from alibabacloud_cms20190101.client import Client as cms20190101Client
7
- from alibabacloud_tea_openapi import models as open_api_models
8
7
  from alibabacloud_cms20190101 import models as cms_20190101_models
9
- from alibabacloud_tea_util import models as util_models
10
- from alibabacloud_tea_util.client import Client as UtilClient
11
8
  from alibaba_cloud_ops_mcp_server.alibabacloud.utils import create_config
12
9
 
13
10
 
@@ -5,12 +5,12 @@ import json
5
5
  import time
6
6
 
7
7
  from alibabacloud_oos20190601.client import Client as oos20190601Client
8
- from alibabacloud_tea_openapi import models as open_api_models
9
8
  from alibabacloud_oos20190601 import models as oos_20190601_models
10
9
  from alibaba_cloud_ops_mcp_server.alibabacloud.utils import create_config
10
+ from alibaba_cloud_ops_mcp_server.alibabacloud import exception
11
11
 
12
12
 
13
- END_STATUSES = ['Success', 'Failed', 'Cancelled']
13
+ END_STATUSES = [SUCCESS, FAILED, CANCELLED] = ['Success', 'Failed', 'Cancelled']
14
14
 
15
15
 
16
16
  tools = []
@@ -39,7 +39,10 @@ def _start_execution_sync(region_id: str, template_name: str, parameters: dict):
39
39
  )
40
40
  list_executions_resp = client.list_executions(list_executions_request)
41
41
  status = list_executions_resp.body.executions[0].status
42
- if status in END_STATUSES:
42
+ if status == FAILED:
43
+ status_message = list_executions_resp.body.executions[0].status_message
44
+ raise exception.OOSExecutionFailed(reason=status_message)
45
+ elif status in END_STATUSES:
43
46
  return list_executions_resp.body
44
47
  time.sleep(1)
45
48
  @tools.append
@@ -5,7 +5,6 @@ import alibabacloud_oss_v2 as oss
5
5
  from pydantic import Field
6
6
  from alibabacloud_oss_v2 import Credentials
7
7
  from alibabacloud_oss_v2.credentials import EnvironmentVariableCredentialsProvider
8
- from alibaba_cloud_ops_mcp_server.alibabacloud.utils import create_config
9
8
  from alibabacloud_credentials.client import Client as CredClient
10
9
 
11
10
 
@@ -29,6 +28,7 @@ class CredentialsProvider(EnvironmentVariableCredentialsProvider):
29
28
  def create_client(region_id: str) -> oss.Client:
30
29
  credentials_provider = CredentialsProvider()
31
30
  cfg = oss.config.load_default()
31
+ cfg.user_agent = 'alibaba-cloud-ops-mcp-server'
32
32
  cfg.credentials_provider = credentials_provider
33
33
  cfg.region = region_id
34
34
  return oss.Client(cfg)
@@ -116,7 +116,7 @@ wheels = [
116
116
 
117
117
  [[package]]
118
118
  name = "alibaba-cloud-ops-mcp-server"
119
- version = "0.8.2"
119
+ version = "0.8.3"
120
120
  source = { editable = "." }
121
121
  dependencies = [
122
122
  { name = "alibabacloud-cms20190101" },