mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-03 03:55:12 +00:00
mcp wip
This commit is contained in:
parent
f37974c3b1
commit
64a7e0f120
11 changed files with 573 additions and 212 deletions
19
python/api/mcp_server_get_log.py
Normal file
19
python/api/mcp_server_get_log.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
from python.helpers.api import ApiHandler
|
||||
from flask import Request, Response
|
||||
|
||||
from typing import Any
|
||||
|
||||
from python.helpers.mcp_handler import MCPConfig
|
||||
|
||||
|
||||
class McpServerGetLog(ApiHandler):
|
||||
async def process(self, input: dict[Any, Any], request: Request) -> dict[Any, Any] | Response:
|
||||
|
||||
# try:
|
||||
server_name = input.get("server_name")
|
||||
if not server_name:
|
||||
return {"success": False, "error": "Missing server_name"}
|
||||
log = MCPConfig.get_instance().get_server_log(server_name)
|
||||
return {"success": True, "log": log}
|
||||
# except Exception as e:
|
||||
# return {"success": False, "error": str(e)}
|
||||
Loading…
Add table
Add a link
Reference in a new issue