je_web_runner.mcp_server.server
WebRunner MCP server:用 Model Context Protocol (JSON-RPC 2.0) 把 WR_* 動作對外開放。 WebRunner MCP server. Exposes a curated subset of WebRunner actions and helper utilities as MCP tools so any MCP-compatible client (Claude, IDE plugins, etc.) can drive WebRunner.
Transport: ndjson over stdio (one JSON object per line). Run via:
python -m je_web_runner.mcp_server
Supported methods: initialize, tools/list, tools/call,
resources/list, ping, shutdown.
Functions
Construct the default tool list shipped with the server. |
|
|
主迴圈:每行一個 JSON-RPC 2.0 訊息,直到 stdin EOF Read newline-delimited JSON-RPC messages from |
Classes
|
JSON-RPC 2.0 server that speaks the MCP wire protocol over stdio. |
|
Exceptions
Raised when the server encounters a fatal protocol error. |
- class je_web_runner.mcp_server.server.McpServer(tools: Dict[str, ~je_web_runner.mcp_server.server.Tool]=<factory>, initialized: bool = False)
Bases:
objectJSON-RPC 2.0 server that speaks the MCP wire protocol over stdio.
- handle(message: Dict[str, Any]) Dict[str, Any] | None
- initialized: bool = False
- exception je_web_runner.mcp_server.server.McpServerError
Bases:
WebRunnerExceptionRaised when the server encounters a fatal protocol error.
- class je_web_runner.mcp_server.server.Tool(name: 'str', description: 'str', input_schema: 'Dict[str, Any]', handler: 'Callable[[Dict[str, Any]], Any]')
Bases:
object- description: str
- handler: Callable[[Dict[str, Any]], Any]
- input_schema: Dict[str, Any]
- name: str
- schema() Dict[str, Any]