Skip to main content
Glama
heresun

OrbStack MCP Server

by heresun

orbstack_machine_pull

Transfer files from Linux virtual machines to macOS using OrbStack. Specify source path, optional destination, and machine name to copy files between systems.

Instructions

从 Linux 机器拉取文件到 macOS。

Args: params: 包含源文件路径、可选的目标路径和机器名

Returns: str: 传输结果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • The implementation of the orbstack_machine_pull tool handler.
    async def orbstack_machine_pull(params: MachineFileTransferInput) -> str:
        """从 Linux 机器拉取文件到 macOS。
    
        Args:
            params: 包含源文件路径、可选的目标路径和机器名
    
        Returns:
            str: 传输结果
        """
        args = ["pull"]
        if params.machine:
            args.extend(["-m", params.machine])
        args.append(params.source)
        if params.destination:
            args.append(params.destination)
    
        code, stdout, stderr = await _run_orb(args)
        if code != 0:
            return _format_error(stderr)
        return f"文件已拉取: {params.source}" + (f" -> {params.destination}" if params.destination else "")
  • Registration of the orbstack_machine_pull tool.
    @mcp.tool(
        name="orbstack_machine_pull",
        annotations={
            "title": "从 Linux 机器拉取文件",
            "readOnlyHint": False,
            "destructiveHint": False,
            "idempotentHint": False,
            "openWorldHint": False,
        },
  • Schema definition for MachineFileTransferInput.
    class MachineFileTransferInput(BaseModel):
        """文件传输的输入参数"""
        model_config = ConfigDict(str_strip_whitespace=True, extra="forbid")
    
        source: str = Field(
            ...,
            description="源文件路径",
            min_length=1,
        )
        destination: Optional[str] = Field(
            default=None,
            description="目标路径,不指定则使用当前目录",
        )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/heresun/orbstack-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server