Skip to content

Update description and other nodes in packages of VEEN and TrafficRoute #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions server/mcp_server_traffic_route/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"keywords": [],
"author": "Kingcean Tuan <[email protected]>",
"description": "The VolcEngine AI components based on model context protocol.",
"description": "The Volcengine DNS routing service that allows users to configure DNS rules to ensure that requests from clients reach the desired service nodes.",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.10.1",
"@release-it/conventional-changelog": "^10.0.0",
Expand All @@ -38,9 +38,5 @@
"@types/node": "^22.14.1",
"typescript": "^5.8.3"
},
"publishConfig": {
"access": "public",
"registry": "https://bnpm.byted.org/"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
4 changes: 2 additions & 2 deletions server/mcp_server_veen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ Use a client to interact with the server:
"mcp-server-veen"
],
"env": {
"VOLC_ACCESSKEY": "<Your-Volcengine-AK>",
"VOLC_SECRETKEY": "<Your-Volcengine-SK>"
"VOLCENGINE_ACCESS_KEY": "Your Volcengine AK",
"VOLCENGINE_SECRET_KEY": "Your Volcengine SK"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions server/mcp_server_veen/README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ uv run mcp-server-veen -t sse
"mcp-server-veen"
],
"env": {
"VOLC_ACCESSKEY": "<Your-Volcengine-AK>",
"VOLC_SECRETKEY": "<Your-Volcengine-SK>"
"VOLCENGINE_ACCESS_KEY": "Your Volcengine AK",
"VOLCENGINE_SECRET_KEY": "Your Volcengine SK"
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions server/mcp_server_veen/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"keywords": [],
"author": "Kingcean Tuan <[email protected]>",
"description": "The VolcEngine AI components based on model context protocol.",
"description": "Apply, configure, and query for Volcengine edge computing nodes, including virtual machines, images, bare metal, and corresponding network configurations.",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.10.1",
"@release-it/conventional-changelog": "^10.0.0",
Expand All @@ -38,9 +38,5 @@
"@types/node": "^22.14.1",
"typescript": "^5.8.3"
},
"publishConfig": {
"access": "public",
"registry": "https://bnpm.byted.org/"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
13 changes: 13 additions & 0 deletions server/mcp_server_veen/python/build/lib/vcloud/base/aksk.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import os

def get_ak():
s = os.getenv("VOLCENGINE_ACCESS_KEY")
if (s is None):
s = os.getenv("VOLCENGINE_ACCESS_KEY_ID")
return s

def get_sk():
s = os.getenv("VOLCENGINE_SECRET_KEY")
if (s is None):
s = os.getenv("VOLCENGINE_SECRET_KEY_SECRET")
return s
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# coding:utf-8
from vcloud.base.base_trait import BaseTrait # Modify it if necessary


class BaseService(BaseTrait):
def __init__(self, region='cn-north-1', ak=None, sk=None, service_info_map=None,):
super().__init__({
'ak': ak,
'sk': sk,
'region': region,
'service_info_map': service_info_map
})

55 changes: 55 additions & 0 deletions server/mcp_server_veen/python/build/lib/vcloud/base/base_trait.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# coding:utf-8
import json
from volcengine.base.Service import Service
from volcengine.const.Const import *
from volcengine.Policy import *
from volcengine.util.Util import *


api_info = {

}


class BaseTrait(Service):
def __init__(self, param=None):
if param is None:
param = {}
self.param = param
region = param.get('region', REGION_CN_NORTH1)
service_info_map= param.get('service_info_map', {})
self.service_info = BaseTrait.get_service_info(region,service_info_map)
self.api_info = BaseTrait.get_api_info()
if param.get('ak', None) and param.get('sk', None):
self.set_ak(param['ak'])
self.set_sk(param['sk'])
super(BaseTrait, self).__init__(self.service_info, self.api_info)

@staticmethod
def get_service_info(region, service_info_map):
service_info = service_info_map.get(region, None)
if not service_info:
raise Exception('BaseService not support region %s' % region)
return service_info

@staticmethod
def get_api_info():
return api_info
def set_api_info(self, api_info):
self.api_info = {**self.api_info, **api_info}
return

def mcp_get(self, action, params={}, doseq=0):
res = self.get(action, params, doseq)
if res == '':
raise Exception("%s: empty response" % action)
res_json = json.loads(json.dumps(res))
return res_json

def mcp_post(self, action, params={}, body={}):
res = self.json(action, params, body)
if res == '':
raise Exception("%s: empty response" % action)
res_json = json.loads(json.dumps(res))
return res_json

Empty file.
14 changes: 14 additions & 0 deletions server/mcp_server_veen/python/build/lib/vcloud/utils/response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
def Error(message: str):
return "API Error: " + message


def HandlerVolcResponse(response: dict):
if (
response
and response.get("ResponseMetadata")
and response["ResponseMetadata"]
and response["ResponseMetadata"].get("Error")
and response["ResponseMetadata"]["Error"]
):
return Error(response["ResponseMetadata"]["Error"]["Message"])
return str(response)
Empty file.
Empty file.
20 changes: 20 additions & 0 deletions server/mcp_server_veen/python/build/lib/vcloud/veen/api/api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from vcloud.base.base_service import BaseService
from .config import *
import os


class VeenedgeAPI(BaseService):

def __init__(self):
if os.getenv("VOLCENGINE_REGION") is None:
region = "cn-north-1"
else:
region = os.getenv("VOLCENGINE_REGION")

super().__init__(
ak=os.getenv("VOLCENGINE_ACCESS_KEY"),
sk=os.getenv("VOLCENGINE_SECRET_KEY"),
region=region,
service_info_map=service_info_map,
)
self.set_api_info(api_info)
Loading