Source: factory.core/ObjMcpClient.py
Generic Model Context Protocol (MCP) client for Axion.
Provides a sync wrapper around the async MCP Python SDK so callers
do not need to manage event loops. Also exposes Playwright-specific
convenience methods for headless browser automation without requiring
...
| Method | Signature | Description |
|---|---|---|
| call_tool | call_tool(command: str, args: list[str], tool_name: str, tool_params: dict) -> dict |
Open a stdio MCP server, call one tool, close the connection. |
| list_tools | list_tools(command: str, args: list[str]) -> list[dict] |
Return the list of tools exposed by the given MCP server. |
| playwright_screenshot | playwright_screenshot(url: str, output_path: str, width: int = 1920, height: int = 1080, headless: bool = True) -> str |
Navigate to url with a headless Playwright browser and save a PNG. |
| playwright_get_text | playwright_get_text(url: str) -> str |
Navigate to url and return the visible text content of the page. |
| playwright_pdf | playwright_pdf(url: str, output_path: str, css_string: str = '', css_url: str = '', headless: bool = True) -> str |
Navigate to url with a headless browser and save a PDF. |
Take a Playwright screenshot and save it to output.
List tools exposed by an MCP server.