add feature bulding

This commit is contained in:
ext-ensky-jeremy.jj.he
2025-08-29 17:30:00 +08:00
parent 9415c1578b
commit 9cf76a8417
8 changed files with 492 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ mcp = FastMCP(name='FastMCP',host='0.0.0.0',port=8000)
def login_function(username:str, password:str) -> dict :
"""
功能:
使用账号密码调用登陆api进行登陆
接受账号密码调用登陆api,发送调用结果,并展示调用输出
参数:
username:用户的账号,或者是用户名称
password:用户的密码
@@ -16,7 +16,7 @@ def login_function(username:str, password:str) -> dict :
'username':username,
'password':password
}
url = 'http://localhost:8000/api/v1/login/access-token'
url = 'http://192.168.50.11:8000/api/v1/login/access-token'
response = requests.post(url,data=payload)
return response.text
@@ -25,11 +25,15 @@ def login_function(username:str, password:str) -> dict :
def register_function(username:str, password:str):
"""
功能:
注册用户调用注册api进行新用户注册。
注册用户调用注册api进行新用户注册。+
参数:
username:用户的账号,或者是用户名称
password:用户的密码
"""
if __name__=='__main__':
mcp.run(transport='streamable-http')