MCPcopy
hub / github.com/1Panel-dev/MaxKB / validate_mcp_transport

Method validate_mcp_transport

apps/common/utils/tool_code.py:381–385  ·  view source on GitHub ↗
(self, code_str)

Source from the content-addressed store, hash-verified

379 raise Exception(_(f"Process execution timed out after {_process_limit_timeout_seconds} seconds."))
380
381 def validate_mcp_transport(self, code_str):
382 servers = json.loads(code_str)
383 for server, config in servers.items():
384 if config.get("transport") not in ["sse", "streamable_http"]:
385 raise Exception(_("Only support transport=sse or transport=streamable_http"))
386
387
388@contextmanager

Callers 8

insertMethod · 0.80
test_connectionMethod · 0.80
editMethod · 0.80
import_Method · 0.80
_handle_mcp_requestMethod · 0.80
executeMethod · 0.80
_handle_mcp_requestMethod · 0.80
editMethod · 0.80

Calls 1

getMethod · 0.45

Tested by 1

test_connectionMethod · 0.64