Skip to main content
Glama
heresun

OrbStack MCP Server

by heresun

orbstack_compose_up

Start Docker Compose services in the background. Execute docker compose up -d in a specified directory to launch defined services.

Instructions

使用 Docker Compose 启动服务。

在指定目录中执行 docker compose up -d。

Args: params: 包含项目目录和可选的服务名

Returns: str: 启动结果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • The handler function for orbstack_compose_up, which executes docker compose up -d.
    async def orbstack_compose_up(params: DockerComposeInput) -> str:
        """使用 Docker Compose 启动服务。
    
        在指定目录中执行 docker compose up -d。
    
        Args:
            params: 包含项目目录和可选的服务名
    
        Returns:
            str: 启动结果
        """
        args = ["compose", "-f", f"{params.project_dir}/docker-compose.yml", "up", "-d"]
        if params.service:
            args.append(params.service)
    
        code, stdout, stderr = await _run_docker(args, timeout=180)
        if code != 0:
            return _format_error(stderr)
        return f"Compose 项目已启动\n{stdout or stderr}"
  • Registration of the orbstack_compose_up tool using the @mcp.tool decorator.
    @mcp.tool(
        name="orbstack_compose_up",
        annotations={
            "title": "启动 Compose 项目",
            "readOnlyHint": False,
            "destructiveHint": False,
            "idempotentHint": False,
            "openWorldHint": True,
        },
    )

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