kernelfoundry.mcp_server.server¶
KernelFoundry MCP server allowing to use components of the pipeline as tools
Functions
|
Builds and tests a task defined in a directory. |
|
Start the KernelFoundry MCP server. |
- async kernelfoundry.mcp_server.server.build_and_test(folder_path: str, ctx: ~fastmcp.server.context.Context = <fastmcp.server.dependencies._CurrentContext object>) dict[str, Any][source]¶
Builds and tests a task defined in a directory.
If a server URL is configured, this submits the task archive to the KernelFoundry server and waits for results. Otherwise it evaluates the task locally.
- Parameters:
folder_path (str) – Absolute or relative path to the folder containing the custom task.
- Returns:
A dictionary with the following keys:
success (bool): Whether the job completed successfully.
job_id (int): The ID of the submitted job.
eval_log (str): The evaluation log from the job execution.
runtime_stats (dict): Runtime statistics from kernel execution.
speedup (float | str): Runtime improvement metric or “N/A” if not available.
error (str, optional): Error message if the job failed.
- Return type:
- kernelfoundry.mcp_server.server.main(_internal_comm_path_arg: str | None = None) None[source]¶
Start the KernelFoundry MCP server.
Initializes logging and starts the Model Context Protocol server, which provides tools for building and testing kernel optimization tasks. Optionally configures internal communication via file-based handoff if a communication path is provided.
- Parameters:
_internal_comm_path_arg (str | None) – Optional path for file-based internal communication. If provided, the server will use this directory for handoff with another process instead of HTTP-based communication with a remote server. Defaults to None.