alibaba-cloud-ops-mcp-server 0.8.0__py3-none-any.whl → 0.8.1b1__py3-none-any.whl
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.
- alibaba_cloud_ops_mcp_server/alibabacloud/utils.py +10 -0
- alibaba_cloud_ops_mcp_server/tools/api_tools.py +2 -5
- alibaba_cloud_ops_mcp_server/tools/cms_tools.py +3 -5
- alibaba_cloud_ops_mcp_server/tools/oos_tools.py +3 -5
- alibaba_cloud_ops_mcp_server/tools/oss_tools.py +6 -4
- {alibaba_cloud_ops_mcp_server-0.8.0.dist-info → alibaba_cloud_ops_mcp_server-0.8.1b1.dist-info}/METADATA +2 -6
- alibaba_cloud_ops_mcp_server-0.8.1b1.dist-info/RECORD +16 -0
- alibaba_cloud_ops_mcp_server-0.8.0.dist-info/RECORD +0 -15
- {alibaba_cloud_ops_mcp_server-0.8.0.dist-info → alibaba_cloud_ops_mcp_server-0.8.1b1.dist-info}/WHEEL +0 -0
- {alibaba_cloud_ops_mcp_server-0.8.0.dist-info → alibaba_cloud_ops_mcp_server-0.8.1b1.dist-info}/entry_points.txt +0 -0
- {alibaba_cloud_ops_mcp_server-0.8.0.dist-info → alibaba_cloud_ops_mcp_server-0.8.1b1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from alibabacloud_credentials.client import Client as CredClient
|
|
2
|
+
from alibabacloud_tea_openapi.models import Config
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def create_config():
|
|
6
|
+
credentialsClient = CredClient()
|
|
7
|
+
a = credentialsClient.get_access_key_id
|
|
8
|
+
config = Config(credential=credentialsClient)
|
|
9
|
+
config.user_agent = 'alibaba-cloud-ops-mcp-server'
|
|
10
|
+
return config
|
|
@@ -11,6 +11,7 @@ from alibabacloud_tea_util import models as util_models
|
|
|
11
11
|
from alibabacloud_tea_openapi.client import Client as OpenApiClient
|
|
12
12
|
from alibabacloud_openapi_util.client import Client as OpenApiUtilClient
|
|
13
13
|
from alibaba_cloud_ops_mcp_server.alibabacloud.api_meta_client import ApiMetaClient
|
|
14
|
+
from alibaba_cloud_ops_mcp_server.alibabacloud.utils import create_config
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
type_map = {
|
|
@@ -24,11 +25,7 @@ type_map = {
|
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
def create_client(service: str, region_id: str) -> OpenApiClient:
|
|
27
|
-
config =
|
|
28
|
-
access_key_id=os.environ['ALIBABA_CLOUD_ACCESS_KEY_ID'],
|
|
29
|
-
access_key_secret=os.environ['ALIBABA_CLOUD_ACCESS_KEY_SECRET'],
|
|
30
|
-
user_agent='alibaba-cloud-ops-mcp-server',
|
|
31
|
-
)
|
|
28
|
+
config = create_config()
|
|
32
29
|
if isinstance(service, str):
|
|
33
30
|
service = service.lower()
|
|
34
31
|
config.endpoint = f'{service}.{region_id}.aliyuncs.com'
|
|
@@ -8,6 +8,7 @@ from alibabacloud_tea_openapi import models as open_api_models
|
|
|
8
8
|
from alibabacloud_cms20190101 import models as cms_20190101_models
|
|
9
9
|
from alibabacloud_tea_util import models as util_models
|
|
10
10
|
from alibabacloud_tea_util.client import Client as UtilClient
|
|
11
|
+
from alibaba_cloud_ops_mcp_server.alibabacloud.utils import create_config
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
END_STATUSES = ['Success', 'Failed', 'Cancelled']
|
|
@@ -15,12 +16,9 @@ END_STATUSES = ['Success', 'Failed', 'Cancelled']
|
|
|
15
16
|
|
|
16
17
|
tools = []
|
|
17
18
|
|
|
19
|
+
|
|
18
20
|
def create_client(region_id: str) -> cms20190101Client:
|
|
19
|
-
config =
|
|
20
|
-
access_key_id=os.environ['ALIBABA_CLOUD_ACCESS_KEY_ID'],
|
|
21
|
-
access_key_secret=os.environ['ALIBABA_CLOUD_ACCESS_KEY_SECRET'],
|
|
22
|
-
user_agent='alibaba-cloud-ops-mcp-server',
|
|
23
|
-
)
|
|
21
|
+
config = create_config()
|
|
24
22
|
config.endpoint = f'metrics.{region_id}.aliyuncs.com'
|
|
25
23
|
return cms20190101Client(config)
|
|
26
24
|
|
|
@@ -7,6 +7,7 @@ import time
|
|
|
7
7
|
from alibabacloud_oos20190601.client import Client as oos20190601Client
|
|
8
8
|
from alibabacloud_tea_openapi import models as open_api_models
|
|
9
9
|
from alibabacloud_oos20190601 import models as oos_20190601_models
|
|
10
|
+
from alibaba_cloud_ops_mcp_server.alibabacloud.utils import create_config
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
END_STATUSES = ['Success', 'Failed', 'Cancelled']
|
|
@@ -14,12 +15,9 @@ END_STATUSES = ['Success', 'Failed', 'Cancelled']
|
|
|
14
15
|
|
|
15
16
|
tools = []
|
|
16
17
|
|
|
18
|
+
|
|
17
19
|
def create_client(region_id: str) -> oos20190601Client:
|
|
18
|
-
config =
|
|
19
|
-
access_key_id=os.environ['ALIBABA_CLOUD_ACCESS_KEY_ID'],
|
|
20
|
-
access_key_secret=os.environ['ALIBABA_CLOUD_ACCESS_KEY_SECRET'],
|
|
21
|
-
user_agent='alibaba-cloud-ops-mcp-server',
|
|
22
|
-
)
|
|
20
|
+
config = create_config()
|
|
23
21
|
config.endpoint = f'oos.{region_id}.aliyuncs.com'
|
|
24
22
|
return oos20190601Client(config)
|
|
25
23
|
|
|
@@ -5,6 +5,8 @@ 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
|
+
from alibabacloud_credentials.client import Client as CredClient
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
tools = []
|
|
@@ -12,10 +14,10 @@ tools = []
|
|
|
12
14
|
|
|
13
15
|
class CredentialsProvider(EnvironmentVariableCredentialsProvider):
|
|
14
16
|
def __init__(self) -> None:
|
|
15
|
-
|
|
16
|
-
access_key_id =
|
|
17
|
-
access_key_secret =
|
|
18
|
-
session_token =
|
|
17
|
+
credentialsClient = CredClient()
|
|
18
|
+
access_key_id = credentialsClient.get_credential().access_key_id
|
|
19
|
+
access_key_secret = credentialsClient.get_credential().access_key_secret
|
|
20
|
+
session_token = credentialsClient.get_credential().security_token
|
|
19
21
|
|
|
20
22
|
self._credentials = Credentials(
|
|
21
23
|
access_key_id, access_key_secret, session_token)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alibaba-cloud-ops-mcp-server
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.1b1
|
|
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
|
|
@@ -17,10 +17,6 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
|
|
18
18
|
[中文版本](./README_zh.md)
|
|
19
19
|
|
|
20
|
-
<a href="https://glama.ai/mcp/servers/@aliyun/alibabacloud-core-mcp-server">
|
|
21
|
-
<img width="380" height="200" src="https://glama.ai/mcp/servers/@aliyun/alibabacloud-core-mcp-server/badge" alt="AlibabaCloud Server MCP server" />
|
|
22
|
-
</a>
|
|
23
|
-
|
|
24
20
|
## Prepare
|
|
25
21
|
|
|
26
22
|
Install [uv](https://github.com/astral-sh/uv)
|
|
@@ -96,7 +92,7 @@ To use `alibaba-cloud-ops-mcp-server` MCP Server with any other MCP Client, you
|
|
|
96
92
|
|
|
97
93
|
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.
|
|
98
94
|
|
|
99
|
-
<img src="https://
|
|
95
|
+
<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">
|
|
100
96
|
|
|
101
97
|
## Know More
|
|
102
98
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
alibaba_cloud_ops_mcp_server/__init__.py,sha256=BaluUNyRz8Qw-X7Y0ywDezwbkqiSvWlSYn2452XeGcA,213
|
|
2
|
+
alibaba_cloud_ops_mcp_server/config.py,sha256=Nq6AT8bqSVa6zu9xjInaSjFcxA-GC7MLlCsV1q53yO0,514
|
|
3
|
+
alibaba_cloud_ops_mcp_server/server.py,sha256=nwn04rpm68GI3UJ_hQ0E3pny86dJ47Lw1LncQiBIfW8,896
|
|
4
|
+
alibaba_cloud_ops_mcp_server/alibabacloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
alibaba_cloud_ops_mcp_server/alibabacloud/api_meta_client.py,sha256=inOmW1no1YsR6_ezOZfgJtzGKo5nRTDufkf2qUTuNOs,7605
|
|
6
|
+
alibaba_cloud_ops_mcp_server/alibabacloud/utils.py,sha256=rcDEioZpT4UHPu1Y1rFKM3Ms_cFPdvPS0824ENt6Uqs,343
|
|
7
|
+
alibaba_cloud_ops_mcp_server/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
alibaba_cloud_ops_mcp_server/tools/api_tools.py,sha256=lydogpHEYgqzLAgUP4szBy-67z7lWXiqwUaTvt_IQVM,5807
|
|
9
|
+
alibaba_cloud_ops_mcp_server/tools/cms_tools.py,sha256=VKj-qxtCWfHTINLaAB34PwfOMzpGH-5HMeQ-MTJSt08,4336
|
|
10
|
+
alibaba_cloud_ops_mcp_server/tools/oos_tools.py,sha256=0NUnLrQjAvf3vaZN0DA3iEFMUpGyi7qNwzL41PzOnM0,9859
|
|
11
|
+
alibaba_cloud_ops_mcp_server/tools/oss_tools.py,sha256=NM8HwZrQzx2uIYsF5bvJ7FoGfSD2ANC0t46ImgpsRWQ,4621
|
|
12
|
+
alibaba_cloud_ops_mcp_server-0.8.1b1.dist-info/METADATA,sha256=2mMDY8ybEIhEldL9dc3OhiOwy_cvs_UHj7N_ZA4OfI8,4035
|
|
13
|
+
alibaba_cloud_ops_mcp_server-0.8.1b1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
14
|
+
alibaba_cloud_ops_mcp_server-0.8.1b1.dist-info/entry_points.txt,sha256=ESGAWXKEp184forhs7VzTD4P1AUdZz6vCW6hRUKITGw,83
|
|
15
|
+
alibaba_cloud_ops_mcp_server-0.8.1b1.dist-info/licenses/LICENSE,sha256=gQgVkp2ttRCjodiPpXZZR-d7JnrYIYNiHk1YDUYgpa4,11331
|
|
16
|
+
alibaba_cloud_ops_mcp_server-0.8.1b1.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
alibaba_cloud_ops_mcp_server/__init__.py,sha256=BaluUNyRz8Qw-X7Y0ywDezwbkqiSvWlSYn2452XeGcA,213
|
|
2
|
-
alibaba_cloud_ops_mcp_server/config.py,sha256=Nq6AT8bqSVa6zu9xjInaSjFcxA-GC7MLlCsV1q53yO0,514
|
|
3
|
-
alibaba_cloud_ops_mcp_server/server.py,sha256=nwn04rpm68GI3UJ_hQ0E3pny86dJ47Lw1LncQiBIfW8,896
|
|
4
|
-
alibaba_cloud_ops_mcp_server/alibabacloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
alibaba_cloud_ops_mcp_server/alibabacloud/api_meta_client.py,sha256=inOmW1no1YsR6_ezOZfgJtzGKo5nRTDufkf2qUTuNOs,7605
|
|
6
|
-
alibaba_cloud_ops_mcp_server/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
alibaba_cloud_ops_mcp_server/tools/api_tools.py,sha256=VvAhlUEqvVj_ccwG17Vmen3QAW6fEP44k94SGPLYDXM,5936
|
|
8
|
-
alibaba_cloud_ops_mcp_server/tools/cms_tools.py,sha256=5IhPtkHSwqLsy7D3lGznovQ94e-XBy6HBE7qLDMoYaQ,4464
|
|
9
|
-
alibaba_cloud_ops_mcp_server/tools/oos_tools.py,sha256=lgjkdM18pi56VQUpK0U37-VfXpvk94N-iKisR33E2SM,9987
|
|
10
|
-
alibaba_cloud_ops_mcp_server/tools/oss_tools.py,sha256=6d_vacAJllwkr74bsWgle8yMzqb_Xr1CPAIr_htFP-I,4451
|
|
11
|
-
alibaba_cloud_ops_mcp_server-0.8.0.dist-info/METADATA,sha256=3ia0azdNXXZK5nPih34ve-c0U9e2jxy6yXdLffB-A4U,4259
|
|
12
|
-
alibaba_cloud_ops_mcp_server-0.8.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
13
|
-
alibaba_cloud_ops_mcp_server-0.8.0.dist-info/entry_points.txt,sha256=ESGAWXKEp184forhs7VzTD4P1AUdZz6vCW6hRUKITGw,83
|
|
14
|
-
alibaba_cloud_ops_mcp_server-0.8.0.dist-info/licenses/LICENSE,sha256=gQgVkp2ttRCjodiPpXZZR-d7JnrYIYNiHk1YDUYgpa4,11331
|
|
15
|
-
alibaba_cloud_ops_mcp_server-0.8.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|